Decentralized finance has changed the game and is paving the way to the world’s financial future. There are a lot of advantages of DeFi over traditional finance, but the industry still has a long road ahead to provide a smooth user experience and the speed that centralized systems offer.
One notable product capable of bridging these gaps is being actively developed on Everscale, bringing innovation to the DeFi space. FLEX, or Flash Exchange, is about to set new standards for the speed and throughput of order execution. Its decentralized and distributed limit order book boasts the best UX of the centralized world while being a trustless DeFi product. It makes FLEX a best-of-both-worlds platform.
FLEX — what problem does it solve?
DeFi is experiencing an uptick in interest from large financial institutions and investors. However, the current state of business in DeFi shows low-speed execution, high transaction fees, front-running bots, and inability to use advanced trading strategies due to a lack of fast and efficient on-chain order books.
FLEX is a decentralized exchange with a limit order book, low latency, and guaranteed trade execution. It provides the same trading experience as Binance while implementing an on-chain order book using distributed smart contracts and DeBots.
Everscale is able to linearly scale almost infinitely and has recently been experiencing increased demand from large industry players. Its user base is growing fast. Running on 15 Everscale workchains, FLEX can outperform Binance in terms of execution speed. With 150 workchains it will be able to beat the speed of the BATS exchange. This is unheard of in the world of De-Fi. Combine that with the uncompromised security of Everscale, inability to do front running, and zero risk of single-point failure 24/7 and you get a perfect DEX.
How does it work?
All centralized exchanges such as Binance or NYSE use a CLOB (central limit order book) to operate in microsecond timeframes. The most common mechanism is Price/Time priority. The first orders with the same price are the first orders to match. The FLEX order book is stored on-chain directly in smart contracts (every address in the Everscale network has smart contracts deployed to it).
Currently, one smart contract is used per price level. All orders with the same price are stored in a queue within the smart contract for this price, and all trades are initiated by external messages. The trader whose message gets to a particular smart contract with the trader-selected price first will get their order executed first. There is no matching engine like on Serum, so the entire process is fully decentralized.
Challenges that blockchains are facing in building an order book DEX
Transactions on the blockchain are prioritized by miners/validators based on the gas fee they pay. Whoever offers the best price gets the transaction executed first, which makes front-running or sandwich attacks possible. Bots or arbitrageurs can see all transactions and place their trades before users. That way, users buy assets at a higher price than initially. There is no such problem on Everscale — its design simply makes it impossible.
2. Slow execution speed and complexity
A fast blockchain is not enough to operate an exchange with a DLOB (decentralized and distributed limit order book), as order books are complex and large, requiring time for execution. FLEX solves this using distributed atomic contracts, distributing the load on the order book down to the price of a single pair.
Since limit order books are enormous in size it is very expensive to launch them in smart contract environments.
FLEX, powered by the genius Everscale design, has just implemented a new container along with accompanying features that makes it possible to increase the capacity for order queues. With the FLEX DEX it is possible to log up to 240,000 orders in one queue in a price contract.
- Exchange tokens (Market orders, Limit orders, IoC);
- Order book composition (users can see all the orders in the order book for any particular pair);
- Trade history (user can see detailed history for a trading pair and sort it by Time to find the latest trades);
Market making & liquidity providing
Anybody can be a market maker on FLEX. Maker orders are rewarded with 0.03% of fees.
Liquidity providers can also make money by providing liquidity. Those wishing to participate (50K minimum in USD equivalent) should contact the FLEX team directly. In the future, this process will be automated.
FLEX roadmap & upcoming launch
FLEX is already deployed on the Everscale mainnet. However, it is still in incognito mode, as the developers are tweaking the final configurations and preparing for launch by reviewing the deployment scripts in order to reduce deployment costs. In addition to this, there are a lot of new features for better trading and user experience that are going to be implemented in Q3 & Q4, which can be found in the FLEX roadmap.
An AMA session with the FLEX team will be taking place this week on Everscale’s YouTube channel. Stay tuned to our social media!