Questions about Anchor protocol's liquidation contracts and the resiliency of the protocol during downturns

This is a copy/paste of a question I asked in the telegram - was asked to also post it here since this is better suited for this type of discussion. It’s possible that this could receive an answer in telegram before it’s seen here though - link to discussion - Telegram: Contact @TerraLunaChat

Hey all, I posted some of my thoughts about Anchor in the price-discussion channel but I wanted to cross-post them here to see what discussion it brings. Would love to hear the thoughts from anyone, especially Terra team members and Do. "

TL/DR: liquidation contracts and the resilience of the protocol during market downturns.

So if you read the whitepaper, you’ll see that anchor has an auction system such that when the collateral for a borrower breaks even (2x collat. becomes 1x due to a price crash), contracts start to be executed that sell those assets off to the best bidder. These contracts can be made by anyone (they basically say "I will buy your bAssets for $X price if you want to sell at some point in the future), and the contracts require 30 days to rescind, and so cannot be pulled quickly during a market crash. In the event of a market correction or crash, those contracts will be executed by the protocol (best->worst value) to sell collateral bAssets for UST to protect the deposits of all anchor users.

So, ideally, anchor has enough contracts at any time to cover the total value of depositors principal - so that if bAsset value loses 80% value overnight, all staked bAssets will be sold off to the highest bidder and the resulting UST covers all the deposits of the users. It relies on people being willing to offer those contracts, taking on a large risk (they will only be buying assets if the value of that asset crashes significantly), and the protocol needs to ideally have contracts to cover all assets - I envision Anchor having a fuckton of money deposited considering the fat APR it offers. So if contracts run out, principle is no longer protected and deposit funds are at risk.

The risk I’m talking about isn’t for the person borrowing to be clear, it’s for the person lending. The borrower at worst still has that 50% of his collateral value in UST he got if the price drops below 1x collateralization.

But if the contract+reserve systems fail due to not enough people willing to buy off the crashing collateralized assets, the principal of all depositors on anchor loses it’s value at the rate that the bAssets (those which cannot be auctioned off) lose value.

There is one more system I haven’t mentioned which is the final emergency “anyone can buy the bAssets for their 1x collat price” which I assume is a failsafe so that an angel can bail the system out if things go bad and it’s possible to cover all assets… But from my perspective the quantity of contracts is the biggest risk point for anchor - which is why I’m really curious to watch and see how many contracts are sustained over time. I’d really love to hear the team’s opinion on this vector of risk, and how they can incentivize a large enough number of contracts consistently over time.

Cheers, thanks for reading.

Protocol resiliency during market downturns has been reenforced by a feature addition we’ve made called partial collateral liquidations – instead of liquidating all loan collaterals in one go, the liquidation contract performs liquidations in a way that only a portion of provided collaterals are liquidated. The liquidation contract will only conduct small market sells over an increased time period, since recently liquidated loans will now have a higher degree of collateralization, needing additional price falls (and thus additional time) to become re-subject for liquidation.

Liquidating loan positions in tranches will greatly reduce that amount of bids that’ll be executed within a certain timeframe, where a lesser amount of bids will be required to be always present at the liquidation contract.

It is also worth noting that the queue-based liquidation contract described in the whitepaper has been replaced for a simplified Compound-like, keeper-based one on the initial Anchor launch. This liquidation contract allows bidders to submit bids with a preferred collateral purchase discount, and when collateral liquidation is triggered the bid submitted by the person that triggered liquidations is executed. Bids can be retracted anytime without time delays so there are practically zero disincentives that prevent users from submitting bids and insuring UST deposits.

This keeper-based system is to be eventually replaced with a queue-based one, but is to be replaced only after further perfections are added.

Btw, great to see research discussions spring up around Anchor! Happy to discuss further : )

2 Likes

Loan liquidation events are “at market sell stop orders.” You will be able to see if there is “clustering” of potential sell orders based on the collateralization ratio of individual accounts. While there will be cases where users are able to top up the collateral or pay back their loan before they get to the liquidation price, in the event a sharp sell off, Anchor becomes essentially an order book with at-market stop orders stacked all the way down.

So then, could the protocol dynamically adjust the collateralization ratio for new borrowing to spread out these sell stops to match some measure of expected liquidity so that there is less of a risk of a sell stop wave which will make it more likely that prices crash further?

Possibly. We are very open on discussing how the protocol can be improved, so relevant protocol adjustments can be made through Anchor’s governance once a clear improvement plan is set.

Btw, Anchor Protocol now has a dedicated forum at: https://forum.anchorprotocol.com/ !