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',

File: src/Lender.sol
70: mapping(bytes32 => Pool) public pools;

Link to code - https://github.com/Cyfrin/2023-07-beedle/tree/main/src/Lender.sol

File: src/Staking.sol
19: mapping(address => uint256) public supplyIndex;
22: mapping(address => uint256) public balances;
24: mapping(address => uint256) public claimable;

Link to code - https://github.com/Cyfrin/2023-07-beedle/tree/main/src/Staking.sol

Tools Used

Code Review

Recommendations

Consider using named mappings

Auditor

NeoCrao

Support

FAQs

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