Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/reserve-protocol/reserve-index-dtf/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Folios can be deployed in two ways:
  1. Raw Folio - with manually assigned roles
  2. Governed Folio - with fully automated governance structure including timelocks and voting mechanisms

Prerequisites

  • Deployment wallet with sufficient ETH for gas
  • Initial basket assets and amounts
  • Fee registry and version registry addresses
  • Trusted filler registry address (optional)

Deploying a Raw Folio

A raw Folio gives you direct control over role assignments.
1

Prepare Basic Details

Define your Folio’s core parameters:
IFolio.FolioBasicDetails memory basicDetails = IFolio.FolioBasicDetails({
    name: "My Custom Folio",
    symbol: "MCF",
    assets: [address(usdc), address(weth), address(dai)],
    amounts: [1000e6, 1e18, 1000e18], // Initial basket amounts
    initialShares: 1000e18 // Shares minted to creator
});
The amounts array must match the length of the assets array. Each amount represents the initial quantity of each asset required.
2

Configure Additional Details

Set up fees, mandate, and auction parameters:
IFolio.FeeRecipient[] memory recipients = new IFolio.FeeRecipient[](1);
recipients[0] = IFolio.FeeRecipient({
    recipient: feeRecipientAddress,
    portion: 1e18 // 100% in D18 format
});

IFolio.FolioAdditionalDetails memory additionalDetails = IFolio.FolioAdditionalDetails({
    maxAuctionLength: 3 days,
    feeRecipients: recipients,
    tvlFee: 317097919837645, // ~1% annual (D18/second)
    mintFee: 0.01e18, // 1%
    folioFeeForSelf: 0, // No self-burn
    mandate: "A diversified stablecoin basket"
});
Fee Limits:
  • TVL Fee: Max 10% annually
  • Mint Fee: Max 5%
  • DAO takes minimum 15bps from all fees
3

Set Folio Flags

Configure rebalancing behavior:
IFolio.FolioFlags memory flags = IFolio.FolioFlags({
    trustedFillerEnabled: true,
    rebalanceControl: IFolio.RebalanceControl({
        weightControl: true, // AUCTION_LAUNCHER can adjust weights
        priceControl: IFolio.PriceControl.PARTIAL // Can narrow prices
    }),
    bidsEnabled: true // Allow permissionless bidding
});
Price Control Options:
  • NONE - Cannot change prices from initial
  • PARTIAL - Can narrow price ranges within initial bounds
  • ATOMIC_SWAP - Can set instant swaps (start price = end price)
4

Approve Token Transfers

The deployer must approve the FolioDeployer to transfer initial basket assets:
IERC20(usdc).approve(address(folioDeployer), 1000e6);
IERC20(weth).approve(address(folioDeployer), 1e18);
IERC20(dai).approve(address(folioDeployer), 1000e18);
5

Deploy the Folio

Call the deployment function:
address[] memory basketManagers = new address[](1);
basketManagers[0] = rebalanceManagerAddress;

address[] memory auctionLaunchers = new address[](1);
auctionLaunchers[0] = auctionLauncherAddress;

address[] memory brandManagers = new address[](0);

(Folio folio, address proxyAdmin) = folioDeployer.deployFolio(
    basicDetails,
    additionalDetails,
    flags,
    ownerAddress, // Admin
    basketManagers, // REBALANCE_MANAGER role
    auctionLaunchers, // AUCTION_LAUNCHER role
    brandManagers, // BRAND_MANAGER role (optional)
    keccak256(abi.encode("unique_salt")) // Deployment nonce
);
After deployment:
  • Verify the Folio address
  • Check that roles are assigned correctly
  • Confirm initial shares were minted
  • Ensure basket tokens were transferred

Deploying a Governed Folio

A governed Folio includes complete governance infrastructure with voting tokens and timelocks.
1

Prepare Governance Parameters

Define governance settings for the owner and trading governors:
// Owner governance controls admin functions
IGovernanceDeployer.GovParams memory ownerGovParams = IGovernanceDeployer.GovParams({
    votingDelay: 1 days,
    votingPeriod: 7 days,
    proposalThreshold: 1000e18, // Min tokens to propose
    quorumThreshold: 4, // 4% quorum (in percentage)
    timelockDelay: 2 days,
    guardians: new address[](0) // Can cancel proposals
});

// Trading governance controls rebalancing
IGovernanceDeployer.GovParams memory tradingGovParams = IGovernanceDeployer.GovParams({
    votingDelay: 6 hours,
    votingPeriod: 3 days,
    proposalThreshold: 500e18,
    quorumThreshold: 3,
    timelockDelay: 1 days,
    guardians: new address[](0)
});
2

Configure Role Assignments

Specify existing role holders (or leave empty for governance-only control):
IFolioDeployer.GovRoles memory govRoles = IFolioDeployer.GovRoles({
    existingBasketManagers: new address[](0), // Empty = deploy trading gov
    auctionLaunchers: [auctionLauncherEOA],
    brandManagers: new address[](0)
});
Leave existingBasketManagers empty to automatically deploy a separate trading governor. Otherwise, use your own addresses.
3

Choose Governance Model

Decide between self-governance (Folio shares = voting power) or separate staking token:
// Option 1: Self-governed (stToken = address(0))
IVotes stToken = IVotes(address(0));

// Option 2: Separate staking token
// IVotes stToken = IVotes(existingVotingTokenAddress);
4

Deploy Governed Folio

Execute the deployment:
(Folio folio, address proxyAdmin) = folioDeployer.deployGovernedFolio(
    stToken, // address(0) for self-governance
    basicDetails,
    additionalDetails,
    flags,
    ownerGovParams,
    tradingGovParams,
    govRoles,
    keccak256(abi.encode("unique_salt_2"))
);
This will deploy:
  • Folio contract
  • Owner governor + timelock
  • Trading governor + timelock (if applicable)
  • Vote-locked staking vault (if self-governed)
5

Verify Deployment

Check the emitted events for deployed addresses:
// Listen for GovernedFolioDeployed event
event GovernedFolioDeployed(
    address stToken,
    address folio,
    address ownerGovernor,
    address ownerTimelock,
    address tradingGovernor,
    address tradingTimelock
);
All admin functions must now go through the governance timelock. Immediate changes are no longer possible.

Post-Deployment

After deployment, you can:
  • Set up additional role holders
  • Configure trade allowlists (if needed)
  • Add trusted fillers to the registry
  • Begin minting shares
  • Initiate your first rebalance

Code Reference

  • Deployment logic: contracts/deployer/FolioDeployer.sol:45-203
  • Governance setup: contracts/deployer/GovernanceDeployer.sol:40-109
  • Initialization: contracts/Folio.sol:207-250

Next Steps

Mint Shares

Learn how users can mint and redeem Folio shares

Start Rebalancing

Configure and execute your first rebalance

Build docs developers (and LLMs) love