The protocol uses the Diamond proxy pattern, but there are structs that are declared outside the AppStorage.
The Beanstalk protocol is upgradeable and uses the Diamond proxy pattern. In a Diamond (multi-facet) architecture, shared state variables are typically stored in a central location, such as an AppStorage struct, to ensure that all Facets can access and modify the same state consistently. This is a key feature of the Diamond Standard (EIP-2535):
https://eips.ethereum.org/EIPS/eip-2535#storage
There are two structs that are declared outside of AppStorage. The first one is the Supply struct in the FertilizerFacet:
And the second one is TwapVariables struct defined in the LibChainlinkOracle:
The variable states that are shared accross different facets should be declared in the AppStorage.
Manual Review
Declare the Supply and TwapVariables structs in the AppStorage.
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.