Trying to understand paying total borrow balance

Hi there. I’m new to compound and I’ve been experimenting with it on testnet.
I have a question about paying out all of my outstanding debt (i.e. borrowed amount)

For example, if I borrow 5 Ethereum from the Compound pool and pay back my debt, I’ll have to repay the principal (5 Ethereum) + accrued interest (let’s say 0.02 Eth). But every time I repay all my debt, I still have a fractional amount of Ethereum left on my borrowed account.

Is this because there will always be interest accrued during the fraction of the second when I repay my debt?

Would be great if someone can help me out on this!

Yes; if you’re using a smart contract to repay the balance, you can calculate your debt and repay the same quantity simultaneously.

The ERC-20 cTokens allow you to repay max, e.g. -1.

There is a contract called Maximillion used specifically to repay borrowed ETH (including interest, as of this block) on mainnet.

1 Like