Skip to main content

Overview

Folios support permissionless minting and redemption:
  • Minting: Deposit basket assets to receive Folio shares
  • Redeeming: Burn Folio shares to receive basket assets
Both operations are proportional to the current basket composition and include fee mechanisms.
Minting and redemption are disabled if the Folio is deprecated. Use folio.isDeprecated() to check status.

Understanding Share Accounting

Total Supply

The total supply includes:
  1. Circulating shares (held by users)
  2. Pending DAO fee shares (not yet distributed)
  3. Pending fee recipient shares (not yet distributed)

Asset Composition

Shares represent proportional ownership of all basket assets:
Asset composition may be unreliable during trusted fill execution. Check folio.stateChangeActive() before relying on asset data.

Minting Shares

Minting requires depositing all basket assets proportionally.
1

Query Required Assets

Calculate how many tokens you need for a desired share amount:
Always use Math.Rounding.Ceil when calculating required deposits to avoid “insufficient amount” errors.
2

Calculate Fees

Understand the fee structure:
Fee Distribution:
  • DAO takes minimum 15bps from all fees
  • Remaining goes to fee recipients (if configured)
  • If no fee recipients, DAO gets everything
3

Approve Token Transfers

Grant allowances for all basket assets:
You can also use permit() for gasless approvals if tokens support ERC-2612.
4

Execute Mint

After minting:
  • Your share balance increased
  • Your token balances decreased by returnedAmounts
  • Pending fee shares increased (distributed later)
5

Set Slippage Protection (Optional)

Use allowances to limit token spend in case of state changes:

Redeeming Shares

Redemption burns shares and returns proportional assets.
1

Calculate Redemption Output

2

Set Minimum Amounts

Protect against unfavorable state changes:
3

Execute Redemption

The assets parameter must match the current basket exactly (same order, same tokens). Otherwise, the transaction will revert.

Fee Distribution

Fees accumulate as pending shares and are distributed separately.

Manual Distribution

This will:
  1. Calculate all pending fee shares from TVL fees and mint fees
  2. Mint shares to fee recipients according to their portions
  3. Mint remaining shares to DAO fee recipient
  4. Reset pending fee counters

Automatic Distribution

Fees are automatically distributed (via poke()) before:
  • Minting
  • Redemption
  • Fee configuration changes
  • Any state-changing operation
The poke() function updates pending fees based on time elapsed since the last update (in full days only).

Fee Types

TVL Fee (Time-Based)

Annual demurrage fee on assets under management
Calculation:
  • Accrues every full day (24-hour periods)
  • Causes supply inflation (new shares minted to fee recipients)
  • Max 10% annually

Mint Fee (One-Time)

Percentage fee charged on minting
Characteristics:
  • One-time charge when minting
  • Does NOT cause supply inflation (taken from minted shares)
  • Max 5%

Folio Self Fee

Fraction of fee-recipient shares that are burned
This creates deflationary pressure on supply.

Advanced Minting Strategies

Batch Minting for Multiple Users

Mint with Single Asset

Use a DEX aggregator to convert a single asset into the basket:

Handling Edge Cases

During rebalances, the basket composition may change:
Deprecated Folios can only be redeemed:
Basket tokens with zero balance are still part of the basket:
TVL fees accrue in full days only:

Querying Fee Information

Gas Optimization Tips

If you’ll be minting multiple times, approve max once:
Minting has fixed gas costs. Mint larger amounts less frequently:
If fees are pending, mint() will trigger distribution automatically. Consider timing mints after fee accrual periods.

Code Reference

  • Mint function: contracts/Folio.sol:441-476
  • Redeem function: contracts/Folio.sol:482-508
  • Asset calculation: contracts/Folio.sol:420-433
  • Fee distribution: contracts/Folio.sol:521-551

Next Steps

Auction Participation

Provide liquidity by bidding on rebalancing auctions

Deploying Folio

Create your own Folio with custom parameters