Summary: The stake function violates the Checks-Effects-Interactions (CEI) pattern, potentially allowing a reentrancy attack.
Vulnerability Details: The stake function updates the contract’s state after making an external call, violating the CEI pattern. This could enable a reentrancy attack, allowing an attacker to exploit the contract and withdraw more funds than they are entitled to. if a transfer fails but the state is still updated, this could be problematic.
Impact: Potential loss of funds from the contract.
Tools Used: Manual code review.
Recommendations: Reorder the stake function to ensure all state changes occur before any external calls.
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.