Router types

Emigro abstracts multiple DEX router integrations under a unified interface. Each route type defines how swaps are executed and how calldata is encoded.

Router type
Description
Fee field (request/response)
Typical fee/spacing
Multihop
Calldata hint
Chains available

uniswap-v3

Concentrated-liquidity pools (V3). Uses QuoterV2 for pricing.

feeTier (uint24)

100=0.01%, 500=0.05%, 3000=0.30%, 10000=1.00%

✅ Yes (encoded path with fees)

swapExactInputVia(...) (single hop) or swapExactInputPathVia(...) (multi-hop)

Base (8453)

slipstream (Aerodrome)

Aerodrome Slipstream (V3-style) on Base. Uses tick spacing instead of fee tier; quoter + factory probed.

tickSpacing (int24) in adapter data; UI may show fee % mapping

Spacings: 2≈0.01%, 10≈0.05%, 50≈0.25%, 200≈1.00%

✅ Yes (per-hop spacings)

swapExactInputVia(...) (single hop) or swapExactInputPathVia(...) (multi-hop)

Base (8453)

uniswap-v2

Classic XYK pools via V2 router ABI (getAmountsOut). Multihop via WETH (or configured intermediate).

Fixed pool fee shown as liquidityPoolFeePercent

Commonly ~0.30% (pair dependent)

✅ Yes (path array)

swapExactInputVia(...)

Base (8453)

Notes & mappings

  • V3 vs Slipstream:

    • V3 uses feeTier (uint24).

    • Slipstream uses tickSpacing (int24). Your implementation maps common spacings to display fees:

      • 20.01%, 100.05%, 500.25%, 2001.00%.

  • liquidityPoolFeePercent in responses:

    • V3: derived as feeTier / 10000 (e.g., 5000.05).

    • Slipstream: derived from spacing→fee mapping above.

    • V2: set to a conventional value (e.g., 0.30) or pair-specific if you extend discovery.

  • Multihop: When present, multihop includes hop segments with fromTokenAddress, toTokenAddress, and per-hop feeTier/tickSpacing. The canonical path is always provided for execution.

All this information is for reference only and it's already be returned in the endpoint /public/emigroswap/buildTransaction

Last updated