In the contract code of StandardFunding.startNewDistributionPeriod(), the fundedSlateHash variable is not being correctly updated in the newDistributionPeriod struct when calling the startNewDistributionPeriod() function. This leads to the fundedSlateHash variable retaining its default value, which causes issues when calling the _updateTreasury() function.
struct QuarterlyDistribution {
uint24 id; // id of the current quarterly distribution
uint48 startBlock; // block number of the quarterly distributions start
uint48 endBlock; // block number of the quarterly distributions end
uint128 fundsAvailable; // maximum fund (including delegate reward) that can be taken o
uint256 fundingVotePowerCast; // total number of voting power allocated in funding stage
bytes32 fundedSlateHash; // hash of list of proposals to fund
}
the value of fundedSlateHash is not initialize in bellow initilization.
To fix this issue, the fundedSlateHash variable should be updated in the newDistributionPeriod struct when calling the StandardFunding.startNewDistributionPeriod() function.
Lines of code
https://github.com/code-423n4/2023-05-ajna/blob/main/ajna-grants/src/grants/base/StandardFunding.sol#L149-L155 https://github.com/code-423n4/2023-05-ajna/blob/main/ajna-grants/src/grants/base/StandardFunding.sol#L197-L220
Vulnerability details
Impact
In the contract code of StandardFunding.startNewDistributionPeriod(), the fundedSlateHash variable is not being correctly updated in the newDistributionPeriod struct when calling the startNewDistributionPeriod() function. This leads to the fundedSlateHash variable retaining its default value, which causes issues when calling the _updateTreasury() function.
Proof of Concept
the value of fundedSlateHash is not initialize in bellow initilization.
this lead to
Tools Used
Manual test
Recommended Mitigation Steps
To fix this issue, the fundedSlateHash variable should be updated in the newDistributionPeriod struct when calling the StandardFunding.startNewDistributionPeriod() function.
Assessed type
Invalid Validation