DEX Stack
StonkBrokerChain ships with its own native DEX — full deployments of Uniswap v2, v3, and v4. There is no dependency on an external chain or bridge for swaps: liquidity, routing, and trading all happen on StonkBrokerChain, with every fee paid in $STONKBROKER.
The addresses below are the onchain contracts the swap app is built on — integrate against them directly for custom routing, bots, or your own frontend.
Wrapped native
| Contract | Address | Role |
|---|---|---|
| WSTONKBROKER | pending | ERC-20 wrapper for native STONKBROKER (18 decimals) |
Native $STONKBROKER is address(0) and can be pooled directly in v4. v2 and v3 pools are ERC-20/ERC-20, so they route the native coin through the wrapper.
Uniswap v4
v4 uses a singleton PoolManager — every pool lives in one contract — with a lock/unlock callback flow for swaps and liquidity. It supports native currency directly, so you can create pools and trade native $STONKBROKER without wrapping it.
| Contract | Address | Role |
|---|---|---|
| PoolManager | pending | Singleton holding all pools, liquidity and swaps |
| PositionManager | pending | Mint / modify / burn liquidity positions (NFTs) |
| V4Quoter | pending | Off-chain swap quoting (simulate price/output) |
| StateView | pending | Read pool state (slot0, liquidity, ticks) |
| Permit2 | pending | Canonical token-approval contract |
- PoolManager — every pool is a
PoolKeyinside this one contract. Swaps and liquidity changes happen inside an unlock callback, with balances settled at the end (flash accounting). - PositionManager — the user-facing entry for liquidity; positions are ERC-721 NFTs.
- V4Quoter — call off-chain (
eth_call) for exact-in/exact-out quotes, never on-chain. - Permit2 — approve once, then grant signature-based, expiring allowances.
Uniswap v3
Concentrated-liquidity AMM: liquidity providers pick a price range, positions are ERC-721 NFTs, and pools come in four fee tiers. SwapRouter02 also routes v2, so a single router handles both classic and concentrated pools.
| Contract | Address | Role |
|---|---|---|
| UniswapV3Factory | pending | Deploys and registers v3 pools |
| NonfungiblePositionManager | pending | Mint / increase / decrease / collect LP positions |
| SwapRouter02 | pending | Primary swap router for v3 and v2 pools |
| QuoterV2 | pending | Off-chain quotes for v3 swaps |
| TickLens | pending | Batch-reads populated ticks for a pool |
| V3Migrator | pending | Migrate v2 LP into v3 positions |
| Multicall | pending | Aggregated read calls used by interfaces / SDKs |
Fee tiers: 100 (0.01%), 500 (0.05%), 3000 (0.30%), 10000 (1.00%).
Uniswap v2
The classic constant-product AMM, with a flat 0.30% fee and fungible LP tokens. Useful for simple pairs and for tooling that only speaks v2.
| Contract | Address | Role |
|---|---|---|
| UniswapV2Factory | pending | Creates and registers pairs |
| UniswapV2Router02 | pending | Classic add-liquidity / swap router |
Quoting a swap
// viem — exact-in quote through QuoterV2 (v3), simulated off-chain
const { result } = await client.simulateContract({
address: QUOTER_V2,
abi: quoterV2Abi,
functionName: "quoteExactInputSingle",
args: [{
tokenIn: WSTONKBROKER,
tokenOut: TOKEN_OUT,
amountIn: parseEther("1"),
fee: 3000,
sqrtPriceLimitX96: 0n,
}],
});Integration notes
- Quoters are simulation-only. Calling them in a transaction wastes gas and can revert.
- Route native $STONKBROKER through the wrapper for v2/v3; use
address(0)directly in v4. - Approvals for v4 flow through
Permit2, not the router — approve Permit2 once, then sign allowances. - Every address on this page is pending publication. Confirm on the explorer before integrating.