HartiiSwap
HartiiSwap is a standard constant-product AMM (Uniswap V2 semantics) deployed by Hartii on Quai mainnet. Anyone can create a pool for any pair of tokens, add or remove liquidity, swap, and — where a farm exists — stake LP tokens for rewards. It sits beside the HartiiLabs bonding curves: a curve is a token's launch market; a HartiiSwap pool is a normal pair that wallets, bots and aggregators already understand, and that anyone can provide liquidity to.
Live addresses — Quai mainnet (chain 9, Cyprus-1)
| Contract | Address |
|---|---|
| HartiiSwapFactory | 0x002E75653C6189087Eb9E512cE7319eC21140956 |
| HartiiSwapRouter | 0x006B3450cca780066A3A8aA8b508103d25315Ea4 |
| HartiiSwapLens | 0x00295dFCA930646abAC327C9CcB2f4e1E206C5Ec |
WQUAI (shared wrapper, router.WETH()) | 0x006C3e2AaAE5DB1bCd11A1a097cE572312EADdBB |
Pools (read the full list live with the Lens):
| Pool | Pair | Seeded |
|---|---|---|
| QAXE / WQUAI | 0x00052a890c39FF5592Ca88A89924D6083E4E3179 | 2026-09-23 by the treasury at the QAXE curve price: seeded with 20,000 QAXE + 60.84 QUAI, then deepened to ~79,000 QAXE + ~270 QUAI (≈ 541 QUAI TVL) funded from swept protocol fees |
On hartiilabs.com
| Page | What it does |
|---|---|
| /swap | Swap QUAI, WQUAI or any token; direct or via WQUAI, with price impact, slippage and the 0.30% fee shown. For Hartii tokens it also quotes the bonding curve and links there when the curve pays more. |
| /pools | Every pool (read live via the Lens) with reserves and TVL, plus your positions. |
| /pools/add | Create a pool or add to one. First deposits get a Match curve price button for Hartii tokens. |
| /pools/remove | Withdraw 25/50/75/100% or an exact LP amount. |
| /farms | Stake LP in funded farms. |
| Token page | A HartiiSwap pool card: the live pool, or Create the first pool. |
| Portfolio | Your LP positions and their underlying amounts. |
The numbers that matter
| Swap fee | 0.30% of the input, paid to liquidity providers |
| Protocol fee | 1/6 of the LP fee growth (≈ 0.05% of volume), minted as LP tokens to factory.feeTo() — the Hartii treasury — on the next liquidity event. Set on at deploy. |
| Locked liquidity | The first MINIMUM_LIQUIDITY = 1000 LP units of every pool are minted to address(0) forever |
| Price formula | amountOut = amountIn·997·reserveOut / (reserveIn·1000 + amountIn·997) |
| LP token | HartiiSwap LP / HSLP, 18 decimals, EIP-2612 permit |
How it differs from Uniswap V2 (read this if you've integrated V2 before)
- Pairs are created with plain
CREATE, notCREATE2. On Quai aCREATE2address lands in the Cyprus-1 zone only about 1 time in 256 without salt grinding; contractCREATEis proven zone-valid. Consequence: you cannot compute a pair address from an init-code hash. Always callfactory.getPair(tokenA, tokenB). The router does the same internally. - "ETH" means QUAI. Router functions keep V2's names (
addLiquidityETH,swapExactETHForTokens, …) so existing tooling works;router.WETH()returns WQUAI. - Solidity 0.8.20. Checked arithmetic replaces SafeMath; the timestamp delta and price
accumulators are explicitly
uncheckedexactly where V2 relies on wrap-around. One visible effect: minting into a never-funded pair reverts with a Panic (0x11) rather than a text message. - Two-step
feeToSetter(proposeFeeToSetter→acceptFeeToSetter). The flash-swap callback ishartiiSwapCall(sender, amount0, amount1, data).
What nobody can do
There is no owner of pooled funds, no pause, no upgrade and no blacklist. The factory's only
privileged powers are setFeeTo (where the 0.05% protocol share goes, or turn it off) and handing
that role over — held by the treasury. Liquidity providers can always withdraw their share.
Pages
- Contracts — factory, pair, router, Lens: every function, event and revert.
- Liquidity — creating a pool, first-deposit pricing, adding and removing, fees and impermanent loss, the protocol fee.
- Integrate — runnable
quaiscode for quoting, swapping, providing liquidity and reading pools. - Farms — LP incentives with
HartiiFarm.
HartiiLabs tokens can trade on both their bonding curve and a HartiiSwap pool; see Pricing a token for how to price each venue.