code-423n4 / 2024-05-munchables-findings

3 stars 1 forks source link

A Price Feed address can vote against and in favor of the same proposal at the same time #472

Closed howlbot-integration[bot] closed 3 months ago

howlbot-integration[bot] commented 3 months ago

Lines of code

https://github.com/code-423n4/2024-05-munchables/blob/main/src/managers/LockManager.sol#L194

Vulnerability details

In the contract's approveUSDPrice function, in order to prevent repeated voting, the caller needs to be checked accordingly. However, the approveUSDPrice function only checks that the caller has not voted for it, but not whether it has voted against it. This leads to the possibility that the user first votes against the proposal and then votes in favor, then he will be able to vote twice for the same proposal

Assessed type

Invalid Validation

c4-judge commented 3 months ago

alex-ppg marked the issue as satisfactory