20,000 USDC
View results
Submission Details
Severity: low

Check-Effect-Interaction is not enforced

Summary

The claim function of the staking contract is setting the claimable mapping after a token transfer.

Solidity recommends the usage of the Check-Effects-Interaction Pattern to avoid potential security issues, such as reentrancy.

Vulnerability Details

claim function of Staking.sol contract is updating the claimable mapping after the external call which can be used by attacker to control the flow of the contract and further reenter into the function. It is advisable to follow CEI pattern.

Impact

May cause minimal or un-noticeable impact, But this should be remediated as external call may lead of reentrancy to other functions as well.

Tools Used

manual

Recommendations

Although the impact is very limited, it is recommended to implement:

  1. modifier such as nonReentrant

  2. checks-effects-interactions pattern.

Support

FAQs

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