Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aave allows liquidation, when an asset swap to a higher LTV asset would suffice #829

Open
blakelapierre opened this issue Mar 13, 2023 · 1 comment

Comments

@blakelapierre
Copy link

blakelapierre commented Mar 13, 2023

Say you have two hypothetical assets with the given max loan-to-value(s):

  • Crypto1 50%
  • Stable1 90%

And an e-stablecoin borrow market consisting of:

  • Stable1

Imagine a user supplies:

  • $100 of Crypto1
  • $100 of Stable1

Simplified, a user would have the following Stable1 borrow ability:

  • $50 from Crypto1
  • $90 from Stable1
  • $140 total (70% max LTV total)

Now, say a user borrows the full $140 in Stable1 and the value of the supplied Crypto1 drops to $80. The new borrow ability is:

  • $40 from Crypto1
  • $90 from Stable1
  • $130 total

Now, simplified, aave would let a second and/or third party take about $25 of Crypto1 from the account + a bonus/penalty (say 10% for this simplified example) in order to repay $25 of Stable1 on the account. The new account looks like this:

Supplied

  • $52.5 Crypto1 ($26.25 borrow ability)
  • $100 Stable1 ($90 borrow ability)
    ($116.25 borrow ability)

Borrowed

  • $115 Stable1

The user has now suffered a $27.5 loss of Crypto1 (transferred to a second/third party), when the account could have simply performed the following swap:

$25 Crypto1 -> $25 Stable1 and had the following supplies:

  • $55 Crypto1 ($27.5 borrow ability)
  • $125 Stable1 ($112.5 borrow ability)
    ($140 borrow ability)

Notice that the value of the assets supplied are both greater in this scenario, than in the second/third party liquidation scenario.

The difference in total account value is even starker. Under the second/third party liquidation scenario the final account value is $152.5, while under the Crypto1->Stable1 swap scenario it is $180.

Now, there would potentially be some interest rate risk as the account maintains its borrow, but it seems typical that there is maybe a 1-2 percentage point spread in supply APY and borrow APY on stablecoins. However, also notice that the supply of Stable1 has increased, while the borrow amount stayed the same, so this point spread is now being paid on less Stable1 value than before the swap. In this example, the difference is now only $15 (before it was $40). So, in the worst case scenario of these hypotheticals, the account is losing about 2% of $15 per year, or $0.30. Now, avoiding some slight complexities, it would take about $2.5/$0.30 ~= 8 years to lose the equivalent of the liquidation penalty that would have been imposed; meanwhile, the account has an extra $2.5 in Crypto1 value that is 1) increasing due to supply APY, and 2) has a chance of increasing in market value.

@martini1990
Copy link

``

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants