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

Code formatting

Summary

Code formatting can be improved

Vulnerability Details

Code can be better formatted with appropriate spacings, commas, indents, etc. Consider the following examples
Missing 2 lines spacing between contract definition and first code item inside the contract
Fees.sol line 12
contract Fees {
address public immutable WETH;
....
Lender.sol line 11
contract Lender is Ownable {
event PoolCreated(bytes32 indexed poolId, Pool pool);
event PoolUpdated(bytes32 indexed poolId, Pool pool);

Lender.sol line 19
Next mapping seperated by 2 lines but the following 2 mappings have no spacing betweent

Above are just example. Running code in VS, various tools etc will reveal all the formatting issues

Impact

Informational : This impacts the code readability and code quality

Tools Used

VS Code
Static Analyzer
Manual Analysis

Recommendations

It is recommended to make use of style guide to ensure code is formatted correctly maybe by using a formatter e.g foundry formatting tool. It is recommended there are appropriate spacings in code e.g see example below

Fees.sol line 12
contract Fees {

address public immutable WETH;

//Add 2 line spaces between contract definitions and the first line of code in contracts
Fix for above and any other instances of spacing and any other indentation + code formatting you may find not mentioned here.

Support

FAQs

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