The set_secret function emits a SetNewSecret event after storing the Vault resource, intended to notify off-chain listeners of a new secret being set, supporting transparency in the contract's operations as per Aptos event standards.
The SetNewSecret event struct is defined with only drop and store abilities but no fields (e.g., caller address or secret hash), resulting in empty emissions that convey no meaningful information about the action. This limits auditability, making it impossible to track who performed the set or verify details without querying the entire state, contradicting best practices for event-driven smart contracts and reducing the contract's usability for monitoring.
Likelihood:
Every successful call to set_secret emits the empty event, providing no useful data for indexing or analysis in explorers or apps.
Deployment on public chains like Aptos exposes events to all, but their emptiness makes them ineffective for real-world tracking without additional on-chain queries.
Impact:
Emitted events lack caller address, timestamp, or secret hash, preventing off-chain monitoring or auditing of secret-setting actions, which could hide malicious activity.
Users or auditors face difficulties verifying contract usage, potentially leading to undetected issues like spam or unauthorized sets in multi-user scenarios.
This POC calls set_secret and verifies the event is emitted (by counter check) but asserts that it contains no data, proving its insufficiency for auditing.
Add fields to SetNewSecret for key details (e.g., caller address and secret hash) and emit them in set_secret.
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.