15,000 USDC
View results
Submission Details
Severity: gas

The redeemCollateralForDsc function wastes gas be checking the healthFactor twice

Summary

The redeemCollateralForDsc function calls the _revertIfHealthFactorIsBroken function twice, this is redundant and wastes gas.

Recommendations

Use the _burnDsc instead of the burnDsc function inside the redeemCollateralForDsc function to skip the first call of _revertIfHealthFactorIsBroken and save gas.

Support

FAQs

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