Borrowers immediately have to pay interest as they are minted an incorrect amount
When users borrow, we mint them like this:
If we imagine that balanceIncrease
is 0, then we simply mint them amount
which is the same amount of tokens we send to the borrower:
This results in the borrower immediately having to pay interest, even if he repays in the same second. If we see balanceOf()
which equals the funds a borrower has to repay with interest:
We will see that we get the balanceOf()
of the user which is the amount minted and then we apply the index. If the user borrows 100 tokens at an index of 1.5, then he will get minted 100 tokens but when he repays, he will immediately have to pay 100 * 1.5 = 150
.
Borrowers immediately have to repay interest due to wrong values
Manual Review
When minting, mint the amount divided by the index
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.