Milliways
For developers

For developers

For aggregators, trading bots, indexers, wallets and chart sites.

Addresses

Router 0x7EcA43ebEAfA074723df1450Ea9499FCe1A1F66D
Pool factory 0x8837fD98EF4557977a8857434B94D54d549b6C22
Launch factory 0x62a962039E813f184209d9Cc6b8d05f97d784af9
[42] as a token 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE

Pools

Every pool has the classic V2 interface (getReserves, swap, mint, burn, sync and the V2 events).

  • Recipe pools: a 1% fee taken on the [42] side, so classic V2 maths does not fit. Quote with the pool's own functions:
getAmountOut(uint256 amountIn, address tokenIn) → uint256
getAmountIn(uint256 amountOut, address tokenOut) → uint256

Both are exact for a direct swap and include every fee. Find a recipe's pool with poolOf(id) on the launch factory (zero until the recipe is served) or getPair on the pool factory.

Trading through the Router

Recipes on the stove trade only through the Router. It also trades served recipes, with the trader's DISH level discount.

quoteBuy(launchId, quoteIn, trader) → (out, used)
quoteSell(launchId, amountIn, trader) → out
buy(launchId, minOut, referrer, to, deadline)          payable
sell(launchId, amountIn, minOut, referrer, to, deadline)

The tip and the opening-window limit per wallet follow the caller (msg.sender).

Good to know

  • [42] is a real ERC-20 here: move it with transfer. Pools take no native value.
  • A 42chain transaction may make at most 20 calls to the chain's built-in contracts; each [42] token call counts as one.
  • Recipe-pool flash swaps lend [42] only.
  • The fee is read live at every swap: always set a minimum out.

Events

LaunchCreated and PoolSet (launch factory), Buy and Sell (curves), Swap, Sync and LaunchFee (pools).

For full ABIs, contact us on Telegram.