Customers
Swap and pools
Swap synthetics, provide liquidity, and claim fees from the Uruk app.
Swap and pools
Trading on Uruk happens in constant-product pools (x*y=k). You can swap against them or provide liquidity and earn swap fees, all from the app.
Swap
- Open Swap.
- Choose the pair, e.g. sell USDC to receive sBTC (or the reverse).
- The quote shown is the expected output net of the pool fee. Your slippage setting caps how much the price may move before the swap fails.
- Sign and submit. The swap executes on-chain as
swap_exact_in.
Things to know:
- Fee tier per pool:
5= 0.05% (stable pairs),30= 0.3% (major pairs),100= 1.0% (exotic pairs). The pool page shows which tier you're trading in. - Price impact cap: a single swap may not move a pool more than 1%. Split very large orders.
- KYC required: your attestation is checked on-chain on every swap.
Provide liquidity
- Open Pools and pick a pool (e.g.
SBTC_USDC). - Deposit both tokens in the current pool ratio. You receive LP shares.
- Swap fees accrue to LPs continuously. Your share is claimable from the pool page.
- The first deposit into a new pool burns a tiny amount of shares (
MIN_LIQUIDITY) to prevent inflation attacks. The UI does this for you. - Withdrawing returns your proportional share of both reserves, plus settled fees.
- Pool pages show your position, claimable fees, and the pool's volume.
Where pools come from
Pools are created by the DAO (create_pool proposal), not by users. New synthetics go live once a DAO proposal registers the market and the pool exists.
Under the hood
| Concept | On-chain |
|---|---|
| Swap | LiquidityPool.swap_exact_in(trader, pool_id, a_to_b, amount_in, min_out, partner_id) |
| Quote | quote(pool_id, amount_in, a_to_b): includes the fee |
| Mid price | get_price(pool_id, a_to_b): reserve ratio, no fees |
| Deposit | add_liquidity(provider, pool_id, amount_a, amount_b, min_shares) |
| Withdraw | remove_liquidity(provider, pool_id, shares, min_a, min_b) |
| Claim fees | claim_fees(provider, pool_id) |
Building an integration instead? Partners use the SDK (SDK reference). buyAsset / sellAsset / swap call the same swap_exact_in with partner attribution. Contract addresses are on the Contract addresses page.