Skip to content

Error in lesson 10 (and following question) #49

Discussion options

You must be logged in to vote

Great question.

So we just repaid everything that we had currently borrowed. But even in that split second that we borrowed it, we accrued interest, and that's what you'll see in that total_debt varible. However, we don't have any more DAI to pay off that debt. To finish paying it off, we'd have to go buy more DAI first. This is a bit longer to explain, so instead, I have some scripts and code here that can show you how to "buy" more DAI in a forked environment. https://github.com/PatrickAlphaC/defi_py_mix/blob/main/scripts/swap/swap.py

Once you buy more DAI, you can use it to pay the rest of your DAI debt off.

See this answer for the more verbose answer: #30 (comment)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@PatrickAlphaC
Comment options

@AlbertoSinigaglia
Comment options

@PatrickAlphaC
Comment options

Answer selected by PatrickAlphaC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants