This proposal is to increase the liquidation bonus for the ADA, DJED and SHEN markets to better account for DEX fees, slippage and the events when a liquidation may occur significantly under the 1.0 health factor. Specifically DJED and SHEN markets when minting and burning constraints on the DJED protocol can significantly affect slippage on DEXs, at the same time borrow health factors are approaching 1.0.
Currently the liquidation bonuses are set to 10% for the ADA and DJED markets and 12% for the SHEN market. The following data from a liquidation bot operator who successfully completed 4 DJED market liquidations in the past few days highlights the need to update these values:
The liquidation bot operators starting balances were:
- DJED: 3642
- ADA: 15
The four loans as they appeared on the liquidation panel before being processed:
After the 4 liquidations, the balance of the wallet was (not including the 4 liquidation tokens):
- ₳ 12,179484
- qSHEN 18395045989
- qADA 450671424711
- DJED 26,466573
The liquidation bot operator observed the bot processing the liquidations live as he viewed the 4 positions ready to be liquidated on the loans page in the app (Liqwid App).
**Important points to note points that can affect the timing/introduce delays for when underwater loans are processed:
- A parameterization issue caused three bots pointing to the ADA market, instead of being one for each market.
- Exception being thrown (possibly older version of the code).
Tips to liquidation bot operators for timely liquidations to be processed: 1. ensure you have one bot pointing to each market (instead of pointing them all to the same market) and 2. ensure you are running the latest version of the liquidation bots which can always be found on the GitHub container at: https://github.com/Liqwid-Labs/liqwid-liquidation-bot/pkgs/container/liqwid-liquidation-bot
The liquidation bot operator quickly fixed the above issues and restarted the bots and once the DJED market bot came back online it started working through the loans, largest to smallest, one at the time.
Once liquidations were completed, the bot operator opted to collect the liquidation bonus and restore the bot’s DJED balance so that it would continue normal liquidation operations.
First the bot operator used the Liqwid app to redeem the qToken collateral for the underlying assets:
- qSHEN 18395045989 → SHEN 367.965995
- qADA 450671424711 → ADA 9105,7
They next converted SHEN to ADA on Minswap at 1 SHEN = 1.093577 ADA:
- SHEN 367.965995 → ADA 404
Their bot’s final total balance was:
- ADA ~ 9522
- DJED 26,466573
Given the initial 15 ADA in the bot wallet used for liquidation operations, ADA balance available for DJED to restore the bot’s balance was 9507 ADA.
In order to restore the original DJED balance and realize the liquidation bonus earnings they needed to purchase ~3616 DJED.
At the time (around midnight of April 22nd Irish Summer Time) of the liquidations, ADA to dollar conversion rate were:
- CEX 1 ADA = $0.361
- DEX (Minswap) = 1 ADA = 0.375644 DJED (DJED collateral ratio was under 400%, possibly causing a drift from CEX value)
Doing some quick maths:
- On Minswap, converting 3616 ADA at 1 ADA = 0.375644 DJED, it would cost 9626 ADA and lead to a ~120 ADA loss.
- On CEX, converting 3616 ADA at 1 ADA = $0.361 it would cost 9367 ADA and lead to a ~140 ADA profit (no conversion fees taken into account).
Some considerations from this liquidation event:
- Health factor value was significantly under 1.0 when the bot processed the liquidations (intuitively this translates to the reward being smaller than if the liquidations were promptly processed as soon as the loans were under 1.0).
- DJED collateral ratio was under 400%, this means less liquidity, and hence a possible higher price on DEXs.
- Multiple DEXs were attempted and Minswap had the lowest price impact (~1% at the end of the swap).
- Given the small amount the bot operator did not bother optimizing the SHEN to DJED conversion, but rather swapped SHEN for ADA first (given they had additional ADA to convert into DJED in subsequent transactions). Conversion price and fees were okay here.
- The CEX conversion example does not account for any transaction fees, but shows how the ideal swap would have looked like, while the DEX transaction is the actual conversion rate the swaps were executed at to restore the liquidation bot’s operating balance.
Given the above data points, the following changes are being proposed to liquidation parameters:
Increase the liquidation bonus to 30% from 10% for the ADA and DJED markets (and from 12% for the SHEN market), this will ensure that even during adverse market conditions liquidators still earn an attractive liquidation bonus before any DEX fees or slippage is accounted for.
Decrease the ADA and DJED markets LiquidationThreshold0 from 80% to 76.5% (in most CDP protocols there is no buffer meaning once you hit the maxLTV (or minimum collateral ratio, these are the same) you are instantly liquidated. In Liqwid there’s a built in liquidity buffer to protect borrowers and allow them to repay a loan or increase collateral even once they reach the maxLTV and can no longer borrow more. This decreases the maximum liquidation bonus we can apply and the 5% current buffer setting is too large when the LiquidationThreshold is 80% for the ADA and DJED markets).
Allow 100% of the loan to be liquidated at LiquidationThreshold0. Currently the protocol allows only 75% of a loan to be liquidated at LiquidationThreshold0 and 100% of the loan to be liquidated at LiquidationThreshold1 a few percentage points above the LiquidationThreshold0 LTV of 80% for the ADA and DJED markets. This will allow liquidators to fully close out unhealthy borrow positions in a single liquidation transaction, protecting the protocol especially during adverse market conditions.
Do you support these updates to the liquidation parameters to incentivize liquidation bot operators?