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

Change in Access modifier and gas usage:Lender.sol

Summary

The Ownable contract better to user one come with openzeppelin but if you want to used to make few change as ,I made is git repo which share above

Vulnerability Details

Impact

I have made two change in contract.

  1. Ownable:22 Gas usage when you call msg.sender it will gas to not much but small amount of extra gas, which didn't look to much in one transaction but it will waste of money, So before change new owner, store old owner and user it for event it will save small amount of gas.

  2. Ownable:9 , Modifier didn't to access modifier like public and private because those used within the contract

Tools Used

Foundry is used to test it working and gas consumption.

Recommendations

It is better to used Contract from openzeppelin which is already tested and verified.

Support

FAQs

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