Since the init function is declared as an external function, anyone can call it without authorization or permission. This means that anyone can trigger the initialization of the token migration process.
Delete the global state variable s.wellOracleSnapshots[C.BEAN_ETH_WELL]
Without proper permission checks, anyone can call the init() function and delete this state variable. This may leave the contract in an inconsistent state or render related functionality unavailable.
Modify the global state variable s.season.beanEthStartMintingSeason
Likewise, modifications to state variables may lead to unforeseen results, especially if the caller does not have appropriate permissions or parameter validation.
Call other contract functions
Calls to the LibWhitelist.whitelistToken
and LibFertilizer.beginBarnRaiseMigration
functions are also risky. Unauthorized callers can perform these operations by calling the init()
function, which may result in loss of funds or inconsistent contract state.
Global variables and other functions can be called from any address, causing damage to the protocol
manual review
Add appropriate permission controls in the init() function to ensure that only authorized users can call the function
Limit the number of calls to the init() function
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.