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
v2Factory0x0fB0bA051106d4d0470B612BCE155298B2A1b39bview ↗
v2Router020x9E2D1a442a40660a6d0570014eEfa6F3498A82ABview ↗
v3Factory0x793CA1699A7578B8AE088BE3dbcEbad476fa1cBEview ↗
v3PositionManager0x4c47f69F566D06b4Cf53995D211Fe27899C5AC1aview ↗
v3Router0xa9B3D01E9297aB201BaeA250DB9135fe7465Dc90view ↗
v3Quoter0x487ccc66D246a185717361847bB326910b2019Eaview ↗
universalRouter0xb1c4f326F60F86B115b15094A7ae8FFEa67FdF53view ↗
permit20x8bF7477147bEC6890cbee250492930bF71E61140view ↗

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
WMO0x72b6730F0a7f2D6afF31293c3ba45d7372621F6fview ↗
tUSDT0xE57Cf660175fA6F4a5F2b4F3caC399939Ef4680Aview ↗
tUSDC0x6E78b1e6986b96F929443C25C90971406AF4cC12view ↗
tBUSD0x32Bf4da28898Ce2B2F4A2817b7Ab8A67FF084a70view ↗

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