Overview
Folio auctions use a Dutch auction mechanism where prices move from optimistic to pessimistic over time. All token pairs trade simultaneously, and bidders can participate by:- Direct bidding - Swap tokens at the current auction price
- Callback bidding - Execute custom logic before transferring tokens
- Trusted fills - Use aggregators like CowSwap for complex routing
Auctions have a 30-second warmup period to ensure fair competition. This is skipped for atomic swaps where start price equals end price.
Understanding Auction Mechanics
Surplus and Deficit
Auctions only allow trading between:- Surplus tokens: Tokens above the high basket limit
- Deficit tokens: Tokens below the low basket limit
Price Discovery
Prices follow an exponential decay curve:- Start: Most optimistic prices (favorable to Folio)
- End: Most pessimistic prices (favorable to bidders)
- Current: Interpolated based on time elapsed
Direct Bidding
The simplest way to participate in auctions.1
Query Available Bids
Find profitable opportunities:
2
Approve Tokens
The Folio needs allowance to pull buy tokens from you:
3
Execute Bid
Submit your bid:
After the bid:
- Your WETH balance increases by
sellAmount - Your USDC balance decreases by
actualBidAmount actualBidAmountshould be ≤bidAmount(your max)
4
Arbitrage on External Markets
Immediately trade your received tokens for profit:
Callback Bidding
For advanced strategies, use callbacks to execute custom logic within the bid transaction.1
Implement IBidderCallee Interface
Your contract must implement the callback interface:
2
Call Bid with Callback
- Folio transfers
sellAmountof sell token to you - Folio calls
bidderCallback()on your contract - Your callback executes and transfers
buyAmountto Folio - Folio verifies it received the tokens
Trusted Filler Integration
Trusted fillers enable async execution using specialized solvers like CowSwap.1
Create Trusted Fill
Instead of bidding directly, create a trusted fill order:
The Folio will automatically close and claim tokens from the trusted filler at the next state-changing call.
2
Execute Fill (Solver Side)
The trusted filler contract handles the actual swap:
3
Monitor Fill Status
Check if the async swap is still active:
Bidding Requirements
Permissionless Bids Enabled
Permissionless Bids Enabled
If
bidsEnabled is true for the rebalance, anyone can bid on auctions.Deprecation Status
Deprecation Status
Bids cannot be placed on deprecated Folios:
Auction Timing
Auction Timing
Bids are only valid during the auction’s active period:
- After warmup period (30 seconds, or 0 for atomic swaps)
- Before end time
Token Pairs
Token Pairs
You can only trade pairs where:
- Sell token is in surplus (above high limit)
- Buy token is in deficit (below low limit)
Advanced Strategies
Multi-Hop Arbitrage
Bid on multiple pairs in sequence:Flash Loan Arbitrage
Use flash loans to amplify profits:Monitoring Events
Listen to auction events for opportunities:Code Reference
- Bid execution:
contracts/Folio.sol:794-813 - Get bid parameters:
contracts/Folio.sol:776-783 - Trusted fill creation:
contracts/Folio.sol:816-847 - Bid callback interface:
contracts/interfaces/IBidderCallee.sol
Next Steps
Managing Rebalances
Learn how to start and configure rebalances
Minting & Redeeming
Understand how to mint and redeem Folio shares