Skip to main content

DEX

Mo Chain ships Uniswap V2, Uniswap V3, the Universal Router (v1.6.0), and Permit2 — all deployed from the official audited bytecode. The pair/pool init code hashes are byte-for-byte identical to Ethereum mainnet, so any Uniswap interface fork, SDK, router, or aggregator works by configuring the chain ID and addresses — no SDK hash patching required.

The Universal Router is the canonical swap entrypoint: it aggregates V2 + V3 liquidity in a single execute call and supports gasless ERC20 approvals via Permit2 (sign once, no per-swap approve transaction).

Contracts

ContractAddressExplorer
v2Factory0x35312Ee184d8A4591f1DC74588f71504D07a2c63view ↗
v2Router020xb42a5a1a6eEAA2EAB85CD8854A79a2CB693b08DAview ↗
v3Factory0x72F055bF92844D7F1559FF809eFc3AB1C7Da2928view ↗
v3PositionManager0x529c50075179Ffa1Ab68d4e79bA65c3A56f8339Dview ↗
v3Router0xB26237018cc6E2D3b3E936e452951DB5380d775Dview ↗
v3Quoter0x60C1f3AF252B5086B4030133D44e1fF83c8fC49dview ↗
universalRouter0x37783952bd6AE4D117a6826DF2edB1fcFBAdd2A6view ↗
permit20xae8Db1Ca5C33cE61aa3FC156B0ab036FbF1d5b05view ↗

The Universal Router needs two init-code hashes to compute pair/pool addresses on the fly. They are part of the deployment record (not addresses, so they are not in the table above):

FieldValue
pairInitCodeHash (V2)0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f
poolInitCodeHash (V3)0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54

Tokens:

ContractAddressExplorer
WMO0x4F81110999598D36338414e4778a320B70085779view ↗
tUSDT0x1c4C84dc5931a1A30e4ac50b13a7bd4Be491f12eview ↗
tUSDC0xc2826828AD36d46D0ca7f9D116bceB1F0fd6700Aview ↗
tBUSD0x5cdBc12Ac58fa71e669142bC5D7B2df08876c21Eview ↗

Swap with the SDK (Universal Router + Permit2)

@mochain/sdk wraps the whole flow — best-route quoting (single hop or two hops via WMO), the one-time Permit2 approval, the EIP-712 signature, and the execute call:

import { MoClient } from '@mochain/sdk';
import { parseUnits } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';

const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);
const client = MoClient.testnet({ account });
const { stables } = client.addresses;

// Inspect the route the SDK picked (V2/V3, single or multi-hop).
const route = await client.swap.routeExactIn({
tokenIn: stables.WMO,
tokenOut: stables.tUSDT,
amountIn: parseUnits('1', 18),
});
console.log(route.label, route.amountOut); // e.g. "V3(3000)" 998312...

// Execute via the Universal Router. The SDK approves Permit2 + signs once,
// reuses the allowance afterwards, and applies 0.5% slippage by default.
const { hash, amountOutMin } = await client.swap.exactInUniversal({
tokenIn: stables.WMO,
tokenOut: stables.tUSDT,
amountIn: parseUnits('1', 18),
slippageBps: 50,
});
console.log('swap tx', hash, 'min out', amountOutMin);

Python (mochain) mirrors the same flow:

from mochain import MoClient

client = MoClient.testnet(private_key=PRIVATE_KEY)
stables = client.addresses["stables"]
res = client.swap.exact_in_universal(
stables["WMO"], stables["tUSDT"], 10**18, slippage_bps=50
)
print(res["hash"], res["amountOutMin"])

V2 vs V3

V2V3
Liquidityfull-rangeconcentrated
Fee tiers0.30% fixed0.05% / 0.30% / 1%
Best forsimple poolscapital-efficient LPs

Try it

Open the Swap UI to swap, add liquidity, and inspect pools.

Next steps