Skip to main content

Overview

FeeSwapper implements IFeeRouterV2 and converts fee tokens into the desired output token (typically USDC or ELTA) before forwarding to final destinations. Uses DEX integration for on-chain swaps.

Key Functions

Read

FunctionReturnsDescription
getSwapRoute(address tokenIn, address tokenOut)SwapRouteConfigured swap path
supportedTokens()address[]Tokens the swapper can handle
slippageTolerance()uint256Max slippage in basis points

Write

FunctionAccessDescription
swap(address tokenIn, uint256 amountIn, address tokenOut, uint256 minAmountOut)FeeRouterExecute a swap
setSwapRoute(address tokenIn, address tokenOut, SwapRoute calldata route)GovernanceConfigure swap path
setSlippageTolerance(uint256 bps)GovernanceUpdate max slippage

SwapRoute Struct

struct SwapRoute {
    address router;      // DEX router address
    bytes path;          // Encoded swap path
    uint256 maxSlippage; // Override per-route slippage
}

Supported DEXes

The FeeSwapper integrates with Uniswap V3 on Base for token swaps. Swap routes are configurable via governance to add new paths or switch DEX backends.

Events

EventEmitted When
Swapped(address tokenIn, address tokenOut, uint256 amountIn, uint256 amountOut)Swap executed
SwapRouteUpdated(address tokenIn, address tokenOut)Route reconfigured