Sports cooking outdoor food
0 Followers
The principle, to put it simply, is to build a pool of funds, with users and this pool of funds as counterparties, to exchange tokens in real time, but this also makes it impossible to implement complex advanced trading tools. Among DEXs, 1inch (the leading trading aggregator) was the first to implement limit order capabilities. The OKX wallet's DEX was also originally built based on 1inch, and later developed its own trading aggregation and splitting algorithm.
Today, the limit order function launched by OKX DEX is actually similar to 1inch in terms of model. Both are off-chain order (Off-Chain Orders) models: that is, orders are created and matched off-chain, and executed on-chain after conditions are met. The taker orders of aggregated DEX users are divided into: interacting with the liquidity pool and matching with maker orders.
When you sell tokens, you generate a fixed-price sell order, which needs to be matched with another user’s buy order before the transaction can be completed. Different users are counterparties.
Limit orders are very close to the user experience of centralized exchanges, and can cover more usage scenarios and superimpose more trading strategies. However, the biggest problem with this model is that the off-chain order pool is opaque and easily manipulated, and is not decentralized enough. The solution provided by 1inch is: 1inch will write the limit orders into the blockchain. The order book is public in the blockchain and can be used by smart contract writers to write contracts to execute limit orders. The identity of the limit order executor is not restricted or specified.