Skip to main content

DEX

WD 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
v2Factory0xCC2BDdb90B7a3430001200d412c9e81c21d102Daview ↗
v2Router020x65b6AAe1d99D8199131afe00bdA5624db17FF4aaview ↗
v3Factory0x4003eacf49AfA4D3bB702F249F0D96837ef31730view ↗
v3PositionManager0x3009B6C676261f8A5fE1a98c60D25D213bd8Eeefview ↗
v3Router0xBA9a65643f923dAeaeB049B9FC8571A2682359Beview ↗
v3Quoter0xb4c5c64D27E7c9fE1f66Fb7051090A01C319eF03view ↗
universalRouter0x1467765A2Eea57D56E991EFA56dEFcBd11C4482Fview ↗
permit20x4978C3093d12D5D2eD7236F585d9f6057C26E18eview ↗

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
WMO0xf386897e4c9cEd315A4a150326D29B1076Ae262aview ↗
tUSDT0xcDf8a9CA63e281478D76b26A9987Af34222cd2c1view ↗
tUSDC0x5D6227cdcbc786B142a961Ae3b8c8a1030867C94view ↗
tBUSD0xdB402aD4b2a42ca1b2A743d5579df41595fC67C1view ↗

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