20,000 USDC
View results
Submission Details
Severity: medium

claim Reentrancy Attack:Staking.sol

Summary

Claim Reward in Staking.sol contract, but claimable value will be updated after transfer which lead to very well know Reentrancy on function.

Vulnerability Details

Reentrancy Attack user can claim amount multiple time by call function from other contract and take all balance from contact.

Impact

Lose if all balance in contract

Tools Used

Remix and foundry

Recommendations

Used openzeppelin-contracts :ReentrancyGuard contract to defend from Reentrancy and updated claimable value first then call transfer.

Support

FAQs

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