Commit 6db359e
committed
feat(monad): enable kyber, openocean, lifi, relay aggregators
Monad mainnet (chain id 143) was wired into the registry without any
aggregator slugs, so `defi --chain monad swap` was returning
"unsupported chain" for every provider. Live API probes against each
aggregator on 2026-05-06 confirmed 4 of 5 already route Monad:
- KyberSwap — slug `monad`, docs explicitly list chain 143;
/monad/api/v1/routes accepts the chain segment
(HTTP 400 = token-level, not chain-level).
- OpenOcean — slug `monad`, present in the supported-chain list
alongside `monad_test` and `143`. /v4/monad/tokenList
returns mainnet tokens.
- LI.FI — chain 143 in /v1/chains as { key:"mon", coin:"MON" }.
- Relay — chain 143 in /chains, depositEnabled=true.
- LiquidSwap — HyperEVM-only by design; intentionally NOT enabled.
Smoke-tested all 4 against the dist build (MON -> USDC, --dry-run):
provider amount_in amount_out notes
----------- ------------ ------------------ ------------------------
kyber 1e18 EEEE 32301 (6dp USDC) real route + router
openocean 1e18 native 33218 real route + router
lifi 1e18 native 32220 real route + router
relay 100e18 native 3225554 real route + router
(1e18 was below
AMOUNT_TOO_LOW gate)
All four return real tx calldata, confirming the chain is fully
routable. The "simulation_failed" result in dry-run is the executor's
expected output when the placeholder wallet has no balance — orthogonal
to chain support.
LI.FI / Relay use chainId numerically inside swap.ts (the slug value is
"auto" by the chains.toml convention documented in chain.ts:6); the
entries are still required so chain.test.ts and the future
slug-parity-style guards see Monad as supported.
Verified:
- pnpm -C ts -r build — synced ts/config -> packages/defi-cli/config
cleanly, dist rebuilt without warnings.
- pnpm -C ts -r lint — 3 packages, tsc --noEmit clean.
- pnpm -C ts -r test — 62 passing; 2 pre-existing failures in
qa/slippage.test.ts:108 reproduce on
origin/main with `git stash` and are
unrelated to chains.toml.
- defi --chain monad status — 4 protocols listed (unchanged).
- 4 swap dry-runs above.
Refs: aggregator-discovery probes captured in conversation
2026-05-06; SSOT chains.toml now matches every other chain that has
LI.FI/Relay enabled.1 parent 4d8bf42 commit 6db359e
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
| 71 | + | |
71 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
0 commit comments