When to use it
- Solidly-style pools on Base, two per pair: volatile (constant product) and stable (a
curve for assets meant to trade near 1:1). Its concentrated-liquidity pools are Aerodrome
Slipstream (
aerodrome-slipstream). - Base only. On Arc, Aerodrome runs only Slipstream pools (Aero Lite): swap there through
aerodrome-slipstream, finding the pool withAerodromeSlipstream.CLFactory.Aerodrome.RouterandAerodrome.PoolFactoryare Base’s, and a program for Arc that names them does not compile.
Pitfalls for a program
- Pick the pool type:
getPool(a, b, stable)and each route’sstableflag must agree. - Each route names the factory (
Aerodrome.PoolFactory). amountOutMinis the only bound; approve exactlyamountInand pass a deadline.- Fees are set per pool by the factory, not fixed by the pool type.
In a Sauce program
Sell the Pot’s USDC for WETH on the volatile pool:What it offers
- swap: Swap tokens with route-based routing specifying stable or volatile pool type
- addLiquidity: Add liquidity to a stable or volatile pool
- removeLiquidity: Remove liquidity from a stable or volatile pool
Notes
- Same interface as Velodrome (forked codebase); Aerodrome is Velodrome’s Base deployment
- Two pool types:
stable=true(Curve-like invariant for pegged assets),stable=false(x*y=k for uncorrelated) - Fees: volatile pools ~0.3%, stable pools ~0.04% (governance-controlled)
- ve(3,3) model: AERO holders vote-lock tokens to direct gauge emissions weekly
- LP tokens can be staked in gauges for AERO emissions
- Routes include both
stableflag andfactoryaddress per hop - This module is the basic (stable/volatile) pools only. Aerodrome’s concentrated-liquidity Slipstream pools are the
aerodrome-slipstreammodule
Its names in a program
On Base,Aerodrome is a namespace: its contracts need no import.
Deployments
ABI
Where a line says what an address it returns is, a program that calls the function through its namespace calls that contract’s methods on the result directly:<Namespace>.<Contract>.<function>(...).<method>(...). A token’s methods are the ERC-20
functions, and its writes are SafeERC20.
AerodromePoolABI
import AerodromePoolABI from "./protocols/aerodrome/AerodromePoolABI.json";
getReserves() view returns (uint256 _reserve0, uint256 _reserve1, uint256 _blockTimestampLast)getAmountOut(uint256 amountIn, address tokenIn) view returns (uint256)stable() view returns (bool)token0() view returns (address): the address is a tokentoken1() view returns (address): the address is a tokenswap(uint256 amount0Out, uint256 amount1Out, address to, bytes data)
AerodromePoolFactoryABI
import AerodromePoolFactoryABI from "./protocols/aerodrome/AerodromePoolFactoryABI.json"; Speaks for: poolFactory.
getPool(address tokenA, address tokenB, bool stable) view returns (address pool): the address is aAerodrome.Pool
AerodromeRouterABI
import AerodromeRouterABI from "./protocols/aerodrome/AerodromeRouterABI.json"; Speaks for: router.
swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, (address from, address to, bool stable, address factory)[] routes, address to, uint256 deadline) returns (uint256[] amounts)addLiquidity(address tokenA, address tokenB, bool stable, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns (uint256 amountA, uint256 amountB, uint256 liquidity)removeLiquidity(address tokenA, address tokenB, bool stable, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns (uint256 amountA, uint256 amountB)
Next steps
- Protocols: the other protocols, by what they do.
- Protocols and tokens: calling a contract by its namespace, or through its ABI.
- Glossary: the words these pages use, in plain terms.
