The absence of an emit function or event logging in the setOwner function poses a vulnerability as it lacks transparency and makes it challenging to track changes in ownership.
The setOwner function modifies the contract's owner without emitting an event or logging the change. This absence of transparency makes it difficult to monitor and verify ownership changes on the blockchain.
Without proper event logging, it becomes challenging to detect and verify whether the setOwner function was called, potentially allowing unauthorized changes in ownership to go unnoticed.
Manual Review
To address this vulnerability, it is crucial to emit an event within the setOwner function to log ownership changes. This ensures transparency and provides an auditable record of ownership modifications on the blockchain.
// This should be above constructor
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.