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
Reserve Folio defines several interfaces that enable contract interaction, custom integrations, and extensibility. Understanding these interfaces is crucial for building on the protocol.IFolio
Core interface for Folio contracts.Key Enums
PriceControl
Defines how much control AUCTION_LAUNCHER has over pricing.ATOMIC_SWAP enables instant rebalancing at fixed prices without a Dutch auction curve.
Key Structs
FolioBasicDetails
Basic configuration for creating a Folio.Name of the Folio token
Symbol of the Folio token
Initial basket token addresses
Initial deposit amounts for each token
Number of shares to mint initially
RebalanceLimits
Basket Unit (BU) limits for rebalancing operations.Lower BU limit - buy assets up to this level (D18 format)
Point estimate for unrestricted callers (D18 format)
Upper BU limit - sell assets down to this level (D18 format)
Must satisfy:
0 < low <= spot <= high <= MAX_LIMITWeightRange
Token weight range for basket definition.Minimum weight - buy up to this (D27 format: tok/BU)
Point estimate weight (D27 format)
Maximum weight - sell down to this (D27 format)
PriceRange
Price range for a token in the Unit of Account (UoA).Lower price bound (D27 format: UoA/tok)
Upper price bound (D27 format: UoA/tok)
TokenRebalanceParams
Complete parameters for a token in rebalancing.Token address
Weight range for this token
Price range for this token
Maximum amount that can be traded in a single auction
Whether this token is part of the rebalance
FeeRecipient
Defines a fee recipient and their share.Address to receive fees
Share of fees (D18 format, must sum to 1e18 across all recipients)
Fee recipients must be sorted by address in ascending order with no duplicates.
Key Function
IBidderCallee
Interface for contracts that want to participate in auctions using callbacks.Token that needs to be transferred to the Folio
Amount of buy token to transfer
Arbitrary data passed from bid() call
Callback Pattern: Allows bidders to receive sell tokens before paying, useful for flash loan integrations or atomic arbitrage.
Callback Flow
- User calls
folio.bid()withwithCallback = true - Folio transfers sell tokens to bidder
- Folio calls
bidder.bidCallback() - Bidder must transfer buy tokens to Folio before callback returns
- Folio verifies payment and completes bid
IGovernanceDeployer
Interface for deploying governance systems.GovParams Struct
Delay before voting starts (seconds)
Duration of voting period (seconds)
Minimum voting power to create proposals (D18)
Minimum voting power for quorum (D18)
Delay before executing approved proposals (seconds)
Addresses with proposal cancellation powers
IFolioDAOFeeRegistry
Interface for querying DAO fee configuration.Fee calculation:
daoFee = max(totalFee * feeNumerator / feeDenominator, feeFloor)IFolioVersionRegistry
Interface for version management.IFolioDeployer
Interface for Folio factory contracts.IRoleRegistry
Interface for protocol-wide role management.Usage Examples
Implementing a Bidder with Callback
Checking Version Before Deployment
Interface Files
All interfaces are located in/contracts/interfaces/:
IFolio.sol- Core Folio interfaceIBidderCallee.sol- Bidder callback interfaceIGovernanceDeployer.sol- Governance deploymentIFolioDAOFeeRegistry.sol- DAO fee configurationIFolioVersionRegistry.sol- Version managementIFolioDeployer.sol- Folio factoryIRoleRegistry.sol- Role management