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

In-kind liquidation for older markets #37

Open
jflatow opened this issue Jul 14, 2020 · 2 comments
Open

In-kind liquidation for older markets #37

jflatow opened this issue Jul 14, 2020 · 2 comments
Labels
quirk This issue discloses a quirk in the protocol

Comments

@jflatow
Copy link
Contributor

jflatow commented Jul 14, 2020

Older markets suffer from a previous bug in the CToken contract which prevents being liquidated in the same asset that is being supplied. The markets which this issue currently affects are cBAT, cETH, cREP, cSAI, cUSDC, cWBTC, cZRX.

Given the collateral requirements, and the fact that only interest accumulation (not price risk) can put an in-kind borrower underwater, it was previously deemed non-critical to the health of the protocol to deprecate the older markets. Governors may consider other mechanisms to migrate these markets in the future, such as the deprecation of the cSAI market and its effective replacement by the newer, immutable cDAI market. Another more invasive option is that a liquidation function could be added to the Comptroller (or elsewhere, with appropriate *Allowed hook changes), which could perform the liquidate without requiring the re-entrancy.

Note: it's somewhat impossible to prevent in-kind borrowing without major complexity, as a user could supply asset A, borrow asset B, receive cTokens of asset A and then redeem the cTokens of B, effectively being the same as supply A and borrow A.

@jflatow jflatow added the quirk This issue discloses a quirk in the protocol label Jul 14, 2020
defi-dev pushed a commit to powerpool-finance/powerpool-lending-contracts that referenced this issue Sep 7, 2020
…inance#37)

* Fix scenarios for DAIInterestRateModelV2

* Add a test rinkeby cUSDT using a faucet token
@notesbytom
Copy link

notesbytom commented Mar 13, 2021

It looks like wBTC contract will be migrating to a new upgradable version soon. This should resolve the issue for wBTC?

@TennisBowling
Copy link

@notesbytom yes, the new WBTC has this quirk fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
quirk This issue discloses a quirk in the protocol
Projects
None yet
Development

No branches or pull requests

3 participants