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

Declare function as private

Summary

Currently Staking::update and Staking::updateFor are declared a public in the contract but any interaction with any other function will result in these functions being called always, so there is almost no motivation for users to spend gas to call these functions.

Recommendation

Declare these functions as private to reduce deployment cost of Staking.sol by 15618 units of gas.

Support

FAQs

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