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
Trusted fillers enable asynchronous order execution during Folio rebalancing auctions. Instead of executing swaps directly on-chain through thebid() function, trusted fillers can route orders to external protocols like CoW Swap for potentially better execution.
How Trusted Fillers Work
When trusted fillers are enabled, anAUCTION_LAUNCHER or any authorized party can create a trusted fill during an active auction:
- Validates the auction is ongoing
- Calculates the sell and buy amounts based on current auction prices
- Creates a new trusted filler contract via the
TrustedFillerRegistry - Approves the sell token to the filler
- Initializes the filler with swap parameters
CoW Swap Integration
CoW Swap is currently the only supported trusted filler. It enables:- MEV protection through batch auctions
- Better execution via solver competition
- Gas optimization through order batching
- Price improvement beyond standard dutch auction curves
Example: Creating a CoW Swap Fill
State Management
The Folio tracks an active trusted fill atactiveTrustedFill. While a trusted fill is active:
- Token balances include balances held by the filler
- The
stateChangeActive()function returns(false, true)if the swap is ongoing - The
_poke()function automatically closes completed fills
Checking Async State
Configuration
Trusted fillers are configured through theFolioRegistryIndex during deployment or via governance:
Enabling Trusted Fillers
Token Compatibility
When trusted fillers are enabled, tokens must be supported by both:- The Folio contract (see Security Considerations)
- The external trusted fillers whitelisted in the registry
- Be listed on CoW Protocol
- Have sufficient liquidity for solver routing
- Not be pausable, fee-on-transfer, or have callbacks
Auction Lifecycle with Trusted Fills
The complete rebalancing flow with trusted fillers:- Start Rebalance -
REBALANCE_MANAGERinitiates - Open Auction -
AUCTION_LAUNCHERopens with price ranges - Create Trusted Fill - Optional async execution via CoW Swap
- Order Settlement - CoW solvers compete to fill the order
- Close Fill - Folio automatically claims tokens when complete
- Close Auction - Optional early closure or natural expiration
Best Practices
For AUCTION_LAUNCHER
- Use trusted fillers for large trades where MEV is a concern
- Monitor fill status and close auctions if fills fail
- Combine with
PriceControl.ATOMIC_SWAPfor maximum control
For Consuming Protocols
Events
Security Considerations
- Trusted fillers execute within the same auction price bounds as regular bids
- The
AUCTION_LAUNCHERmust still act within ranges set byREBALANCE_MANAGER - Failed fills do not revert; the Folio reclaims tokens automatically
- Only one trusted fill can be active at a time per Folio