The _execUSDPriceUpdate function sets the same USD price for all token contracts in the provided array. This can lead to incorrect price updates if different tokens have different USD prices, potentially causing financial discrepancies and inaccuracies in the system.
Proof of Concept
In the _execUSDPriceUpdate function, the same USD price is applied to all token contracts in the array:
Ensure that the USD price update is specific to each token contract. Modify the proposal structure to include a mapping of token contracts to their proposed prices and update the proposal functions accordingly.
Lines of code
https://github.com/code-423n4/2024-05-munchables/blob/57dff486c3cd905f21b330c2157fe23da2a4807d/src/managers/LockManager.sol#L506
Vulnerability details
Impact
The
_execUSDPriceUpdate
function sets the same USD price for all token contracts in the provided array. This can lead to incorrect price updates if different tokens have different USD prices, potentially causing financial discrepancies and inaccuracies in the system.Proof of Concept
In the
_execUSDPriceUpdate
function, the same USD price is applied to all token contracts in the array:Tools Used
Manual Review
Recommended Mitigation Steps
Ensure that the USD price update is specific to each token contract. Modify the proposal structure to include a mapping of token contracts to their proposed prices and update the proposal functions accordingly.
Assessed type
Context