The totalSupply()
function in the DebtToken
contract uses rayDiv
to scale the total supply by the normalized debt. However, the scaling should be done using rayMul
.
The code divides the total supply by the normalized debt using rayDiv
. This may not be correct, as the normalized debt should be applied to the total supply through multiplication (rayMul
), not division. Using rayDiv
instead of rayMul
might lead to inaccurate scaling and result in an incorrect total supply value.
Misrepresentation of the total supply, which could lead to incorrect debt tracking, interest calculations, and other protocol interactions that rely on this value.
Manual review
Update the totalSupply()
function to use rayMul
instead of rayDiv
for proper scaling
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.