Events emitted by a contract should contain relevant data to allow off-chain services to monitor on-chain activity.
The SetNewSecret
event is an empty struct. When emitted, it signals that an update happened but provides no context, such as who performed the action or when it occurred.
Likelihood: High
This uninformative event is emitted every time set_secret
is successfully called.
Impact: Low
Reduced Auditability: It is difficult for off-chain tools, block explorers, or security dashboards to track the vault's history.
Integration Difficulty: Applications that want to react to a secret being updated cannot easily use this event because it lacks identifying information.
The issue is self-evident from the code. When event::emit(SetNewSecret {})
is executed, an event with an empty data payload is logged. An off-chain indexer parsing this event cannot determine who the owner was or get a timestamp without parsing the raw transaction details, defeating the purpose of events.
Add relevant fields to the event struct and populate them when the event is emitted.
This is an Informational finding. It has no impact on the security of the protocol.
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.