DeFiHardhatFoundry
250,000 USDC
View results
Submission Details
Severity: low
Valid

`SeasonGettersFacet.totalDeltaB()` uses single Well for calculations

Summary

As you can see it uses Bean / ETH Well instead of calculating deltaB for all whitelisted Wells:
https://github.com/Cyfrin/2024-05-beanstalk-the-finale/blob/df2dd129a878d16d4adc75049179ac0029d9a96b/protocol/contracts/beanstalk/sun/SeasonFacet/SeasonGettersFacet.sol#L96-L98

function totalDeltaB() external view returns (int256 deltaB) {
deltaB = LibWellMinting.check(C.BEAN_ETH_WELL);
}

Probably it was missed while implementing Whitelist v1.1

Impact

SeasonGettersFacet.totalDeltaB() returns incorrect result.

Tools Used

Manual Review

Recommendations

Loop through whitelisted Wells to calculate total deltaB.

Updates

Lead Judging Commences

inallhonesty Lead Judge 12 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

SeasonGettersFacet returns the wrong totalDeltaB

Appeal created

T1MOH Submitter
12 months ago
inallhonesty Lead Judge
12 months ago
inallhonesty Lead Judge 12 months ago
Submission Judgement Published
Validated
Assigned finding tags:

SeasonGettersFacet returns the wrong totalDeltaB

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.