# Empty Event Payload leads to Poor Observability
## Description
* The `SetNewSecret` event is designed to notify external systems and users when a secret is set or updated in the vault
* The event structure contains no fields or payload data, making it impossible for observers to distinguish between different secret operations, identify which user performed the action, or gather any meaningful context about the state change
```java
#[event]
struct SetNewSecret has drop, store {} // @> No fields - provides no useful information
public entry fun set_secret(caller: &signer, secret: vector<u8>) {
let secret_vault = Vault { secret: string::utf8(secret) };
move_to(caller, secret_vault);
event::emit(SetNewSecret {}); // @> Emits empty event with no context
}
```
## Risk
**Likelihood**:
* Every call to `set_secret()` emits an event with zero informational value
* External monitoring systems receive events but cannot determine the actor or context
* Off-chain applications relying on event data will lack critical operational information
* The issue affects all users and all secret operations consistently
**Impact**:
* Severely degraded observability for security monitoring and auditing
* External systems cannot track which users are setting secrets or when
* Impossible to correlate events with specific addresses or operations
## Proof of Concept
* No proof of concept needed - the issue is evident from the empty event structure definition.
## Recommended Mitigation
* Here is the fix for the event
```diff
#[event]
- struct SetNewSecret has drop, store {}
+ struct SetNewSecret has drop, store {
+ owner: address,
+ timestamp: u64,
+ // Note: Don't include the actual secret for privacy
+ }
public entry fun set_secret(caller: &signer, secret: vector<u8>) {
let secret_vault = Vault { secret: string::utf8(secret) };
move_to(caller, secret_vault);
- event::emit(SetNewSecret {});
+ event::emit(SetNewSecret {
+ owner: signer::address_of(caller),
+ timestamp: aptos_framework::timestamp::now_microseconds(),
+ });
}
```
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.