Introducing V Stable Swap Contract: an order book system on VSYS
In conventional markets exchanges connect buyer and seller directly; this is usually done by an auction based market. In an auction based market, buyers enter competitive bids and sellers submit competitive offers, an “order book based” exchange keeps track of all bids and offers in an orderbook, and tries to match two orders if possible.
The order book helps keep track of the level of interest for a tradable instrument and shows the market depth, and helps traders become more informed about the trades they make by allowing them to analyze current buy and sell activity, and thus increase their likelihood of making a successful trade.
In the blockchain-based DeFi world, projects like V Systems are not meant to replace conventional crypto exchanges but to add diversity. We aim to provide a familiar set of tools for traders, so they can freely practice their accustomed trading strategies.
Our V Stable Swap contract implements the traditional order book method of handling trades, allowing users to place orders against the smart contract which can only be filled at the order’s set price. It is no different than setting a usual “limit” order.
Introducing V Stable Swap
The V Stable Swap smart contract acts as an order book system on V Systems. Orders are placed into the smart contract and acts as a liquidity pool for both sides of the swap. Traders are free to take either side of the trade as long as the pool has sufficient liquidity. The V Stable Swap contract can accept any type of token in the V Systems blockchain, including option tokens created through the V Option Contract (we will discuss more details about V Option in the following posts).
V Stable Swap contract replicates the traditional order book method of handling trades into the DeFi world. Users place orders in the contract which can only be filled at the order’s price.
The difference between V Stable Swap and general order book systems is that V Stable Swap supports creating a limit order on both sides, i.e. users can set both buy and sell limit orders at once, in one transaction.
Creating orders requires the order creator to decide on the price of both sides of the trade and also the fee charged. The fees for the V Stable Swap contract is a set fee and is not calculated as a percentage. The order creator also decides on a maximum and a minimum fee for each swap, setting the maximum allows the order creator to be sure that they get enough fees for providing liquidity, while setting the minimum ensures the fee does not overwhelm any trades.
This feature works well for a simple market maker which provides liquidity for a pair with stable prices. However, for some pairs (like options) whose price will change rapidly, this order book-like swap also protects the user to sell and buy the asset at a fair price (comparable with the AMM logic).
Links for VSYS coin
Other Useful Links