The LibWellMinting.check()
returns the time weighted average delta B
in a given Well since the last Sunrise. It snapshots the current cumulative reserves and then checks if If the length of the stored Snapshot for a given Well is 0
before proceeding to calculates the time weighted average delta B
since the input snapshot for a given Well address.
https://github.com/Cyfrin/2024-04-beanstalk-2/blob/27ff8c87c9164c1fbff054be5f22e56f86cdf127/protocol/contracts/libraries/Minting/LibWellMinting.sol#L57-L70
If the length of the stored Snapshot for a given Well is 0
, then the Oracle is not initialized.
However, this case is not handled by the check() function which ought to initialize the Well Minting Oracle
.
The Well Minting Oracle
will not be initialized.
Manual Review
Add an else
clause to handle this case:
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.