Presets are pre-configured swap execution strategies that balance speed, cost, and reliability for cross-chain transfers. Each preset defines parameters for the auction mechanism that determines when and how resolvers can fulfill your order.
1inch Fusion+ uses a Dutch auction system where the exchange rate starts favorable to resolvers and gradually improves for users over time. Presets control this auction timeline.
Best for: Large swaps where getting best price is priority
Execution Time: Typically 15-30 minutes
Cost: Lower (more favorable rate over time)
Fills: Often supports multiple fills
Auction Duration: Longer window for competition
const preset = PresetEnum.slow
Recommended Preset: The quote response includes a recommendedPreset field that suggests the optimal preset based on current market conditions and order size.
Each preset contains detailed configuration from the Quoter API:
// From src/api/quoter/types.ts:145-162interface PresetData { auctionDuration: number // Total auction time in seconds startAuctionIn: number // Delay before auction starts initialRateBump: number // Initial rate advantage for resolvers auctionStartAmount: string // Destination amount at auction start startAmount: string // Includes gas cost estimate auctionEndAmount: string // Destination amount at auction end costInDstToken: string // Estimated cost in destination token points: AuctionPoint[] // Rate curve definition allowPartialFills: boolean // Can order be partially filled allowMultipleFills: boolean // Can order have multiple fills gasCost: { // Gas estimation gasBumpEstimate: number gasPriceEstimate: string } exclusiveResolver: string | null // Reserved resolver address secretsCount: number // Number of secrets required}
auctionDuration: How long the auction runs before reaching the end amountstartAuctionIn: Delay before auction begins (allows time for order propagation)initialRateBump: Percentage advantage given to resolvers at auction start
const preset = quote.presets.fastconsole.log(`Auction starts in ${preset.startAuctionIn}s`)console.log(`Auction runs for ${preset.auctionDuration}s`)console.log(`Initial rate bump: ${preset.initialRateBump}%`)
Amount Fields
auctionStartAmount: Destination tokens at auction start (less favorable)auctionEndAmount: Destination tokens at auction end (more favorable)startAmount: Includes gas cost bump for resolver incentivecostInDstToken: Total estimated cost in destination token terms
allowPartialFills: Whether order can be filled in partsallowMultipleFills: Whether multiple resolvers can fillsecretsCount: Number of secrets needed (1 for single fill, multiple for multi-fill)
const preset = quote.presets.slowif (preset.allowMultipleFills) { console.log(`Order can be split into ${preset.secretsCount} fills`) // Generate appropriate number of secrets const secrets = Array.from({ length: preset.secretsCount }) .map(() => '0x' + randomBytes(32).toString('hex'))} else { console.log('Order must be filled atomically')}
Auction Points
points: Define the rate curve between auction start and end
interface AuctionPoint { delay: number // Seconds from auction start toTokenAmount: string // Destination token amount at this point}// Example: Visualize rate curveconst preset = quote.presets.mediumconsole.log('Rate curve:')console.log(` 0s: ${preset.auctionStartAmount}`)for (const point of preset.points) { console.log(` ${point.delay}s: ${point.toTokenAmount}`)}console.log(` ${preset.auctionDuration}s: ${preset.auctionEndAmount}`)
Time Sensitivity: Orders expire after the auction duration plus cancellation windows. If resolvers don’t fill the order in time, it will be cancelled and funds returned.