Normally, the setFestivalContract
function allows the owner to set the address of the festival contract that controls minting and burning.
In this implementation, the address can only be set once. After the initial assignment, it cannot be changed, making the relationship between the token and the festival contract permanent.
Likelihood:
This will occur in any scenario where the festival contract needs to be upgraded or replaced after initial deployment.
Projects with long lifespans or evolving requirements are more likely to encounter this limitation.
Impact:
If the festival contract has a bug or needs new features, a new token contract must be deployed, disrupting users and integrations.
Loss of flexibility can increase operational and upgrade costs.
The following call demonstrates that after the initial assignment, any attempt to set the festival contract again will revert, making upgrades impossible:
Allowing the owner to update the festival contract address, possibly with a timelock, restores upgradeability while still providing security. The following change implements this flexibility:
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.