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

Cashing borrows[i]

Summary

Changing:
bytes32 poolId = borrows[i].poolId;
uint256 debt = borrows[i].debt;
uint256 collateral = borrows[i].collateral;
To
Borrow calldata borrowInfo = borrows[i];
bytes32 poolId = borrowInfo.poolId;
uint256 debt = borrowInfo.debt;
uint256 collateral = borrowInfo.collateral;

Saves 9 gas in the tests because you only call the borrows[i] once.

Tools Used

vscode

Support

FAQs

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