Ensure that all state changes are done before any external calls (like token transfers in this case). Although SafeERC20 is used, which mitigates some risks, it's still good practice to follow the checks-effects-interactions pattern.
Reentrancy vulnerabilities occur when an external contract is called before all internal state changes are completed, allowing the external contract to call back into the original function and potentially exploit the incomplete state. Even though the SafeERC20
library is used, which reduces the risk of reentrancy, it is still crucial to follow the checks-effects-interactions pattern to ensure the contract's security.
Draining funds from the contract
Manipulating contract state
Manual Inspection
To prevent reentrancy attacks, it is essential to follow the checks-effects-interactions pattern, which involves:
Checks: Verify conditions before making any state changes or external calls.
Effects: Make all necessary state changes.
Interactions: Call external contracts only after state changes are completed.
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.