The changeCollector
function in Snow.sol
implements a dangerous single-step ownership transfer pattern that can permanently lock out fee collection if the current collector makes an error when specifying the new collector address.
In Snow.sol
:
The function immediately transfers collector privileges to the new address without any confirmation mechanism. If the current collector accidentally provides an incorrect address (typo, wrong contract address, or inaccessible address), the collector role becomes permanently locked, making fee collection impossible.
Accidental input error:
Current collector intends to transfer rights to 0x1234...ABCD
Due to copy-paste error, enters 0x1234...ABCE
(single character difference)
Transaction executes successfully, transferring rights to uncontrolled address
Original collector loses access, new address doesn't respond
Fee collection becomes permanently impossible
If collector rights are transferred to an inaccessible address, all accumulated fees become permanently locked
The protocol loses its primary revenue mechanism permanently
There's no way to recover from this error
Implement a two-step ownership transfer pattern with confirmation mechanism:
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.