Documentation

Everything to use, integrate, and build on Libermall DEX.

What is Libermall DEX?

Libermall DEX is a non-custodial decentralized exchange on the TON blockchain. You connect your wallet, you sign every transaction, and your funds never leave your control. Swaps route through Libermall liquidity pools and the Omniston aggregator (STON.fi protocol) — whichever offers a better quote at execution time.

Connect Your Wallet

Click Connect Wallet in the header. Compatible wallets:

  • - Tonkeeper (recommended)
  • - MyTonWallet
  • - OpenMask
  • - Tonhub, Wallet in Telegram, any TonConnect-compatible wallet

Your First Swap

  1. 1. Open /exchange
  2. 2. Choose token to pay (left)
  3. 3. Choose token to receive (right)
  4. 4. Enter amount, quote loads
  5. 5. Adjust slippage (default 0.5%)
  6. 6. Click SWAP, sign in wallet
  7. 7. Wait ~5-10s for confirmation

Omniston Aggregator Routing

When both Libermall pools and Omniston routes are available, we compare them automatically. If Omniston offers more output above a threshold, the route badge switches and the transaction is built via STON.fi protocol. Libermall pool path is always default — Omniston is fallback.

Admin can toggle aggregator routing via Feature Flags (omniston_routing) or restrict to fallback-only mode (omniston_fallback_only).

Staking and Unstaking

Deposit a token, receive a stToken (e.g. stTON, stDOGS). Rewards accrue passively through stToken price - no separate claim. To unstake, burn your stToken; you receive principal + rewards at current rate. See /staking/stake, tabs Stake / Unstake.

Embeddable Swap Widget

Drop the swap into any website with one iframe.

<iframe
  src="https://dex.libermall.com/widget/swap"
  width="520" height="600"
  style="border:none;border-radius:24px;overflow:hidden"
  allow="clipboard-write"
  title="Libermall Swap Widget"
></iframe>

Public API

Open endpoints, no auth. Base: https://dex.libermall.com

MethodEndpointDescription
GET/api/v1/ton-dex/assetsAll supported TON assets
GET/api/v1/ton-dex/assets/pairsValid trading pairs
GET/api/v1/ton-dex/poolsLiquidity pools with reserves
POST/api/v1/ton-dex/swap/paramsQuote for a swap
GET/api/v1/ton-staking/poolsStaking pools with APY
GET/api/site/idoActive IDO campaigns
GET/api/site/bannerSite-wide announcement banner

Token and Pair URLs

SEO landing per pair: /tokens/<pair-slug>, e.g. /tokens/ton-usdt.

Pre-fill swap: /exchange?firstAsset=<address>&secondAsset=<address>

Open Source Stack

  • - Frontend: Next.js 14 App Router, Tailwind CSS, Radix UI primitives
  • - Web3: @ton/core, @tonconnect/ui-react, STON.fi Omniston SDK
  • - State: Redux Toolkit Query
  • - i18n: next-intl (en / ru / ua)

Need help?

Reach out via Telegram or GitHub.