The contract Staking.sol
frequently emits events after external calls, which is considered poor practice. It's advisable to emit events before executing external calls to ensure accurate event logging. For instance, in the Staking.sol::withdraw()
function, this pattern is observed:
Impact: While emitting information after it has occurred might seem rational, it can introduce vulnerabilities. This approach can be exploited, potentially leading to manipulation and incorrect data being registered by monitoring systems. Ultimately, this could necessitate a code migration to rectify the issues caused by inaccurate event logging.
Recommended Mitigation: Place the events in the effects part of the function after the state variables have been updated but before the interactions with external elements.
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.