The mint
function in DebtToken.sol
is responsible for minting DebtTokens
when a user borrows funds from the protocol. However, the function incorrectly adds balanceIncrease
to the amount, resulting
in over minting. This leads to users receiving more DebtTokens
than they actually should, increasing their debt and forcing them to pay excessive interest.
Issue in the Code
amountToMint
includes balanceIncrease
, which represents accrued interest rather than the actual borrowed amount.
This leads to users owing more than they borrowed, leading to excessive debt accumulation.
Incorrect Minting
The function mints amountToMint instead of just amount, inflating the user’s debt.
Borrowers pay more interest than necessary.
Users are unfairly charged excessive interest.
Borrowers are discouraged from using the protocol, leading to a loss of users and liquidity for the protocol.
manual review
Remove the lines containing the logic for balanceIncrease
and amountToMint
.
In the _mint()
function mint amount
instead of amountToMint
.
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.