The repayBadDebtWithReserves
function is publicly accessible without any access control, allowing any user to potentially misuse the function and deplete the protocol's reserves.
The function is designed to reduce the badDebt
and totalReserves
of the contract. It lacks an onlyAdmin
or similar access control modifier, which should restrict the execution to authorized personnel, such as contract administrators or governance mechanisms.
If exploited, an attacker or any user could call this function repeatedly to drain the reserves of the protocol, leading to financial instability. This could also affect the protocol's ability to cover bad debt in the future.
Manual Review
Implement an access control mechanism to restrict the use of repayBadDebtWithReserves
. This can be done by adding a modifier that checks whether the caller is an authorized admin
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.