Details:
In the InheritanceManager
contract, the appointTrustee(address _trustee)
function updates the trustee
state variable without emitting any event. Events are crucial for off-chain monitoring and auditing, as they log state changes that external observers or indexing services rely on to track important actions. Without an event, stakeholders may miss or delay detecting the update of the trustee, complicating transparency and accountability.
Root Cause:
The root cause is the absence of event emission in the appointTrustee
function. When updating the trustee
variable, no logging mechanism (such as an event) is implemented, likely due to an oversight in adhering to best practices for smart contract event logging.
Impact:
While this omission does not directly enable an attacker to exploit the contract or steal funds, it reduces the transparency of state changes. This can lead to difficulties in auditing the contract’s behavior, delayed detection of unauthorized changes, and complications in off-chain analytics or monitoring systems that rely on event logs.
Recommendation:
Introduce an event to log the assignment of a new trustee. This ensures that every change to the trustee state is recorded and can be tracked by auditors and monitoring tools. For example:
Adding this event not only improves transparency but also aligns the contract with common best practices for state change notifications.
Proof of Concept:
Deploy the contract and call the appointTrustee
function with a new trustee address.
Observe that, without the event, no log is generated.
After implementing the event emission as recommended, calling the function will produce an event log (TrusteeAppointed
), which can be verified using transaction logs on a blockchain explorer or via event listeners.
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.