Automatic collateral management

While liquidation is absolutely crucial part of the process, it also has a cascading effect on flash crashes, where risky loans get liquidated, and then liquidated luna is sold off, that then dumps the price even lower, which then liquidates loans that were reasonable and considered “safe”. I think we all can agree that is not a positive chain reaction.

Also the protocol absolutely depends on there being borrowing demand, at the moment we rely on incentives, but we should be actually thinking how to make the borrowing itself a good, safe experience for the long term sustainability.
I think in defi borrowing now completely depends on incentives that are minted by the protocol. With the terra ecosystem, anchor is in a position to not only provide better savings account, but also better borrowing platform.

I think there’s 3 things that can improve borrowing without bringing risk to the protocol.

  1. Automatically pay part of the loan with money in the savings account, to keep the LTV healthy.
    The money is here, you as a borrower were responsible and you have money to cover in case of collateral value going down. But it’s silly to get liquidated just because you were asleep in the 4 hours of market volatility. The unnecessary liquidations have the mentioned cascading effect.

  2. There’s a distinction between collateralized bLuna and non-collateralized bLuna. Non collateralized bLuna still earns you staking rewards, the only thing you lose from regular staking is airdrops.
    To protect myself from liquidation, it’s reasonable to have a lot of bLuna in case of dumps, but not keep all of it as collateral. Instead you would just keep the collateralized bLuna at some reasonable level, and let the rest of it earn staking rewards.
    But similarly, managing this is a manual process is meaningless. In case of rapid market movement you can be liquidated just for not being available for a few hours. Even if you were completely prepared with the capital to provide more collateral.
    So it would be great if the protocol was able to do this automatically. Like let’s say instead of manually needing to “provide/withdraw”, it automatically let’s you earn staking rewards for collateral that is bellow certain LTV threshold.
    There’s a similar system in Nexo now, where as the value of your collateral changes it automatically uses more of your account as collateral on dumps, and it returns you collateral to earn rewards on pumps.

  3. There’s some thoughts on how to give more breathing room before liquidating here:
    Dynamic liquidation LTV
    This proposal actually does introduce some manageable risk because it actually changes liquidation point, instead of just automatically moving the funds for you.

The first two options also encourage people to go deeper into the terra ecosystem, by having more value in anchor that is automatically managed to keep healthy LTV.

4 Likes

Why do you think other defi protocols not implemented this approach? high fees on ethereum?

I really don’t know that much about other DeFi projects. But it looks like there are some projects like this: DeFi Saver
Though I’m not familiar with the details.

I think having this built-in into the platform itself would be great. Now taking a loan with low LTV is very expensive.

Here’s an example I made with bLuna in telegram chat:

Introduce variable “PaidCollateral” - it’s a LTV value, below which the staked collateral rewards go to the borrower instead of the protocol.

Example: PaidCollateral = 30%.
It means if your LTV is 30% or above, the entire collateral rewards go to the protocol.
If it’s below, the excess goes to the borrower.
Meaning, if I borrow 300$ or more, against 1000$ collateral, it behaves as it does now.
If I borrow less, I get some staking rewards.
E.g. if I borrow 200$, you need 600$ to achieve 30% LTV, so the protocol gets rewards for the 600$, while borrower gets rewards for 400$.

This would reduce the revnue of the protocol for highly overcollateralized loans, but at the moment having low LTV is really really expensive. Unlike other protocols where your collateral is 100% liquid, here the collateral is in bLuna which takes 21 days to convert back to normal or you need to pay a premium.
So borrowing low amount against your collateral is very expensive, you can’t easily exit your borrowed position due to 21 day lock up.

With this proposal, you can actually take 15% LTV loan and not lose a bunch of money just because you are not staking instead.

I would not expect the protocol to actually lose money from this, higher risk, 30-40% LTV loans will still be there. But a change like this would actually attract more very safe positions of 1-20% LTV that wouldn’t have existed before.

And as it’s a variable that can be changed, we can adjust it based on the market.

Keep in mind, you already can do that manually. So even the “protocol will lose money” argument is not really valid. This is not a new thing, people do that, this change would just automate so that people can take a nap without being liquidated.

As a side note, I would love if PaidCollateral value would have some range that is affected by how much ANC you are holding. Giving ANC utility that can give you some benefits on borrowing sounds great.

2 Likes

I like your idea.

I agree that liquidation risk management is essential for such a volatile market (LUNA price varies), and that a lack of risk management mechanisms disincentivizes users from borrowing at all because being liquidated is quite a substantial loss. The problem is pretty clear.

After showing agreement for the need of some sort of solution, I would like to propose an alternative potential mechanism. I touched on it briefly in the Telegram channel:

On Anchor’s Borrow page, just as there is a ‘Collateral List’, there would also be a separate ‘Backup Collateral List’. Any bLUNA Provided to the Backup Collateral List still earns the borrower rewards. In the event where the price of LUNA plummets for some reason and the borrower would otherwise be liquidated, instead all the bLUNA from the Backup Collateral List would automatically move (without the user needing to sign off on it, because it’s already locked into a Smart Contract) over to the regular Collateral List. That bLUNA that was moved would stop earning the user the rewards, but it protects them from liquidation.
To maintain incentive for borrows to over-collateralize into the regular Collateral List, there could be an ‘Activation Fee’ when the system needs to automatically move the Backup Collateral over to regular Collateral. The Activation Fee (e.g., 8% ?) would have to be better than being liquidated, but still significant enough to incentivize users to over-collateralize to the regular Collateral List. In addition, the Activation Fee can help fund Anchor Protocol.

I believe this proposed mechanism would be relatively easy to write and integrate into the protocol, keep it easy to calculate bLUNA rewards, maintain borrowers’ over-collateralization incentive, provide to borrowers peace of mind from liquidation during market fluctuations (thereby incentivizing borrowing), and add an additional revenue source for Anchor Protocol.

Thanks for your consideration. And thanks, Ernestas for your contribution.

2 Likes

@Ernestas thanks for bringing this topic here. I agree that it is a very needed feature - especially considering the recent flash crash and how many users were liquidated.

@dokwon You’re right - on Ethereum it is probably hard to implement for two reasons - 1) high fees, 2) how long it takes to do this.

It would be a very useful feature - even if we start small and just add a couple of features:

  1. Liquidation price shown; a warning is shown when user’s loan is close to liquidation;
  2. User can pre-approve Anchor to use their UST in Earn to pay of Borrow loan if it is being close to liquidation
  3. ‘Backup Collateral List’ as proposed by @cpinter10 above.

@dokwon I realize that you and TFL are very busy, so maybe somebody (who can code this) could create a proposal on Anchor with a budget. Considering the benefits to the community - I would surely vote to award such a budget and I think many others would too.

3 Likes

Yeah that’s basically same.
The protocol would need to decide at what point to move bLuna between staking earning and non-earning wallets. So it’s same as calculating the earning rewards based on some threshold within the collateral wallet itself.

It’s just implementation details of what is easier to implement.

1 Like

Makes sense. @ryanology045 what do you think? Any reason this can’t augment the core protocol?

I agree this would be a very helpful feature.

The key question is how we continue to encourage borrowers to over-collateralise their loans rather than borrowing right up to 50% LTV and relying on this feature to bail them out when the price drops.

An activation fee was suggested above, but an alternative could be that the protocol only pays out borrowing rewards on the portion of the loan up to the “safe” 35% LTV. This would discourage overleverage whether or not people are using the failsafe mechanism proposed here.

Not sure that this is ideal; if people had to pay the full 34% borrow APR without ANC comp for anything they borrow beyond 35% LTV, everyone would suddenly try really hard not to exceed that 35%. This makes 35% the de facto new max LTV and decreases the utility of borrowing via Anchor.

What about adding a small tax to auto-liquidation?

1 Like

Do we want people to borrow at more than 35% LTV? On the one hand sure it’s fine for the protocol to reward increased levels of risk, but cascading liquidations are a threat to the entire ecosystem.

50% LTV is just an artificial restriction created to allow enough staking rewards to pay depositors.

There’s nothing ‘unsafe’ or irresponsible about this ratio from a credit point of view. It is a major consideration that this will reduce ‘protocol profit’ and we should carefully consider what this will do to the pool of cashflows available to pay depositors and ANC stakers. However, 35% LTV is just not competitive from a borrower’s point of view especially once the number of options for using your Luna inevitably grows.

I think we need to make a distinction between Credit Risk LTV and Staking Rewards Shortfall LTV. Today they are considered the same, however, I don’t believe this to be true.

We should only liquidate loans that are at the risk of creating a ‘Net Uncollateralized Debt’ to the system given a high price volatility environment. This may be a completely different LTV from the one that would create a cashflow shortfall due to there being too little Luna paying rewards for the same amount of loan value.

For example, the ‘Cashflow Shortfall LTV’ might be 40% but the ‘Credit Risk LTV’ might be 65%. Once a loan passes the ‘Cashflow Shortfall LTV’ the entire value of the loan would incur an incremental penalty interest rate (would be dynamic but I imagine in the 10-20% range) that would cover the shortfall and ensure depositors are paid and then when the loan passes 65% it will be put up for liquidation.

I like the ‘Backup Collateral List’ idea here and its potential aid in increasing usability. I guess the activation fee mentioned here can be used as small incentives for those that trigger collateral transfers between the ‘backup collateral list’ and the ‘regular collateral list’.

A bit of a sidenote, but I think by giving borrowers a portion of bAsset rewards Anchor could provide a unique functionality that is unfound in other DeFi lending protocols - the ability to for borrowers to leverage on staking rewards. Leveraging on staking rewards could support a stable degree of borrow demand even after ANC incentives run out. Though not an absolute requirement, it’ll be great if considerations on this could also be made.

3 Likes

@ryanology045 ,I like the “backup collateral list” idea as well. From a user experience, I think it would give the user more of a sense of control to manage their risk against liquidation without any ongoing manual efforts. (Setup one time and periodically adjust).