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

Optimizations

[G-01] - cache the length of the tokens array and use unchecked{ i = i + 1 } to save most gas

[G-02] - in liquidate() move the _revertIfHealthFactorIsBroken(msg.sender) to the top, to save gas in case the sender is liquidatable

[G-03] - in getAccountCollateralValue() check if the amount is not 0 before wasting gas on getUsdValue(), since a user may not have deposited any collateral of the current token.

[G-04] - use a payable constructor to avoid the msg.value == 0 internal check

[NC-01] - consider determining a version, instead of using a floating pragma.

Support

FAQs

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