Description:
The setFestivalContract(address _festival)
function inside BeatToken.sol
allows the owner
to assign the festivalContract
address but only once.
This means no mechanism exists to update, change, or recover the festival contract in case of a bug, compromised address, or redeployment.
// Root cause in the codebase with @> marks to highlight the relevant section
Likelihood:
Once the function is called, the contract becomes rigid to changes—this is likely to occur immediately during deployment setup.
In real deployments, issues often arise due to integration bugs or security incidents that require the ability to reconfigure system components.
Impact:
Project becomes non-upgradable even in emergency scenarios.
Loss of control in case of vulnerabilities or logic bugs in the initially set festival contract.
Potential for full reward logic breakdown if festivalContract
misbehaves or self-destructs.
And use a safer pattern like:
This is intended. It's done like that because the festival contract requires beat token's address and vice versa.
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.