15,000 USDC
View results
Submission Details
Severity: gas
Valid

Arithmetic Gas Optimization

Arithmetic Optimizations

The referenced lines are guaranteed to be performed safely as there cannot be more tokens in existence than its supply which in the case of minting is already checked for in the mint function (refer to links 1 and 2), the usd value of a users assets cannot surpass that of the max value of a uint256 (refer to link 3), and the totalCollateralValueToUsd can be safely unchecked as the multiplication done on the line above it would guarantee no overflow, therefore it is advised to surround these operations with an unchecked block in order to save on gas (refer to link 4).

Support

FAQs

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