20,000 USDC
View results
Submission Details
Severity: gas

Staking.sol requires better documentation

Summary

Staking::update and Staking::updateFor perform unfamiliar math to calculate rewards and update the state variables, adding to the equation that names as index and supplyIndex doesn't give clear indication about the role of this variables it can be troublesome for users and even auditors to properly infer about how the contract works.

Recommendation

Consider renaming state variables index and supplyIndex, and enchance functions NatSpec.

Support

FAQs

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