How Lien FairSwap works - A Guide

Lien Protocol is a new DeFi project which produces a truly decentralised stablecoin ($iDOL), backed by a system of derivative tokens, namely, the Solid Bond Token (SBT) and Liquid Bond Token (LBT).


Credits to Jenny from the Blockchain

Lien Protocol has also built a uniswap-like DEX, aptly named FairSwap, as it aims to be a DEX that is truly fair, introducing two new features, front-running prevention through Frequent Batch Auction, and a Dynamic Fee Pricing based on volatility.

With FairSwap :balance_scale:, transactions that are included within 2 adjacent blocks (one batch) will be settled at the same price regardless of their serial/queue position in those blocks. For every batch, there is a hard-coded maximum slippage limit of 5%.

So… what happens when slippage exceeds 5%?
When slippage exceeds 5%, orders that have been placed within the batch will be automatically settled pro-rata based on the respective size of orders.

For the LIEN Initial FairSwap Listing, the Lien team will prepare 20,000 LIEN and $1,000,000 iDOL as liquidity for the FairSwap Pool. FairSwap is an Automated Market-Maker and uses the formula X*Y=K.

How are orders calculated?
Let’s say you’ve placed a buy order for 100 LIEN, and the total buy orders are 1000 LIEN within the same batch, your order will thus represent 10% of the order in that batch. (100/(100+900)=10%)

Since there were 482 LIEN for sale in this batch, and there were orders for up to 1000 LIEN, which exceeds the maximum slippage, you will get 10% of the order (pro-rated), which amounts to 482*10%= 48.2 LIEN.

What happens to the un-processed order?
In this case, your remaining funds that were not used for the transaction will be automatically refunded.

What is the best strategy for the public sale?
Simply put, the best way to get LIEN would be to mint as much iDOL as possible, in order to maximise your representation of the orders in a given batch, since orders are based on the amount that has been contributed per batch divided pro-rata.

How do you mint iDOL? There will be a follow up guide.