Andre's new idea: non-destructive liquidation based on AMM
Editor's Note: This article comes fromDecentralized financial community (ID: China_DeFi), reprinted by Odaily with authorization.
Editor's Note: This article comes fromDecentralized financial community (ID: China_DeFi)Decentralized financial community (ID: China_DeFi)
, reprinted by Odaily with authorization.
Is it a loss or a gain to become an LP of Uniswap? "
collateral
I personally have reservations about Andre's idea.
What is valuable about this article is that it makes me pay more attention to the significance of derivative instruments: obviously, the financial instruments dealing with fundamental risk in the industry are insufficient
First, let's look at the current liquidation situation. There are two core issues;
collateral
debt
In the simplest terms, liquidation occurs when debt > collateral. So let's use a value of 100% for simplicity.
If you provide 1 ETH as collateral (and for the sake of this article, assume 1 ETH = 1000 USD), you can borrow 1000 USD.
If the value of 1 ETH drops to 900 USD, you face liquidation because debt > mortgage.
Clearing mechanisms can vary significantly between different systems.
In a margin based system (or any system with borrowed (debt) assets), it can simply close the position, return $1000 and collect 1 ETH. In a system where the debt is outside the system, there needs to be an incentive for the liquidator to pay the debt on your behalf. In this case, the liquidator will pay off your $1000 debt and claim 1 ETH.
As can be seen above, it does not make economic sense for a liquidator to pay off a $1000 debt for $900 ETH. Therefore, most systems use higher guarantee values. Typically, the system is seen to have 150% collateral value. This means that 1 ETH is treated as 0.6667 ETH for purposes of calculating USD value, but 1 ETH for liquidation purposes. So you can borrow $667 worth of debt for 1 ETH.I never liked reckoning.
Mainly because they're annoying. You have to create individual locations for each user, and each location needs to be iterated and calculated. I may be a pure chainist when it comes to smart contract development. I hate being forced to do things off-chain. So it annoys me to build an on-chain solution that relies on off-chain systems. So for the last year I've struggled with how to fix position based liquidation.
The first design I tried was a debt based system similar to how yearn tokens work. The Yearn token is agnostic from the standpoint of any particular user, managing funds as an organization rather than as an individual. The same can be done with debt if everyone is given the same fixed collateral ratio. However, from a user experience point of view, this design is quite controversial, because all users will be subject to a certain percentage of liquidation penalties. While this works on a programmatic level, it's a poor design for a good user flow.
My next attempt was to use AMM's liquidity shares. If you look at a pair like DAI-WETH, and assuming a healthy market, then DAI-WETH will hold its DAI value. If you start with 1000 DAI and 1 WETH, you can have a pair worth 2000 DAI (because 1 WETH = 1000 DAI). If the value of WETH doubled, the pair would be worth about 3000 DAI as you would have >1000 DAI and<1 WETH
<1 WETH (about 2000 DAI and 0.5 WETH). Therefore, using stablecoin pairs for transactions can at least maintain a stable currency value. (oversimplified because it ignores fees and short-term losses)
When a user withdraws, they have 2000 DAI and 0.5 WETH, and they can buy another 0.5 WETH at a price of 1000 WAI to get 1 WETH. However, if they are not LPs, they will have 2 WETH (worth 4000 DAI).
The above design actually works, but it is not so effective for users who want to use WETH as collateral. If you provide 1 WETH as collateral, you expect the following to be met;
If the WETH value drops and I get liquidated, I will have
If the WETH value increases, I will have 1 WETH
Therefore, the design of AMM trading pairs avoids liquidation, but this means that collateral providers can never enjoy the advantages of assets.
However, the above design does allow for automatic liquidation.


