In Cyfrin_Hub.vy the sell_to_customer function updates the company's reputation in two places:
When a sale succeeds and reputation < 100, the code increases reputation but currently does not emit ReputationChanged.
When a sale fails due to insufficient inventory, the function decreases reputation and emits ReputationChanged(new_reputation=...).
This asymmetry means successful reputation changes are not recorded in events, reducing on-chain observability and making it harder for off-chain indexers, UIs, and auditors to track reputation history.
Likelihood: High
Occurs under normal, expected circumstances
Impact: Low
Events are the canonical way to track state changes on-chain. Not emitting an event on a successful reputation increase makes the protocol harder to monitor and debug.
This is an low impact issue (missing event), so PoC is simply observing transaction traces where a successful sale increases reputation but no ReputationChanged event is emitted. Example steps:
Ensure reputation is below 100 (e.g., set to 98 in test setup).
Call sell_to_customer via the CustomerEngine with requested small enough to succeed.
Observe the transaction receipt: the Sold event should be present, the reputation state variable should have increased, but no ReputationChanged event is emitted.
Add an event as shown
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.