20,000 USDC
View results
Submission Details
Severity: high

The protocol is in risk of Reentrancy Attack

Summary

The claim function in Staking.sol does not follow CEI pattern and not using Reentrancy Guards

Vulnerability Details

The claim function in Staking.sol updating the state of the contract after transfering the tokens to the sender and it voilates the CEI pattern which should be followed.Users can drain the funds in the protocol by reentering the claim function multiple times as the contract state is not updated before transfering.

Impact

High risk as users can drain the protocol by calling claim functions multiple times

Tools Used

Recommendations

Its better to use openzeppelin's ReentrancyGuard and also follow CEI pattern while writing the code.

Support

FAQs

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