Reserve Folio uses a role-based access control (RBAC) system to separate concerns and enable secure, flexible governance. Each role has specific permissions designed to balance security with operational flexibility.
// Add token to basketfunction addToBasket(IERC20 token) external onlyRole(DEFAULT_ADMIN_ROLE)// Remove token from basket (with restrictions)function removeFromBasket(IERC20 token) external
// Set TVL fee (annual percentage)function setTVLFee(uint256 _newFee) external onlyRole(DEFAULT_ADMIN_ROLE)// Set mint fee (percentage)function setMintFee(uint256 _newFee) external onlyRole(DEFAULT_ADMIN_ROLE)// Set folio self fee (burn fraction)function setFolioSelfFee(uint256 _newFee) external onlyRole(DEFAULT_ADMIN_ROLE)// Configure fee recipientsfunction setFeeRecipients( FeeRecipient[] calldata _newRecipients) external onlyRole(DEFAULT_ADMIN_ROLE)
// Set maximum auction lengthfunction setMaxAuctionLength(uint256 _newLength) external onlyRole(DEFAULT_ADMIN_ROLE)// Set mandatefunction setMandate(string calldata _newMandate) external onlyRole(DEFAULT_ADMIN_ROLE)// Set Folio namefunction setName(string calldata _newName) external onlyRole(DEFAULT_ADMIN_ROLE)// Configure trusted filler registryfunction setTrustedFillerRegistry(address _newFillerRegistry, bool _enabled) external onlyRole(DEFAULT_ADMIN_ROLE)// Set rebalance controlfunction setRebalanceControl(RebalanceControl calldata _rebalanceControl) external onlyRole(DEFAULT_ADMIN_ROLE)// Enable/disable permissionless bidsfunction setBidsEnabled(bool _bidsEnabled) external onlyRole(DEFAULT_ADMIN_ROLE)
// Deprecate the Folio (redemption-only mode)function deprecateFolio() external onlyRole(DEFAULT_ADMIN_ROLE)// Close an auctionfunction closeAuction(uint256 auctionId) external// End a rebalancefunction endRebalance() external
DEFAULT_ADMIN_ROLE has extensive control. It should ALWAYS be held by a timelock with significant delay (7-14 days).
// Start a new rebalancefunction startRebalance( TokenRebalanceParams[] calldata tokens, RebalanceLimits calldata limits, uint256 auctionLauncherWindow, uint256 ttl) external onlyRole(REBALANCE_MANAGER)// End the current rebalancefunction endRebalance() external // REBALANCE_MANAGER or ADMIN or AUCTION_LAUNCHER// Close an auctionfunction closeAuction(uint256 auctionId) external // REBALANCE_MANAGER or ADMIN or AUCTION_LAUNCHER
// Open an auction with specific parametersfunction openAuction( uint256 rebalanceNonce, address[] calldata tokens, WeightRange[] calldata newWeights, PriceRange[] calldata newPrices, RebalanceLimits calldata newLimits, uint256 auctionLength) external onlyRole(AUCTION_LAUNCHER) returns (uint256 auctionId)// Close an auctionfunction closeAuction(uint256 auctionId) external// End a rebalancefunction endRebalance() external
// DEFAULT_ADMIN_ROLE revokes the rolefolio.revokeRole(AUCTION_LAUNCHER, maliciousAddress);// Auctions can now proceed permissionlessly after restricted period
An optional, permissionless role for off-chain use.
BRAND_MANAGER
Expected Holder: Marketing/Brand team (optional)Permissions: NONE (on-chain)Purpose: Off-chain identification of brand managers for marketing, social media, and community management.
BRAND_MANAGER has no on-chain permissions. It exists purely for off-chain tooling and identification purposes.
// Only DEFAULT_ADMIN_ROLE can grant rolesfunction grantRole(bytes32 role, address account) external// Examplefolio.grantRole(REBALANCE_MANAGER, timelockAddress);folio.grantRole(AUCTION_LAUNCHER, multisigAddress);
// Any role holder can renounce their own rolefunction renounceRole(bytes32 role, address account) external// Example (called by the role holder)folio.renounceRole(AUCTION_LAUNCHER, msg.sender);
// Check if an address has a rolefunction hasRole(bytes32 role, address account) external view returns (bool)// Get number of role membersfunction getRoleMemberCount(bytes32 role) external view returns (uint256)// Get role member by indexfunction getRoleMember(bytes32 role, uint256 index) external view returns (address)
// Check if address has REBALANCE_MANAGERif (folio.hasRole(REBALANCE_MANAGER, address(timelock))) { // Timelock can start rebalances}// List all AUCTION_LAUNCHER role holdersuint256 count = folio.getRoleMemberCount(AUCTION_LAUNCHER);for (uint256 i = 0; i < count; i++) { address launcher = folio.getRoleMember(AUCTION_LAUNCHER, i); console.log("Auction Launcher:", launcher);}