20k ETH debt that never got repaid?

Hey all, I am running a query for a wallet’s total debt borrowed and total debt repaid to see its liabilities over time. For some reason, there is a debt of 20k ETH that doesn’t appear to have been repaid. However, it does not look like the wallet still has the debt.

Does anyone know what could be going on here?

If the debt is no longer there but the wallet didn’t repay it, the most likely explanation is that someone else paid the debt – usually that would be via liquidation, but it is also possible for another wallet to repay debt on behalf of a wallet. That can be useful if the indebted address is out of gas, for example, or for services on top of Compound that manage users’ positions on their behalf.

1 Like

It’s possible that an application (like InstaDapp, DefiSaver, etc) could have called the repayBorrowBehalf function, lowering the account’s debt from another address / smart contract

Another address repaid the debt using repayBehalf():

Ethereum Transaction Hash (Txhash) Details | Etherscan - repayBehalf 3000 ETH

Ethereum Transaction Hash (Txhash) Details | Etherscan - repayBehalf 10000 ETH

Ethereum Transaction Hash (Txhash) Details | Etherscan - repayBehalf 7028 ETH

You can find these by searching for log events on cETH having the following properties:

address = 0x4ddc2d193948926d02f9b1fe9e1daa0718270ed5 (cETH)
topic[0] = 0x1a2a22cb034d26d1854bdc6666a5b91fe25efbbb5dcad3b0355478d6f5c362a1 (RepayBorrow)
borrower = 0x767ecb395def19ab8d1b2fcc89b3ddfbed28fd6b

The “Events” tab in Etherscan shows you these.