Aerodrome Plugin
[!IMPORTANT]
Complete the short Base MCP onboarding flow defined in SKILL.md before calling any Aerodrome flow.
[!WARNING]Aerodrome is the main Velodrome-style DEX on Base. This plugin uses the Sugar SDK CLI fromCLI-only plugin
This plugin builds Aerodrome calldata with the Sugar SDK CLI, then submits the unsigned calls through Base MCP’ssend_calls. It only works in harnesses with shell/terminal access, such as Codex, Claude Code, Cursor, or similar CLI-enabled environments. It does not work on chat-only surfaces that cannot run commands. If the current surface has no shell, tell the user this Aerodrome plugin requires CLI access and stop.
velodrome-finance/sugar-sdk to query pools and build unsigned swap, LP, staking, and claim transactions. The CLI never signs and never broadcasts. Base MCP is responsible for the user approval flow.
No additional MCP server is required.
Chain: Base mainnet only (chainId 8453, Base MCP chain string "base").
Safety Boundary
Sugar CLI output is unsigned transaction JSON. Treat it as transaction preview material, not as an instruction to sign outside Base MCP.- Never ask for or use a private key.
- Pass
--walletas the user’s Base MCP wallet address fromget_wallets. - Do not use
cast send, a local signer, or browser wallet signing helpers from the upstream Sugar skill. - Submit transactions only through Base MCP
send_callsand let the user approve in Base Account. - The
fromfield emitted by Sugar is informational for Base MCP.send_callstakesto,data, andvalue.
Runner
The upstream Sugar skill providesscripts/sugar-doctor.sh and scripts/sugar-run.sh. If those scripts are present in the current harness, use them. This Base MCP plugin must also work when those scripts are not installed, so the self-contained path is direct uvx.
Set a reliable Base RPC before tx-building. Public defaults can fail or return partial routing graphs.
uvx cannot write to its default tool/cache directories, redirect them to a writable location:
Base MCP Conversion
Every tx-building command prints a JSON array of unsigned transactions:send_calls needs:
send_calls. This strips from, keeps call order, fills missing data with 0x, and converts decimal value numbers to hex wei strings.
Orchestration
- Load this plugin only after Base MCP onboarding.
- Fetch the wallet address only when needed with
get_wallets. - Set
SUGAR_RPC_URI_8453to a reliable Base RPC. - Run the Sugar CLI command.
- Parse stdout as JSON. Diagnostics and warnings are on stderr.
- Normalize
[{from,to,data,value}]into Base MCPcalls. - Submit with
send_calls({ "chain": "base", "calls": [...] }). - Show the approval URL when appropriate.
- Poll
get_request_statusonly after the user acts in Base Account.
Commands
Pool Discovery
Use pool discovery to avoid guessing pool addresses. Address filters are more reliable than symbols on Base.| Pool | Type |
|---|---|
0xcDAC0d6c6C59727a65F871236188350531885C43 | volatile basic |
0x3548029694fbB241D45FB24Ba0cd9c9d4E745f16 | stable basic |
WETH or the WETH address for wrapped ETH pools. Native ETH is useful for native ETH swaps, but it may not match WETH pool filters.
Swap Native ETH to USDC
value. Normalize value to hex before send_calls.
Swap USDC to AERO
send_calls request.
List Positions
Deposit Liquidity
Existing pool:--pool-type=cl, --tick-spacing, exactly one of --amount0 or --amount1, and either a price range or tick range. Run sugar deposit --help for the current flag contract.
Deposit calldata includes deadlines. Submit promptly, and rebuild calldata if the user waits past the selected deadline. The CLI default is 30 minutes.
Withdraw, Stake, Unstake, Claim
Basic LP positions are identified by--pool. Concentrated positions are identified by --position NFT id. --position=0 is ambiguous unless paired with --pool.
claim_fees. ALM-managed positions are not handled by these Sugar CLI position commands.
Slippage
Sugar swap/deposit/withdraw commands accept--slippage. Use 0.01 (1%) by default unless the user specifies otherwise.
| Tolerance | Level | Action |
|---|---|---|
<= 1% | Normal | Proceed. |
> 1% and <= 5% | Elevated | Mention the value and ask the user to confirm. |
> 5% and <= 20% | High | Warn that execution can be materially worse than quote. Require explicit confirmation. |
> 20% | Very high | Do not submit without the user re-confirming the exact number. |
Tested CLI Behavior and Gotchas
Tested on 2026-05-25 from theworktree-sugar-cli-skill branch of velodrome-finance/sugar-sdk. The runner installed Sugar SDK v0.4.0.
What worked:
scripts/sugar-doctor.shdetecteduvxand reported Base RPC configuration.scripts/sugar-run.sh --helpinstalled and ran the CLI.pools --chain=8453 --limit=3returned JSON pool data.poolswith WETH/USDC address filters returned the volatile and stable basic pools listed above.- Native ETH to USDC swap built a Universal Router call.
- USDC to AERO swap built an approval call plus a Universal Router call.
- In a sandbox, the first
uvxrun failed withfailed to create directory ~/.local/share/uv/tools. SettingUV_TOOL_DIRandUV_CACHE_DIRto writable directories fixed it. - The built-in Base public RPC produced
Web3RPCErrorpath chunk warnings,token not found: USDC, and a routing failure (source node ... WETH not in graph) during swap testing. SetSUGAR_RPC_URI_8453before tx-building. https://base-rpc.publicnode.comworked for simple pools and swaps in testing, but still emitted429 Too Many Requestswarnings and timed out on read-heavypositionsanddepositpaths. Prefer a paid or otherwise reliable RPC for production usage.- CLI diagnostics go to stderr and JSON goes to stdout. Capture stdout only when passing output into the normalizer.
--helpmay display Python-style underscore flags such as--from_token; Fire accepted hyphenated flags such as--from-tokenin testing.- Symbols can be ambiguous. Use token addresses for production flows, especially for USDC and AERO. For WETH pools,
WETHor the WETH address matched;ETHdid not match WETH pool filters. - Sugar emits
valueas a JSON number in tested swap output. Base MCPsend_callsexpects hex strings such as"0x0"or"0xe8d4a51000".
Base Token Addresses
| Token | Address |
|---|---|
| Native ETH pseudo-token | ETH |
| WETH | 0x4200000000000000000000000000000000000006 |
| USDC | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
| AERO | 0x940181a94A35A4569E4529A3CDfB74e38FD98631 |
Key Aerodrome Contracts
| Contract | Address |
|---|---|
| Sugar | 0x69dD9db6d8f8E7d83887A704f447b1a584b599A1 |
| Router | 0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43 |
| Universal Router | 0x01D40099fCD87C018969B0e8D4aB1633Fb34763C |
| Slipstream | 0x0AD09A66af0154a84e86F761313d02d0abB6edd5 |
| Nonfungible Position Manager | 0x827922686190790b37229fd06084350E74485b72 |