How do Ajna liquidations work
Learn everything about Ajna liquidations
Last updated
Learn everything about Ajna liquidations
Last updated
Oazo Apps 2023
How Ajna liquidations work?
To understand how the Ajna protocol works it's important to understand liquidations, both lenders and borrowers need to grasp the mechanism to have a proper view of the risks of the protocol to avoid unnecessary losses. This article goes into details about how the protocol liquidation's system works, with some simplification. Further details can be found in the white paper.
The first concept to understand is that lenders select lending prices, but not all lending prices are the same.
From the highest price downwards, we define the active liquidity range. This is the part of the tokens that are actively lent out. The active liquidity range ends at the Lowest Utilized Price(LUP): Borrowers take tokens from the highest price downwards. Once all borrowers are matched with lenders from the highest prices, we reach the most conservative lender who is at a price point called the Lowest Utilized Price. His deposit is being utilized, but deposits below his price are not. The LUP marks the difference between active liquidity and available liquidity.
The available liquidity is the price range between the LUP and the Threshold Price of the least collateralized loan. The Threshold Price of a given loan is obtained by dividing the collateral by the total debt. For lenders, this price is called the Minimum Yield Price. Below this price, lenders earn no interest since they don’t provide useful liquidity. They are the unutilized liquidity
All loans are deemed to be collateralized when their threshold price is lower than the Lowest Utilized Price. This means that loans are meant to be collateralized with respect to the most conservative active lending price.
Any loan with a TP above the LUP can be moved into the liquidation queue. This poses a problem: Since the LUP moves with lenders and borrowers, changing the quantity being lent or being borrowed any loan could be eligible for liquidation with a mere change in available liquidity.
To avoid spurious liquidations, Ajna requires that liquidators post a bond. This bond requires liquidators to stake their own money to prove that a loan is undercollateralized with respect to its liquidation price and should be liquidated. If a liquidator attempts to liquidate a healthy loan, they will be forced to lock a sizable bond first. After the liquidation is done, because the loan was healthy they will lose they locked bond, this is a strong incentive to only liquidate loans that are effectively uncollateralized, otherwise they would lose their bond. In case they liquidate an unhealthy loan, the bond will turn a profit. This means that liquidators are incentivized to only call the liquidation when they are sure there is a material risk of the collateral not being enough to repay the debt.
That might seem complex, but don't worry if you ever used another lending protocol, Summer.fi shows you easy to follow information: If you are a borrower you can check your liquidation price at all times in the app. Since Ajna forces liquidations to post bonds previous to liquidations, it's expected that no liquidator will force a spurious liquidation since they would lose money.
Liquidation Take Penalty
This fee is maximum 4.5%, and is applied once the first sale of collateral occurs and is variable depending on the collateral price settled at the auction as well as the liquidator's Bond Factor.
Since Ajna has no external oracles it has no reference price to start a liquidation. Once a loan goes into auction, it can't be saved. Auctions take 72hs at most, but should be finished as long as there is no more debt to be repaid or no more collateral to be sold. The auction price starts at a very high price and halves every 20 minutes 6 times, then halves every two hours 6 times and finally every hour until the end of the liquidation period.
If you are a lender, an alert will appear when you are lending too aggressively to avoid locking your tokens during the liquidation process. Since Ajna strives to maintain a healthy market at all times, the liquidity in the most aggressive prices can be used to cover loans debt, this is why when liquidation happens some parts of the most aggressive lending prices are frozen and no one can withdraw funds until liquidations are complete, freeing up assets to be withdrawn.
If there are 1 million debt tokens to cover 1 million of deposits will be frozen starting from the higher price downward to guarantee that, in case of an unsuccessful liquidation, the market is still able to repay the debt.
Let’s work with an example:
The price of ETH/USDC is 2,000
The liquidation price of a Loan is 1,830
You are lending at 1,750
There is 1 million worth of USDC to recover
Now what will happen is the following with some simplification:
If the price of ETH goes below 1,830 the highest threshold loan will be actionable at a profit and some liquidator will post a bond to do it.
As soon as someone does this, your position will be frozen until liquidation is over if your token share is among the 1 million that are at the highest prices.
This means you won’t be able to add or withdraw collateral until the liquidation process is complete.
Once the liquidation is over, you will be able to withdraw your tokens or the collateral that your tokens were exchanged for.
During the liquidation period as the price of ETH/USDC continues to go down, this process might repeat with more loans meaning that your position might still be frozen as more loans are forced to be liquidated.
If the price of ETH/USDC goes below your lending price of 1,750 your USDC tokens will be traded for ETH and used for recovering the debt. In this case, as your position is frozen, you won’t be able to withdraw your token before this happens. This means that you should be comfortable holding the collateral token at the price you selected for lending.
If during a liquidation, the price of the collateral goes below your selected lending price this means that your deposit tokens will be used for purchasing collateral. This is why your lending price acts similar to a limit order. This could happen if your tokens are frozen during liquidation or not. Keep in mind that if this happens during a liquidation, it is expected that the external market price of the collateral has also gone down in price. In this sense, liquidations are just a specific case of your lending price acting as a limit order, your tokens can be traded at all times for collateral if it reaches your selected price.
If there is bad debt then the pool's reserves will be used to cover it to the greatest extent possible. If there are insufficient reserves lenders’ deposits are reduced by the quantity of debt in the loan, from the highest priced bucket downwards iteratively, with the loan’s debt reduced by the same amount. This repeats until the loan’s debt is zero. In this case, the most aggressive lenders are being forced to take on the remaining bad debt.
Read more about Ajna Liquidations: https://faqs.ajna.finance/faqs/liquidations