[Proposal] Introducing the New Anchor Liquidation Queue

Great idea. What about also creating an “overdraft” mechanism? If a user has staked Terra assets the system could pull those assets into the borrow to cover. For example if I have staked anchor, Luna, or mirror, and I’m close to liquidation the system would either sell those assets for UST to pay down loan or flip those assets into bLUNA to cover. It could also put the user in a delayed liquidation process that provides a set time to cover and pay off loan. Volatility or flash crashes often happen at odd times when least expected or near phone/computer. Needs to be worked out but that’s my starting point.


I believe that wont be easy as most staked terra assets, have an unstaking lock up period, which makes them not readily available.


Anything that levels the playing field for regular users, and offers novel and intuitive products to profit from whilst supporting ANC, should really be encouraged. Nice UI, super helpful team and great branding make this seem like a no brainer to me. Congrats to all concerned.


Hi @ryanology045,
I believe it’s a great idea for the fair liquidation process and another step towards full decentralisation of the Terra ecosystem (from the liquidation side) which allows anyone to participate.
Сould you please clarify the following points:

  1. Do you know what is going to be with TFL Liquidator? It has quite a lot of bids right now (5m UST for bEth and 59m UST for bLuna).
    1.1. Will it participate in the new Anchor Liquidation Queue?
    1.2. What is going to be with that assets if TFL Liquidator will not participate in the new queue?

  2. According to the Kujira UI, the max premium rate (discount) is 30%. The current max premium value is 15%, as it was changed in the Anchor Gov Poll #3.
    2.1. Will the value be changed to 30% after the proposal pass?
    2.2. If so, why is it not done in the same way as before - by voting?

  3. If a borrower, that is going to be liquidated, has MIXED collaterals (bLuna + bEth), should the bid be submitted for both collaterals, or only one would be enough?
    UPD. found from the loan-liquidation doc that the answer is YES, two bids are necessary. :slightly_smiling_face:

  4. What is going to be, if the amount of collateral needed to be liquidated is higher than the total amount of bids submitted for the particular premium rate section (which is the next in a queue)? Will it be passed to the next premium rate section in a queue, the one that has the necessary amount of UST?

Thank you in advance!


Overdraft mechanism is a great idea. The unlock period would make this difficult for LUNA, but perhaps something with other Terra ecosystem assets, such as ANC, MIR, or MINE would work.

1 Like

Interesting mechanism, especially within Anchor itself (perhaps with a priority system (Earn UST > ANC LP/Gov), but there would need to be a way to opt-in or out of the mechanism (perhaps some wouldn’t want their X token liquidated, and knowledge of the mechanism should be ensured).

I’ll vote favourably to the new liquidation queue. Thank you for your work.

1 Like

Interesting new queue! I’ve been digging through the smart contract, and I see that bids are eligible for instant activation as well. What constitutes that property?

1 Like

So A synthetic asset should be created in this instance to make it liquid, just like bLUNA


Well thought out.

Liquidation protection is a great idea. Nexus protocol is building just that and much more.

Also wondering what @HarpoonProtocol (now lighthouse protocol) thinks about building in user liqudation protection into their defi liquidation tools.

How do I change the settlement contract direction in the bLuna custody, bEth custody, and supervision contracts to route settlements to the new settlement queue contract?
and how can i vote?

checkout the raw execute messages in the poll; you can see those contracts updating their configs to the new liquidation queue contract.

you can vote on the anchor web app, or send the vote message to the govt contract.

Here are the points:

Q1. That liquidator is operated by TFL and not the Anchor team, so I don’t really know how that’ll be handled after the liquidation queue goes live. But the big difference is that bots don’t have any advantages in the new system - it’s no longer first-come-first-serve.

Q2. 2.1. Yes the value will be changed to 30%.
2.2. It’s quite difficult to create proposals that determines the initial launch parameters of a contract. Doable, but the steps will be highly inefficient. Do agree this is the way to go though. Anchor governance probably requires a mechanism improvement.
As for the reason for reverting back to 30%, it’s better to be conservative as this is a new mechanism that never existed before. However, I don’t think this value would matter too much as before. Bidders now have an incentive to compete for lower premiums - liquidations with 30% a premium will be rare imo.

Q3. Yep bids for both collaterals will be required

Q4. Yes

Wouldn’t adding those assets as collateral (in the form of bAssets) achieve the same goal?

1 Like

The activation period (initially 10mins) is to disallow bots from front-running the system (preventing bots from retracting & resubmitting bids with higher premiums when market volatility is high).

There’s one case where the activation period can hurt the system though: when there’s not enough bids in the queue due to mass liquidations. When the bid amount per collateral is below a certain threshold (5M UST for bLuna, 1M for bETH) new bids are instantly activated so that they can immediately be a part of liquidations.


@Joe_UST this is an interesting idea.

Definitely needs a bit more iteration but it is a mechanism I have yet to see in crypto.

Would it be possible to expand this idea across protocols? Instead of using only staked assets a mechanism could create a hierarchy (decided by the user) and liquidate or swap positions to maintain a liquidation threshold which they deem most important.

Many users in the Terra ecosystem have spread their investments across different protocols and revenue streams. By ranking them and being able to manage them in one place it would incentivize increased use of protocols such as Anchor and return confidence to users.

This idea could be carried across chain once further developed as well. I am not entirely sure about the technical feasibility so if you are a Rust dev please jump in!

1 Like

I believe what you are referring to is what is being called cross margin collateral. It’s being developed by several protocols on SOL now running of SRM. It is an idea that gets the crypto space closer to mature capital markets where your whole portfolio can be used as collateral on signal position (Drift & Jef and Defi Swap protocols are doing this among many other amazing things).

Some things to think about when moving towards this is the following:

  1. On top of needing to write a contract that would auto sell and bond these assets ahead of liquation (complexity?), there are other things needed to be worked out.
  2. While it would be amazing if you could somehow liquidate assets from other protocols, I’m not sure how to whitelist these users’ assets to do that. If whitelisted for margin calls, I don’t think these assets would be able to be locked up in staking or in LP pools etc . Perhaps it could start with idle UST in wallets? Maybe someone else can weigh in on this point?

Next to get this closer to what Drift and other protocols are doing on SOL here are some thoughts and questions of building a cross-margin pool option in Anchor:

  1. Multi-token b-asset pool: Will a user be able to deposit multiple b-assets at once, in one batched transaction?
  2. As b-assets expand I foresee different collateral types having different risk profiles. Each collateral type would need an assigned risk profile based on probably both subjective data such as the reputable team behind the project and some algo based risk ratio based on data such as market cap, TLV, number of unique wallet addresses, historical volatility (ideally implied).
  3. Does a cross margin b-asset collateral pool require cross b-asset token as a liquid representation of users pool ratio? and would this have utility, say in mars, levana etc?
  4. can the risk of a multi-pool be properly mitigated with point 2?

@PFC @ryanology045 interested to hear your thoughts.

1 Like

The idea of a overdraft is ok, but I think it breaks the mechanism a bit. ANC uses collateral to power the earn side. If people start using overdraft, how will the earn side get their interest. so while it might be good for one side, it strains the other… unless we charge some other kind of interest on the ‘potential’ overdraft size… but by the, your just better off sticking it in as collateral no?

Now if we start using other things it introduces a lot of risks, and different kind of risks.

  1. The obvious ones are liquidity & volatility. how liquid is that PEEP coin? can we actually exit it if need too

  2. The other kind is secondary risks… what happens if PEEP uses anchor behind the scenes. are we creating feedback loops when we liquidate?

Another approach I like is time based margin call protection

What if Anchor charged a bit of a higher rate, but it stopped liquidations from occurring for say X minutes/hours? say 1% for 10-minutes, and 5% for 1-hour, and 15% for 6-hours (making the numbers up obviously. I’m not a quant).

This would give the end-user a chance to liquidate other holdings, and fix their LTV, as well as reduce some of the bumpiness (like the $9 drop that happened, which quickly recovered a bit).

Agree. It’s why we would need to start looking at metrics like I laid up above if we do introduce new b-assets.

I’ve been thinking this over. One black swan risk comes to mind. Markets can move fast in a matter of seconds and compound in mins. If someone hits liquidation threshold and markets continue to free-fall, even more, say another 40% we risk the protocol losing money and facing solvency issues if enough big wallet balances did this. While rare, something to consider. There would have to be a further buffer ratio that over-rides the freeze here.

1 Like

Most but not all… I got liquidated nearly 100 luna on the 4th by 5cents. The real painful thing is when you look on the history - I got liquidated seconds before I unstaked from one of my many loop pools and provided ample collateral to have avoided liquidation… I mean the transaction times of being liquidated and adding liquidity are the same hour and minute, literally a few seconds between… I don’t care what anyone says- bare bloody minimum I should of got a warning notification or something… really really unfair and I can’t help but feeling robbed by a family member :pensive:

1 Like

I just managed to avoid a similar fate. And while I probably lost more by unstaking and withdrawing my loop farming . some 50% drop since I started 15 days ago. It certainly doesn’t help when the “line is blocked and its to 'busy to finish the transaction. Which on the loop site is given a positive note like its good that everyone is using terra at the moment. 'Guess why!” My take is many in terra are desparately trying to reduce their borrow rate and need to pull out of the various dapps etc and quickly. And its not like one had to be in a high risk borrow % its just been literally a “black swan event” acroos the board in crypto.

1 Like