Functions like unstake
, unstakeVested
, unstakeAll
, claimReward
, and completeClaimRequest
involve token transfers before the state is fully updated. This could be exploited through a reentrancy attack, where an attacker could re-enter the function before the state changes, potentially draining the contract.
Recommendation: Use the Checks-Effects-Interactions
pattern, ensuring state changes occur before external calls (like token transfers). Additionally, consider adding reentrancyGuard
using the ReentrancyGuard
modifier from OpenZeppelin.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.