The stalkIssuedPerBdv
variable is not updated in the dewhitelistToken
function
The dewhitelistToken
function removes an ERC-20 token from the Silo whitelist, but s.ss[token].stalkIssuedPerBdv
will not be updated.
In the dewhitelistToken
, updateWhitelistStatus
, and updateStalkPerBdvPerSeasonForToken
functions, the update value of s.ss[token] is not completely updated.
Check the relevant SiloSettings as follows:
https://github.com/Cyfrin/2024-04-beanstalk-2/blob/main/protocol/contracts/beanstalk/AppStorage.sol#L603
https://github.com/Cyfrin/2024-04-beanstalk-2/blob/main/protocol/contracts/beanstalk/AppStorage.sol#L435-L449
Comparison of the updated status of the current contract:
Removing a token's whitelisted status without updating the relevant variables may lead to inconsistencies in the data stored in the contract
Manual review
Please make sure to update or clear related variables appropriately when removing a token's whitelist status
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.