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
Rebalancing allows you to adjust the composition of assets in your Folio’s basket. The process involves:- Starting a rebalance with target weights and price ranges
- Opening auctions to execute trades
- Bidding on auctions (or using trusted fillers)
- Closing auctions and ending the rebalance
Only the
REBALANCE_MANAGER role can start rebalances. The AUCTION_LAUNCHER role controls how auctions execute during the restricted period.Starting a Rebalance
Define Token Parameters
Specify weights, price ranges, and constraints for each token in the rebalance:
Weight Ranges:
- Weights are in D27 format (27 decimals) representing
tok/BU - Total weights don’t need to equal 100%, they define ratios
spotis used for unrestricted auctionsAUCTION_LAUNCHERcan narrow ranges ifweightControlis enabled
Configure Time Windows
Set how long the rebalance and restriction periods last:Time Periods:
- Restricted Period: Only
AUCTION_LAUNCHERcan open auctions - Unrestricted Period: Anyone can open auctions with spot values
- Total TTL: Maximum time before rebalance expires
Opening Auctions
Once a rebalance is started, auctions must be opened to execute trades.Restricted Auctions (AUCTION_LAUNCHER)
Narrow Ranges (Optional)
The
AUCTION_LAUNCHER can progressively tighten ranges:All ranges must stay within the original bounds set in
startRebalance.Unrestricted Auctions
After the restricted period expires, anyone can open auctions:- Include all tokens in the rebalance
- Use spot weights (collapsing high/low ranges)
- Use initial price ranges from
startRebalance - Use spot limits
- Run for
maxAuctionLengthduration
Monitoring Auction Progress
Closing Auctions and Rebalances
Privileged roles can manually close auctions or end rebalances:Best Practices
Progressive Narrowing
Progressive Narrowing
Use multiple auctions to progressively narrow BU limits and weight ranges. This implements DCA (dollar-cost averaging) and reduces price impact.
Price Range Updates
Price Range Updates
If
priceControl is PARTIAL, monitor market prices and update auction prices to reflect current conditions without going outside initial bounds.Max Auction Size
Max Auction Size
Set
maxAuctionSize to prevent single large trades from dominating the rebalance. Break large rebalances into multiple smaller auctions.Emergency Stops
Emergency Stops
Monitor for:
- Market prices moving outside initial price ranges
- Unexpected token behavior
- Low bidder participation
endRebalance() to stop if conditions warrant.Code Reference
- Rebalance start:
contracts/Folio.sol:632-665 - Open auction:
contracts/Folio.sol:675-707 - Unrestricted auction:
contracts/Folio.sol:712-766 - Rebalancing logic:
contracts/utils/RebalancingLib.sol:24-119
Next Steps
Participate in Auctions
Learn how to bid on auctions and earn arbitrage profits
Governance Setup
Configure governance for rebalancing decisions