You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Severity: Informational
Difficulty: Low
Type: Auditing and Logging
Description
Several critical operations in the ReleaseGold contract do not trigger events. As a result, it could be difficult to review the correct behavior of the contracts once deployed.
Critical operations that would benefit from triggering events include:
withdraw: this function self-destructs once its balance reaches zero. It could be helpful to emit an event before triggering contract destruction.
refundAndFinalize: this function also self-destructs when called after the release schedule has been revoked. While that revocation is logged with an event, since this is a separate function call it could also be useful to log separately as well.
Users and blockchain monitoring systems will not be able to easily detect suspicious behaviors without events.
Exploit Scenario
Bob withdraws the last of his tokens from the contract, causing it to self-destruct. However, he miscalculated his remaining balance and believes there are still tokens remaining in the contract. Bob attempts to withdraw them again but the calls fail. He reviews the event log for the contract but does not see anything that would cause his calls to fail.
Recommendation
Short term, add the missing events for the operations noted above.
Long term, err on the side of logging events for any state transitions. Events help to monitor the contracts and trace suspicious behavior.
The text was updated successfully, but these errors were encountered:
Missing event logging in ReleaseGold
Severity: Informational
Difficulty: Low
Type: Auditing and Logging
Description
Several critical operations in the ReleaseGold contract do not trigger events. As a result, it could be difficult to review the correct behavior of the contracts once deployed.
Critical operations that would benefit from triggering events include:
Users and blockchain monitoring systems will not be able to easily detect suspicious behaviors without events.
Exploit Scenario
Bob withdraws the last of his tokens from the contract, causing it to self-destruct. However, he miscalculated his remaining balance and believes there are still tokens remaining in the contract. Bob attempts to withdraw them again but the calls fail. He reviews the event log for the contract but does not see anything that would cause his calls to fail.
Recommendation
Short term, add the missing events for the operations noted above.
Long term, err on the side of logging events for any state transitions. Events help to monitor the contracts and trace suspicious behavior.
The text was updated successfully, but these errors were encountered: