Mezo Pools enable users to swap tokens and provide liquidity using optimized pool mechanics. Pools currently supports selected liquidity pools and curated integrations, with plans to open up permissionless access in the future.
This documentation is a rough overview. More technical details will be added over the coming days.
How Pools Work
Pool Factory: Deployed by the Mezo team (not permissionless yet)
Supported Pools
| Pool | Address |
|------|---------||
| MUSD/BTC | 0x52e604c44417233b6CcEDDDc0d640A405Caacefb |
| MUSD/mUSDC | 0xEd812AEc0Fecc8fD882Ac3eccC43f3aA80A6c356 |
| MUSD/mUSDT | 0x10906a9E9215939561597b4C8e4b98F93c02031A |
Pool Mechanics
Pool Logic: Aerodrome-style AMM (either constant-product or stable-curve depending on pair)
Swap Fees: Set per pool (e.g. 0.05%, 0.3%)
Liquidity Farming: Fee accrual enabled; reward distributions planned later
How Swaps Work
Router Contract: 0x16A76d3cd3C1e3CE843C6680d6B37E9116b5C706
Swap Flow
Approve token to router
User approves token to router contract
Call router swap function
Call router’s swapExactTokensForTokens(...) with path array
Receive output token
Output token is returned to wallet
Key Features
Slippage Control: Provided on frontend or via parameters in the contract call
No Oracles Needed: Prices derived from pool reserves directly
Contract Addresses
Core Contracts
| Name | Address |
|------|---------||
| Router | 0x16A76d3cd3C1e3CE843C6680d6B37E9116b5C706 |
| PoolFactory | 0x83FE469C636C4081b87bA5b3Ae9991c6Ed104248 |
| MUSD/BTC Pool | 0x52e604c44417233b6CcEDDDc0d640A405Caacefb |
| MUSD/mUSDC Pool | 0xEd812AEc0Fecc8fD882Ac3eccC43f3aA80A6c356 |
| MUSD/mUSDT Pool | 0x10906a9E9215939561597b4C8e4b98F93c02031A |
Mainnet Contracts
Core Contracts
Pool Contracts
Governance Contracts
Router: 0x16A76d3cd3C1e3CE843C6680d6B37E9116b5C706
PoolFactory: 0x83FE469C636C4081b87bA5b3Ae9991c6Ed104248
Testnet Contracts
Core Contracts
Pool Contracts
Governance Contracts
Router: 0x9a1ff7FE3a0F69959A3fBa1F1e5ee18e1A9CD7E9
PoolFactory: 0x4947243CC818b627A5D06d14C4eCe7398A23Ce1A
Integration Examples
Executing a Token Swap
import { ethers } from 'ethers' ;
const ROUTER_ADDRESS = '0x16A76d3cd3C1e3CE843C6680d6B37E9116b5C706' ;
async function executeSwap (
provider : ethers . Provider ,
signer : ethers . Signer ,
tokenIn : string ,
tokenOut : string ,
amountIn : bigint ,
minAmountOut : bigint
) {
// Connect to router contract
const router = new ethers . Contract ( ROUTER_ADDRESS , ROUTER_ABI , signer );
// Approve token spending
const tokenContract = new ethers . Contract ( tokenIn , ERC20_ABI , signer );
const approveTx = await tokenContract . approve ( ROUTER_ADDRESS , amountIn );
await approveTx . wait ();
// Execute swap
const deadline = Math . floor ( Date . now () / 1000 ) + 60 * 20 ; // 20 minutes
const path = [ tokenIn , tokenOut ];
const swapTx = await router . swapExactTokensForTokens (
amountIn ,
minAmountOut ,
path ,
await signer . getAddress (),
deadline
);
await swapTx . wait ();
}
Adding Liquidity to a Pool
async function addLiquidityToPool (
signer : ethers . Signer ,
tokenA : string ,
tokenB : string ,
amountA : bigint ,
amountB : bigint ,
minAmountA : bigint ,
minAmountB : bigint
) {
const router = new ethers . Contract ( ROUTER_ADDRESS , ROUTER_ABI , signer );
// Approve both tokens
const tokenAContract = new ethers . Contract ( tokenA , ERC20_ABI , signer );
const tokenBContract = new ethers . Contract ( tokenB , ERC20_ABI , signer );
await ( await tokenAContract . approve ( ROUTER_ADDRESS , amountA )). wait ();
await ( await tokenBContract . approve ( ROUTER_ADDRESS , amountB )). wait ();
// Add liquidity
const deadline = Math . floor ( Date . now () / 1000 ) + 60 * 20 ;
const tx = await router . addLiquidity (
tokenA ,
tokenB ,
amountA ,
amountB ,
minAmountA ,
minAmountB ,
await signer . getAddress (),
deadline
);
await tx . wait ();
}
Router Function Parameters
The exact amount of input tokens to swap
The minimum amount of output tokens to receive (slippage protection)
Array of token addresses representing the swap path
Recipient address for the output tokens
Unix timestamp after which the transaction will revert
Best Practices
Slippage Protection : Always calculate and set appropriate minAmountOut values to protect against unfavorable price movements during transaction execution.
Deadline Management : Set reasonable deadline values (typically 10-20 minutes) to prevent transactions from executing at stale prices.
Gas Optimization : Batch approval and swap transactions when possible to reduce gas costs.