15,000 USDC
View results
Submission Details
Severity: high

Potential underflow in _burnDsc function

Summary

There is a potential underflow in _burnDsc function

Vulnerability Details

In the _burnDsc function, there's a possibility of underflow when subtracting the amountDscToBurn from s_DSCMinted[onBehalfOf]. If the amountDscToBurn is greater than the user's s_DSCMinted[onBehalfOf], it will result in an underflow.

The result of this is that all functions such as burnDsc calling the _burnDsc function may underflow.

Impact

It causes excessive burning of Dsc tokens.

Tools Used

Manual review

Recommendations

Use OpenZeppelin's SafeMath for arithmetic operations.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.