Question regarding liquidation of borrower with same cToken collateral

Hello! I’ve been getting familiar with liquidation on Compound by using Compound | Liquidate and I noticed something interesting.

We can liquidate a user by paying off the borrowing amount of another cToken’s underlying asset and receiving some percentage of another cToken’s collateral. For example if a user borrowed 100 DAI for 10 cETH and is in the red, a liquidator can pay some DAI and receive some discounted value of their cETH.

However I noticed some users borrow the same underlying token that they used as collateral. For example, borrowing ETH and using their cETH as collateral.

When I try to liquidate those users (example from the screenshot) by using cETH.liquidateBorrow and sending ETH I get the nonReentrant “re-entered” error. This is because the cETH contract needs to call itself and throws an error.

so my question is this, is it not possible to liquidate users that are borrowing from the same cToken they use as collateral? If it not possible, then how does the cToken get the collateral back?

Thanks,

1 Like

Generation-1 cTokens don’t allow the same asset to be repaid and liquidated, e.g. ETH for ETH.

This is one of the many reasons for migragting to modern cToken implementations; ETH, USDC, ZRX, and BAT are the remaining generation-1 cTokens.

2 Likes

Ahh ok! Thank you sir.

1 Like