Cowswap Introduction
The first decentralized trading protocol based on limit orders on BSC
Cowswap is the first decentralized trading protocol based on limit orders on BSC. For a long time, AMM occupies the main volume of DEX, but all trades are market price orders, and there is no limit order, so we effectively combine AMM and limit order, so that users can conveniently use limit orders to complete their transaction.
Unlike traditional matching-based exchange, Cowswap does not have a separate matching engine but is based on a trading-driven process. The order placement process does not involve the matching but directly publishes the order to the contract on the chain. At this time, the order will be matched in order from low to high to complete the trade.
The trading process runs from lowest to highest price, regardless of when users place the order.
After the user places an order, the user's order is NFTed, which represents the position the user has. The user can cancel the order or reduce/increase the order limit at any time, or transfer his position to others.
All orders with the same price will form an order pool, and the order owners in the order pool will allocate traded amount in proportion to the order quota.
For example, User A sells 1ETH at 3000USDT/ETH, user B sells 3ETH at 3000USDT/ETH, after A and B complete the order, user C buys 6000USDT of ETH at 3000USDT/ETH; that is, when A gets a turnover of 1500USDT, B gets a turnover of 4500USDT.
A single transaction will charge 0.2% of fee as the protocol fee, and the order owner in the order pool will allocate 50% of the protocol fee in proportion to the order amount.
Since the real-time order of the chain cannot be compared with traditional exchanges, to ensure sufficient liquidity, we combine the liquidity of AMM and limit orders to achieve better trading. We created Cowswap Router to complete this function. Similar to Uniswap Router, Cowswap implements and optimizes Uniswap Router and completes transactions on it. When performing a swap transaction, Cowswap will first check whether there is a cheaper limit price and if so, it will give priority to completing the transaction on the limit order agreement; if there is no suitable limit order, it will be completed directly on AMM; if the transaction amount is greater than the limit order limit, the limit order transaction will be completed first, and the remaining limit will be completed on AMM.

Last modified 1yr ago