How to Build an Exchange App on the TON Blockchain
Build a crypto exchange app on TON, the blockchain behind Telegram Mini Apps, with TON Connect wallets, Jetton tokens and an AMM swap engine.
On this page
Short answer
An exchange app on the TON blockchain lets users swap Toncoin and Jettons through a wallet they connect with TON Connect. You build it as a Telegram Mini App or a standalone app, route trades through an AMM pool or an existing TON DEX, and follow Telegram's rule that crypto features in Mini Apps must use TON.
What is an exchange app on the TON blockchain?
An exchange app on the TON blockchain is an application that lets people buy, sell or swap crypto assets that live on TON, The Open Network. Users connect a TON wallet, pick two assets, and the app moves the trade through a smart contract or a liquidity pool instead of a central company holding the funds.
TON is the blockchain that Telegram's team originally created and later handed to an open community of developers. Its native coin is Toncoin, and its token standard is called Jettons, which work like ERC-20 tokens on Ethereum. An exchange app on TON can run as a standalone website, a mobile app, or a Telegram Mini App that opens inside the Telegram chat app.
Most TON exchange apps are swap apps: they trade one asset for another at a price set by a pool. Some add limit orders, fiat on-ramps, or a simple buy page for Toncoin. The app itself never needs to hold user funds if trades settle through contracts, though some apps do hold funds in custody and then carry extra legal duties.
Why build an exchange app on TON?
TON is worth considering because it puts an exchange inside the app where its users already spend time. Telegram Mini Apps open inside Telegram, so a user can reach your exchange from a chat or a bot without installing anything new. That built-in distribution is the main reason teams pick TON over a chain with no home app.
Telegram's own rules also push builders toward TON. Since January 2025, a Mini App that creates, stores or moves blockchain assets must use TON, and its wallet connections must use TON Connect. If you want your exchange to live inside Telegram, TON is the only chain that fits the rules.
TON is built for fast, low-cost transfers, which suits an exchange that handles many small trades. Blocks are produced in seconds, and fees stay low enough that a swap of a few dollars still makes sense. The trade-off is a smaller developer community than Ethereum or Solana, so expect fewer ready-made code examples and more reading of TON's own docs.
What parts does a TON exchange app need?
A working exchange app has six parts. Each one can be built in-house or bought from a provider, but skipping any of them leaves a gap users notice fast.
| Part | What it does | TON option |
|---|---|---|
| Wallet connection | Lets users sign in with a wallet and approve trades | TON Connect |
| Swap engine | Sets prices and moves assets between buyer and seller | AMM pool contract |
| Tokens | The assets users trade | Jettons and Toncoin |
| Price data | Shows fair prices and warns about bad rates | Price feed or pool price |
| Indexing | Reads balances, history and trade events fast | TonAPI or TON Center |
| Support and safety | Handles stuck trades, scams and account recovery | Help desk and monitoring |
Start with the wallet connection and the swap engine. TON Connect is the standard way to link a wallet: the user taps a button, approves the connection, and your app can then ask the wallet to sign each trade.
For the swap engine, most new apps route trades through an existing TON DEX such as STON.fi or DeDust instead of writing their own pool contracts, which saves months of audit work. A DEX development partner can help if you decide to build the engine yourself.
Which exchange model fits TON best?
Four models work on TON, and the right one depends on who your users are. A simple swap app and a pro trading app are different products, even though both run on the same chain.
| Model | How it works | Best for |
|---|---|---|
| AMM swap | Price comes from a pool of two assets | Simple swaps inside a Mini App |
| Order book | Buyers and sellers post prices | Larger trades and active traders |
| Aggregator | Routes a trade across several pools | Best price on big swaps |
| OTC desk | Trades agreed privately, settled on-chain | Large single trades |
For a first TON exchange app, the AMM swap model is the usual pick. It needs no order book, works well inside a small Mini App screen, and can reuse the pools of an existing TON DEX. An order book fits a later version aimed at active traders, and it needs market makers to keep prices tight. An aggregator is a good second step once your users ask for better prices on larger trades.
If you want the full build picture first, read our guide on how to build a decentralized exchange app. The steps there apply to TON too, with TON Connect and Jettons in place of the Ethereum tooling.
How to build a TON exchange app in 6 steps
Build in this order, and test each step on TON testnet before moving on. A step that works on testnet still needs a fresh check on mainnet, but testnet catches the cheap mistakes early.
- Pick the model and the audience. Decide whether you are building a simple swap app, a pro trading app or a buy page, and whether it lives in Telegram or on the open web.
- Set up the TON toolchain. Use the @ton/ton library for blockchain calls, TonAPI for indexed data, and a contract toolkit such as Acton or TON Blueprint for any contracts you write.
- Connect wallets with TON Connect. Add the TON Connect button, verify the wallet with ton_proof on your server, and never trust a wallet address the client sends without checking it.
- Wire up swaps. Route trades through an existing TON DEX pool first, show the price and the fee before the user signs, and test every swap path on testnet.
- Add safety checks. Set slippage limits, warn on unusual prices, rate-limit trades, and log every trade so support can trace a stuck swap.
- Launch small, then widen. Start with one pair, invite a small group of testers, fix what breaks, and add pairs only after the first pair trades cleanly.
Following these steps, a simple swap app can run on testnet in weeks, though audits, licences and liquidity take longer. Chain-specific build guides, such as our guide to building an exchange on Sui, follow the same six-step shape.
How do wallets, Jettons and payments work on TON?
A user connects a wallet through TON Connect, the standard protocol for TON wallets. Your app shows a connect button, the user approves in their wallet, and your server checks the ton_proof signature to confirm the user really controls that wallet address. Never accept a wallet address from the front end without that check.
Jettons are TON's fungible token standard. Each Jetton has a master contract and a wallet contract per holder, so your app reads a user's Jetton balance by querying that wallet contract. Toncoin itself is the native coin and pays the network fees for every transaction, so users always need a small Toncoin balance to trade. If you plan to issue your own Jetton, check what TON token development costs first.
Payments have one rule that catches new builders. Inside Telegram, digital goods and services must be paid for in Telegram Stars, the platform's own currency, while TON or Jetton payments fit physical goods and other flows outside that rule. Check Telegram's current rules before you price anything, because the line between digital and physical goods decides which payment rail you can use.
Example (hypothetical): a small TON swap app's first month
Example (hypothetical): a team launches a swap app inside a Telegram Mini App with one pair, Toncoin to a stablecoin Jetton. In its first month it handles 2,000 swaps with an average size of 40 Toncoin, so total volume is 80,000 Toncoin.
The app charges a 0.3% fee, which comes to 240 Toncoin for the month. Of that, 0.2% (160 Toncoin) goes to the liquidity providers who funded the pool, and 0.1% (80 Toncoin) stays with the app. After 25 Toncoin of running costs for servers and indexing, the app keeps 55 Toncoin.
The lesson is that volume matters more than the fee rate. At 0.3%, the app needs thousands of swaps a month to cover even small costs, which is why most TON swap apps put their effort into reaching Telegram users rather than raising fees.
What are the common mistakes?
Most failed TON exchange apps fail on the same few points. Check your app against this list before launch:
- Building for another chain inside a Telegram Mini App. Telegram's rules require TON for crypto features in Mini Apps, so an app wired to another chain will be blocked.
- Trusting the wallet address from the front end. Always verify ton_proof on the server, or anyone can claim any wallet.
- Showing a price with no slippage warning. A user who signs a swap without a price limit can lose money on a fast-moving pool.
- Writing your own pool contracts first. Reusing an audited TON DEX saves audit time and avoids the most expensive bugs.
- Forgetting the Stars rule. Pricing digital goods in Toncoin inside Telegram breaks the platform rules and can get the Mini App removed.
- Launching with no liquidity. A swap app with an empty pool gives terrible prices, and users leave after one bad trade.
Key takeaways
- TON is the only chain that fits Telegram's rules for crypto Mini Apps.
- TON Connect is the standard wallet link; verify ton_proof on the server.
- Jettons are TON's token standard; Toncoin pays network fees.
- Start with an AMM swap routed through an existing TON DEX.
- Digital goods inside Telegram must be paid in Stars, not Toncoin.
Frequently asked questions
Do I need a licence to run an exchange app on TON?
It depends on where you operate and whether you hold user funds. A non-custodial swap app faces lighter rules in many places than a custodial exchange, but the rules differ by country. Get legal advice for your market before you launch.
What is the difference between Toncoin and a Jetton?
Toncoin is TON's native coin and pays the network fees for every transaction. A Jetton is a token issued by a smart contract on TON, like an ERC-20 token on Ethereum. Your app trades both, but users always need some Toncoin to pay fees.
Can I build a TON exchange app outside Telegram?
Yes. You can ship it as a website or a mobile app and connect wallets with TON Connect the same way. You lose Telegram's built-in distribution, but you are free of the Mini App rules, including the Stars requirement for digital goods.
Do users need Toncoin to trade on my app?
Yes, a small amount. Every transaction on TON costs a fee paid in Toncoin, including a Jetton swap. Warn new users before their first trade so they do not get stuck with a Jetton balance and no Toncoin to move it.
Should I write my own swap contracts?
Usually not for a first app. Routing trades through an existing TON DEX gives you audited pools and instant liquidity. Write your own contracts only when you need a feature no existing pool offers, and budget for a full audit.
What is TON Connect?
TON Connect is the standard protocol that links a TON wallet to an app or a Mini App. The user approves the connection in their wallet, and your server can check a ton_proof signature to confirm the user controls that wallet address.