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

The FolioDAOFeeRegistry contract manages the protocol-level fee configuration for all Folios. It determines what percentage of Folio fees go to the DAO versus fee recipients, and enforces minimum fee floors to ensure the protocol remains sustainable.

Key Features

  • DAO Fee Split: Configurable percentage of fees that go to the protocol
  • Fee Floor: Minimum fees charged to users, regardless of Folio settings
  • Per-Folio Overrides: Custom fee settings for specific Folios
  • Chain-Specific Maximums: Different max fees based on blockchain

Fee Mechanics

The registry implements a two-tier fee system:
  1. DAO Fee Percentage: The DAO receives a percentage of collected fees (e.g., 50%)
  2. Fee Floor: A minimum amount the DAO receives, even if the percentage calculation is lower
Example: If DAO fee is 50% and floor is 0.15%:
  • At 0.30% TVL fee: DAO gets 0.15%, recipients get 0.15%
  • At 0.20% TVL fee: DAO gets 0.15%, recipients get 0.05%
  • At 0.10% TVL fee: DAO gets 0.15%, recipients get 0%

Configuration Functions

Set Fee Recipient

Set the address that receives DAO fees.
feeRecipient_
address
New fee recipient address (cannot be zero)
FolioDAOFeeRegistry.sol
function setFeeRecipient(address feeRecipient_) external onlyOwner

Set Default Fee Numerator

Set the default DAO fee percentage for all Folios.
feeNumerator_
uint256
New fee numerator as D18 (e.g., 0.5e18 = 50%)
FolioDAOFeeRegistry.sol
function setDefaultFeeNumerator(uint256 feeNumerator_) external onlyOwner
The fee numerator must not exceed the chain-specific MAX_DAO_FEE. The denominator is always FEE_DENOMINATOR (1e18).

Set Token Fee Numerator

Set a custom DAO fee percentage for a specific Folio.
fToken
address
Address of the Folio token
feeNumerator_
uint256
Custom fee numerator (D18)
FolioDAOFeeRegistry.sol
function setTokenFeeNumerator(address fToken, uint256 feeNumerator_) external onlyOwner

Set Default Fee Floor

Set the default minimum DAO fee for all Folios.
_defaultFeeFloor
uint256
New default fee floor as D18 (e.g., 0.0015e18 = 0.15% = 15 bps)
FolioDAOFeeRegistry.sol
function setDefaultFeeFloor(uint256 _defaultFeeFloor) external onlyOwner

Set Token Fee Floor

Set a custom minimum DAO fee for a specific Folio.
fToken
address
Address of the Folio token
_feeFloor
uint256
Custom fee floor (cannot exceed default floor)
FolioDAOFeeRegistry.sol
function setTokenFeeFloor(address fToken, uint256 _feeFloor) external onlyOwner
Token-specific fee floors cannot exceed the default fee floor. This ensures a baseline minimum across the protocol.

Reset Token Fees

Remove custom fee settings for a Folio, reverting to defaults.
fToken
address
Address of the Folio token
FolioDAOFeeRegistry.sol
function resetTokenFees(address fToken) external onlyOwner

View Functions

Get Fee Details

Retrieve complete fee configuration for a Folio.
fToken
address
Address of the Folio token
FolioDAOFeeRegistry.sol
function getFeeDetails(address fToken) external view returns (
    address recipient,
    uint256 feeNumerator,
    uint256 feeDenominator,
    uint256 feeFloor
)
Returns:
  • recipient: Address receiving DAO fees
  • feeNumerator: DAO percentage numerator (D18)
  • feeDenominator: Always 1e18
  • feeFloor: Minimum DAO fee (D18)

Chain-Specific Limits

Maximum fees vary by blockchain:

Ethereum Mainnet (Chain ID: 1)

MAX_DAO_FEE
uint256
default:"0.5e18"
Maximum DAO fee: 50%
MAX_FEE_FLOOR
uint256
default:"0.0015e18"
Maximum fee floor: 0.15% (15 bps)

Base (Chain ID: 8453)

MAX_DAO_FEE
uint256
default:"0.5e18"
Maximum DAO fee: 50%
MAX_FEE_FLOOR
uint256
default:"0.0015e18"
Maximum fee floor: 0.15% (15 bps)

BNB Smart Chain (Chain ID: 56)

MAX_DAO_FEE
uint256
default:"0.333...e18"
Maximum DAO fee: 33.33%
MAX_FEE_FLOOR
uint256
default:"0.001e18"
Maximum fee floor: 0.10% (10 bps)

Events

FeeRecipientSet
event
Emitted when DAO fee recipient is changedParameters:
  • feeRecipient - New recipient address
DefaultFeeNumeratorSet
event
Emitted when default DAO fee percentage is updatedParameters:
  • feeNumerator - New default numerator (D18)
TokenFeeNumeratorSet
event
Emitted when a Folio-specific fee numerator is setParameters:
  • fToken - Folio token address
  • feeNumerator - Custom numerator
  • isActive - Whether override is active
DefaultFeeFloorSet
event
Emitted when default fee floor is updatedParameters:
  • defaultFeeFloor - New default floor (D18)
TokenFeeFloorSet
event
Emitted when a Folio-specific fee floor is setParameters:
  • fToken - Folio token address
  • feeFloor - Custom floor
  • isActive - Whether override is active

Constants

FEE_DENOMINATOR
uint256
default:"1e18"
Denominator for all fee calculations (D18 precision)

Access Control

roleRegistry
IRoleRegistry
Immutable reference to the RoleRegistry contract for owner checks
All configuration functions require the caller to be an owner in the RoleRegistry.

Fee Distribution Flow

When fee settings are changed, the registry automatically calls distributeFees() on the affected Folio before applying changes. This ensures pending fees are calculated with old settings.

Usage Example

// Get fee configuration for a Folio
(
    address recipient,
    uint256 feeNumerator,
    uint256 feeDenominator,
    uint256 feeFloor
) = daoFeeRegistry.getFeeDetails(folioAddress);

// Calculate DAO share of 100 shares
uint256 daoShares = (100 * feeNumerator) / feeDenominator;
// daoShares = 50 (if feeNumerator is 0.5e18)

Build docs developers (and LLMs) love