Overview
What is Lane
One request in, one ready-to-sign transaction out, at the best price across every pool on Elysium.
Quickstart
Get a best-price quote in one call
curl "https://api.lane.markets/v1/quote?in=HYPE&amount=1000000000000000000 &out=0x7D29d8047B905000459c0E80c34a26CeedcB47b2&recipient=0xYou"
The problem
Liquidity on Elysium is fragmented:
- Many venues. On mainnet there are already 18 Uniswap V3 factories, 6 V2 factories and 14 Uniswap v4 PoolManagers, with more than 8,600 pools. More AMMs (Nest, Aero, Hybra, Ramses) are announced; the router already supports their pool types. See Elysium venue research.
- Two (or more) wrapped HYPEs. Different deployments use different WHYPE contracts, so the same pair can exist in several unconnected "ecosystems".
- Launchpads. Hundreds of new tokens trade on bonding curves first, then graduate into V3 or V4 pools.
- Hostile tokens. Fake USDC/WHYPE, honeypots, and tokens with transfer taxes.
Swapping well by hand means checking every venue, every fee tier and every intermediate token, then splitting a large trade across pools. Wallets, bots and apps don't want to rebuild that.
What the router does
| Step | What happens | Where |
|---|---|---|
| Index | Keeps the live state of every pool in memory, updated each block (and rewound on reorgs) | api/src/indexer.ts |
| Route | Searches paths of up to 3 swaps, plus a free WHYPE↔WHYPE rewrap, across V2/V3/V4 | api/src/router.ts |
| Quote | Quotes the top 20 candidates exactly on-chain in one call, and tries splitting across up to 3 pool-disjoint routes | api/src/plan.ts |
| Check | Probes tokens for honeypots and taxes, flags impersonators, and simulates the exact transaction from the user's address | api/src/probe.ts, api/src/server.ts |
| Execute | One Executor contract calls the pools directly, takes a small fee on the output and enforces minOut | contracts/src/Executor.sol |
On top of swaps:
- Limit orders and DCA, escrowed in the
OrderBookand filled by a keeper at market price, never below your floor. - Live prices over a WebSocket, a portfolio valued in USD, and history.
- Liquidity management on concentrated-liquidity pools, and share cards for X.
Who it is for
| You are | Use |
|---|---|
| A trader | The Lane app at lane.markets, built on this API |
| A wallet or app | GET /v1/quote: you get tx and approval, the user signs |
| A bot or agent | The same API with a partner key for a higher rate limit, plus /v1/ws/prices |
| A launchpad | Pre-graduation tokens are routed through the curve when it pays more; graduated pools are picked up automatically |
What makes it different
- No router contracts in the path. The Executor calls pools directly (V2
swap, V3swap+ callback, V4unlock), so one contract covers every factory, including ones nobody configured. Factories are auto-discovered from on-chain events. - Exact quotes, not estimates. The off-chain math only ranks candidates. The final number comes from running the real swaps on-chain in a reverting
eth_call. - Every transaction is simulated from the sender's address before it's returned. If it would fail, you get
simulation.ok = falseand awarninginstead of a transaction that silently reverts. - Non-custodial and stateless. The Executor never holds funds between transactions; fees are forwarded in the same transaction. Orders can always be cancelled by their owner.
- Gas-aware. Routes and splits are compared on output net of gas, so a 3-hop route that wins by 0.01% loses once its extra gas is counted.
Where your tokens go
- You send
tokenIn(or HYPE) to the Executor in the swap transaction. - The Executor swaps through the pools of the route. Each pool sends its output to the next pool or back to the Executor.
- The Executor takes
feeBpsof the output, sends it to the fee recipient, and sends the rest torecipient, all in the same transaction. - If the recipient would receive less than
minOut, the whole transaction reverts and nothing moves.