The WToken contract implements an ownership mechanism where the owner address is set during contract deployment and cannot be changed afterward.
This immutability creates a significant risk as there's no mechanism to transfer ownership or update the owner address in case of compromise or contract upgrades.
In the WToken contract, the owner address is stored in a private variable that is set only once during contract initialization:
The owner address is used to restrict critical functions through the onlyOwner modifier:
However, once set, there is no functionality to update this address.
This creates a single point of failure as the ownership cannot be transferred to a new address if needed.
If the owner contract needs to be upgraded, the WToken must be redeployed as ownership cannot be transferred to the new contract
If the owner's private key is compromised, there's no way to transfer ownership to a secure address
Implement OpenZeppelin's Ownable2Step pattern for secure ownership transfers
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.