Detailed description of the impact of this finding.
we are increasing usdUpdateProposal.approvalsCount in both proposeUSDPrice and
approveUSDPrice.This will cause an extra increase in approvalsCount.
Proof of Concept
Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.
Lines of code
https://github.com/code-423n4/2024-05-munchables/blob/main/src/managers/LockManager.sol#L200 https://github.com/code-423n4/2024-05-munchables/blob/main/src/managers/LockManager.sol#L171
Vulnerability details
Impact
Detailed description of the impact of this finding. we are increasing usdUpdateProposal.approvalsCount in both proposeUSDPrice and approveUSDPrice.This will cause an extra increase in approvalsCount.
Proof of Concept
Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.
function proposeUSDPrice( uint256 _price, address[] calldata _contracts ) external onlyOneOfRoles( [ Role.PriceFeed_1, Role.PriceFeed_2, Role.PriceFeed_3, Role.PriceFeed_4, Role.PriceFeed_5 ] ) { if (usdUpdateProposal.proposer != address(0)) revert ProposalInProgressError(); if (_contracts.length == 0) revert ProposalInvalidContractsError();
Tools Used
Recommended Mitigation Steps
Do not implement usdUpdateProposal.approvalsCount++ in proposeUSDPrice.
Assessed type
Context