This is a proposal to create an anti-bot, community-focused liquidation mechanism for MIM markets. The objective is to improve the stability of the Abracadabra money market by involving you, the community, in this critical part of the ecosystem, by putting control in the hands of many more, rather than the few. Making the liquidation process more democratised ultimately reduces the risk liquidations bring to the Abracadabra Protocol.
The rest of this document lays out why this is necessary, the benefits a more decentralised liquidation queue has for all users, and how this solution improved another chain.
THE CURRENT STATE OF LIQUIDATIONS
The vast majority of liquidations happen on a first-come, first-served structure. This means when people are liquidated, a handful of bots with large capital reserves race one another to buy the liquidated collateral on offer. They usually do so at the highest premium allowed and inevitably sell these assets on the open market right away. Not only do the few benefit from the losses of many, the way in which itās done extracts the maximum benefit, takes the maximum toll, and often aids in protracting the declining price. Managing the risk of liquidations going wrong for Abracadabra are in the hands of the few. This is not ādemocraticā. This is not what DeFi is about.
A PROPOSAL TO FIX LIQUIDATIONS
The proposal is to create a new queue-based liquidations contract. The new design abandons the method rewarding the few at the expense of the many and allows any user to bid on liquidated collateral, making the process truly democratic and decentralized. Most importantly, a process that does not rely on speed eliminates any advantage a bot has. Anchor Protocol on Terra recently implemented this style of liquidation queue, and itās changed the game for both the network and the community.
V1 liquidation contract: $LUNA went from $15 to $4.18 in 5 days
Since the launch of ORCA, $LUNA has bounced back incredibly well after market downturns, when previously liquidated collateral was exclusively market sold and contributed to the drop in price.
*WHAT NEEDS TO BE DONE TECHNICALLY?
On a technical level, we propose to extend the āliquidateā function on the āCauldronā contract. This currently automatically exchanges the MIM provided by the caller at the āLIQUIDATION_MULTIPLIERā rate. The proposed updates adds functionality for the Cauldron to act as custody for biddersā funds, maintain an āorder bookā of bids and then use these funds when collateral is liquidated. When the āliquidateā function is called, the queue will calculate the effective premium rate, repay the market with the according amount of MIM, and allocate the amount of collateral available for withdrawal by individual bidders.
In order to prevent front-running by bots, and create a fair system for all, bids will become āactiveā and available for use 10 minutes after they are placed. The exception to this will be when the combined bid amount is less than some configurable value, in order to allow bids to be active instantly and prevent the pools from emptying completely.
THE BENEFITS TO ABRACADABRA
The biggest problem and risk that lies with Abracadabra is the issue of cascading liquidations. When liquidated collateral is only offered to bots that run liquidators as a ājobā, a small group of people accumulate a VERY large sum of the liquidated asset. Generating revenue in this manner requires constant capital so these solutions often involve the asset being dumped on the market, causing a further run of the price, playing into the botās rinse-and-repeat tactic, to the detriment of the token and its holders. This is the so-called cascading liquidation event. Cycles like this are less likely if liquidated collateral is spread democratically. Doing so results in thousands of individuals possessing the discounted asset, each with their own strategies to hold, stake, etc. This creates a LOT less volatility during the liquidation, creating less violent movements, softer landings and shorter bottoms. Importantly, it means the community is providing the liquidity for liquidations; another stabilizing effect on the ecosystem.
BENEFITS TO PARTICIPANTS
Democratisation is paramount in Defi, and the distribution of liquidated assets on most chains fly in the face of this. Kujiraās product ORCA is the first dApp on any chain allowing users to bid on liquidated collateral using an intuitive UI, with absolutely no technical know-how required. This resulted in borrowers getting liquidated at lower premiums, and thousands of users able to buy assets on discount. A textbook win-win case study.
A CURRENT EXAMPLE
To put the above into perspective, here are statistics from a liquidation event on Anchor Protocol on the 4th December 2021. These are from ORCA.
-
$15.8m in bids were filled
-
697 bETH and 318 000 bLUNA were bought
-
Average bETH price: $3379
-
Average bLUNA price: $42
-
Min bETH price: $3261
-
Min bLUNA price: $39.99
Before ORCA and, more importantly, the new bot-proof liquidation queue, all the discounted assets would have gone to five bots at the maximum premium allowable. They were instead distributed to 7500 community members. User success stories can be seen in this thread.
HOW DOES THIS EVEN WORK?
Put simply, you - and the rest of your community - place bids to buy at-risk collateral at a discount.
Bids are placed in a queue at varying percentage discounts (premiums). When a loan crosses the safe ratio, and the collateral is sold, itās bought using the bids in the queue.
These bids are pooled into groups - eg 1% buckets - and when collateral is liquidated, priority is given to the bids in the pool with the smallest discount (the lowest premium). Letās use the wAVAX market as an example.
At the time of writing, wAVAX has a price of 81.4 MIM, and the safe ratio is 75%. Letās say somebody deposits 20 wAVAX and borrows 1221 MIM. Tomorrow the price of wAVAX suddenly drops to 75 MIM, and this personās wAVAX (the collateral) is due to be liquidated.
In our hypothetical situation, 30 individuals from the community have each placed a 30 MIM bid in the 5% pool, and 40 more have each placed a 20 MIM bid in the 10% pool. The liquidation process goes as follows:
- The market is selling 20 wAVAX, currently worth 1500 MIM, to the liquidation queue
- The 5% pool - as the smallest pool containing bids - activates first
- It contains a total of 900 MIM
- This 900 MIM purchases wAVAX at 5% less than the market price (71.25 MIM each); 12.6 wAVAX is bought and split pro-rata amongst the bidders in the pool. They all made equal bids, so every bidder receives 0.42 wAVAX for their 20 MIM bid
- We still have ~7.4 wAVAX to liquidate, so we go to the next pool containing bids - 10%
- Bidders in this pool will buy wAVAX for 67.5 MIM each. We have 800 MIM in this pool and only 7.4 wAVAX left to liquidate, so this pool will only be partially used.
- The remaining 7.4 wAVAX will be sold for a total of 499.5 MIM. Split equally, each bidder will buy 0.185 wAVAX for 12.49 MIM. They will each have 8.51 MIM remaining of their initial 20 MIM bid, ready for the next liquidation.
The overall result here: instead of one whale with a bot buying 20 wAVAX at a 20% discount, those 20 wAVAX have been distributed amongst 70 individual participants in the liquidation queue. The total repay amount is 1397.25 MIM; an average discount of 6.85%. Weāve also saved the borrower from a painful 20% liquidation.
THE TIMELINE FOR IMPLEMENTATION
Once the new liquidation queue is built, the integration into ORCA can happen within a week or two; this is easily achievable in Q1 2022.
WHAT HAPPENS NEXT?
A change in the Abracadabra liquidation contract would mean great things for the project and more importantly, the community. Itās time to take back control from the bots, and put liquidated collateral into the hands of the people. A partnership between Abracadabra and Kujira will be a key one, ensuring that we are always moving forward and growing in this Defi space.
CONCLUSION
Liquidations have been a tool abused by the few to benefit off the many. Their structure has served to undermine systemic stability, and they have added to the risk and pain of borrowing, making capital movement riskier and more expensive.
By rewriting the contract, we have an opportunity to reverse all of those things, adhere to the tenets of decentralisation and create a system where capital can flow more freely, and be shared by many. It is a crucial improvement to Abracadabra, and we urge you to not only support it, but take part in it.