Flash Exchange - DEX, but better

Flash Exchange - DEX, but better

In March 2021, TON Labs presented FLEX, a new generation decentralized exchange. The solution was created as part of the Free TON DEX Implementation contest.

Before we tell you what is so special about Flash Exchange, let's remember how the classic DEX like Uniswap work.

Such exchanges operate using the Constant Product Market Maker mechanism. Liquidity providers provide tokens to the liquidity pool of the required trading pair and earn a portion of the commissions paid by the exchange participants. The asset price is set using the formula x * y = k, where k is a constant value, x and y are the number of tokens in the liquidity pool.


Let's look at an example with ETH and USDT. We put 2,700 USDT in the liquidity pool of the trading pair and get 1 ETH. The balance of USDT and ETH has changed, the value of ETH has increased. With the help of the classic DEX, the exchange of assets occurs only at the current price. The less liquidity in the pool, the more the asset balance changes after the exchange. As a rule, it is not profitable to exchange large amounts of assets through the DEX in comparison with the classic centralized exchanges that use the order book.


At the November ForkLog conference on "Centralized Exchanges and DEX: Pros, Cons, Differences", the DEX's disadvantages were attributed to poor functionality, in comparison with classic CEX. The situation is changing, because new generation DEXs, such as FLEX, are coming to the market.

A distinctive feature of the TON Labs solution is a distributed order book. Unlike a similar solution on the Solana blockchain, the registry inside the smart contract is not used here - the blockchain itself serves as a distributed database. Each order is a smart contract in the Free TON blockchain. In addition to the code, the contract contains a dictionary of type {key: value} where key is the hash of the trading pair, value is the order price. Search by hash is fast, so using DeBot you can easily find orders of the required trading pair and form the usual order book. When buy and sell orders with the same price appear in the system, they are instantly executed. If there are no assets left in the order, the contract is self-destructed, so only unexecuted orders are in the register.

Using Flash Exchange, a trader places orders at the desired price, just like on classic centralized exchanges. At the same time, there is no humiliating KYC procedure, and at each stage of using the exchange, the assets belong only to the owner. There is no third party that takes some of the money in the form of commissions. Only blockchain gas is paid for transactions.

On the FLEX exchange, trading pairs are created between TON Crystal and TIP-3 tokens. Trading pairs TIP-3 - TIP-3 will also be realized. We will see a working version of Flash Exchange for the main network (as predicted by TON Labs) in the third quarter of 2021.

Subscribe to our Telegram channel so you wouldn't miss the announcement of the launch of the new generation DEX!

Find out more about Everscale
Subscribe to our social networks and stay up to date with the latest news