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

Consider using named mappings

Summary

Consider using named mappings

Vulnerability Details

Consider moving to solidity version 0.8.18 or later, and using named mappings to make it easier to understand the purpose of each mapping

70 mapping(bytes32 => Pool) public pools;

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L70

19 mapping(address => uint256) public supplyIndex;
22 mapping(address => uint256) public balances;
24 mapping(address => uint256) public claimable;

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Staking.sol#L19-L24

Impact

Informational

Tools Used

Manual review

Recommendations

Used named mappings

Support

FAQs

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