ETH$3,420
Trading/routing

Venues & routing

The append-only adapter registry, the live dexId table, and how a Route encodes a path across V2, V3, V4 and curve venues.

The trade manager knows nothing about any DEX. It resolves route.dex — a uint8 we call a dexId — through a registry of adapter contracts, and forwards the trade. Each adapter owns one venue’s specifics: router interfaces, approvals, WETH wrapping, callback plumbing, curve pre-checks. Adding a venue is one adapter deploy plus one owner transaction. No new manager, no re-approvals, no subgraph redeploy.

#The registry, and why it is safe to own

  • Append-only. addAdapter(dexId, adapter) reverts with AdapterExists if that id is already bound. A dexId can never be re-pointed, so a route carries exactly the trust assumptions it had the day it was registered.
  • Pause is the only mutable bit. setDexPaused can disable a venue; it cannot redirect one. The worst an owner can do to an existing route is turn it off — reversibly.
  • Adapters are custody-free. They never see a user allowance and never hold funds between transactions. Only the manager is ever approved.
  • Adapters bind their manager immutably. A new adapter cannot be pointed at an old manager, and an old adapter cannot be reused by a new one.

#The dexId table

Live on mainnet, none currently paused.

dexIdVenueAdapterAddressStatus
0Uniswap V2UniswapV2V3Adapter0x5e4235F2Ea34a6Active
1Uniswap V3UniswapV2V3Adapter0x5e4235F2Ea34a6Active
2Uniswap V4 (native-ETH pools)UniswapV4Adapter0x2017ddD2B2A5C4Superseded by 7
3Flap curveFlapAdapter0x794704d7F2Bb11Active
4Virtuals curveVirtualsAdapter0x81D44e68fE4233Active
5SushiSwap V3SushiV3Adapter0xcA9361189161BeActive
6Stock-quoted V4 poolsStockPairV4Adapter0x5bD5ce5e1912e2Superseded by 7
7Multi-hop V4 (general executor)MultiHopV4Adapter0xF0e2Fe454cDd13Active
“Superseded” does not mean removed
dexIds 2 and 6 stay registered and executable forever — that is what append-only means. The router simply stops producing new routes for them, because dexId 7 is a strict superset that handles native-ETH V4 pools, ERC-20-quoted pools, and chains of both. Existing integrations keyed on 2 or 6 keep working.

#The Route struct

The tuple layout is frozen and ABI-compatible back to earlier managers. What the fields mean belongs to the adapter the dexId routes to — a new venue that needs different parameters encodes them into v3Path as opaque bytes rather than changing the struct.

solidityITradeAdapter.Route
struct Route {
    uint8     dex;          // the dexId, resolved through the adapter registry
    bytes     v3Path;       // V3: packed path. Others: adapter-defined payload
    address[] v2Path;       // V2: WETH-anchored token list
    uint24    fee;          // V4 pool fee
    int24     tickSpacing;  // V4 only
    address   hooks;        // V4 only
}
dexIdv3Pathv2Pathfee / tickSpacing / hooks
0WETH-anchored token list
1, 5Full packed V3 path (WETH-anchored)— (tiers live in the path)
2V4 pool key; the pool is always (native ETH, token)
3— (the Portal keys on the token)
4WETH↔VIRTUAL leg (V3)WETH↔VIRTUAL leg (V2, when non-empty)
6The quote leg: packed V3 pathV4 pool key of (sort(quote, token), fee, tickSpacing, hooks)
7abi.encode(MultiHopPath) — the whole route as opaque bytes— (every key parameter lives inside the payload)

#dexId 7 — the general V4 executor

One optional Uniswap V3 leg (WETH↔quote) followed by an ordered chain of N Uniswap V4 hops, all inside a single PoolManager unlock. It exists because the most interesting pools on this chain are not quoted in ETH: a Doppler-launched memecoin whose deep pool is priced in a Robinhood stock token, which itself only trades on V4.

texta real shape this executes
ETH ──[V3]──▶ USDG ──[v4, 0.3%]──▶ TSLA stock ──[v4, Doppler dynamic fee]──▶ TSLA-Inc meme
soliditythe payload, abi.encoded into Route.v3Path
struct V4Hop {
    address currency0;   // sorted; address(0) = native ETH
    address currency1;
    uint24  fee;         // 0x800000 marks a dynamic-fee pool — pass it verbatim
    int24   tickSpacing;
    address hooks;
}

struct MultiHopPath {
    bytes    v3Leg;      // empty = no V3 leg
    V4Hop[]  hops;
}
  • Direction is derived, not declared. Hops carry no direction bit; the adapter works out zeroForOne from the currency it currently holds and reverts BrokenChain() if a hop does not connect or the chain ends off-target. Buys run the V3 leg then the hops; sells run the hops then the V3 leg.
  • Flash accounting. Intermediate currencies net to zero inside the unlock and are never transferred — one settle at the start, one take at the end.
  • Native ETH is a first-class chain currency. A buy with no V3 leg enters natively when the first hop is ETH-keyed, which is why dexId 7 fully supersedes dexId 2.
  • Partial fills revert, per hop. Any hop that does not fully consume its input reverts with a typed PartialFill() rather than over-settling into V4’s undecodable CurrencyNotSettled. That also rejects input-skimming hooks. Either way the trade is atomic.

#Hooked pools and the trust boundary

The hook allowlist is off-chain, on purpose
The adapter accepts any hook address in a hop key — encoding an allowlist on-chain would mean a new adapter deploy for every new hook. The route finder enforces the allowlist (Doppler only, today), and the manager’s minAmountOut is the economic backstop: a hostile hook can make a trade worse, and the slippage floor rejects it. If you build your own routes against this adapter, that check is yours to make.

Doppler’s decaying anti-snipe fee and creator cut ride afterSwap, and the PoolManager’s returned delta is already net of them, so exact-input chaining stays exact and simulation prices the whole chain correctly. Dynamic-fee pools carry fee = 0x800000 in the pool key — pass it verbatim, byte-for-byte, or the key will not match. A V4 pool id is keccak256(abi.encode(PoolKey)), which is a useful way to verify your key off-chain before you submit.

#Bonding-curve venues

dexIds 3 and 4 reach two pre-graduation curve venues on this chain (Flap and Virtuals), so a token that has not yet listed on a DEX is still tradeable from the terminal with the same ABI, the same fee, and the same slippage guarantees. Curve buys that cross a graduation threshold hand unconsumed ETH back; the manager forwards it and emits EthRefunded.

note
hood.dev’s own launches never appear here. They are real V3 pools from block one, so they route through dexId 1 or 5 like any other pool — there is no curve stage to route around.

#Adding a venue

The path is deliberately narrow, and it is the same one dexIds 6 and 7 took: write an adapter extending TradeAdapterBase, with no admin surface and immutable addresses; test it against mocks and then against the live venue on a mainnet fork; deploy and addAdapter the next free id; verify on Blockscout. Ids are never reused and never renumbered — the frontend, the subgraph and the launch registry all key on these numbers.

chain 4663·on-chain values read 2026-07-29·Blockscout