Amusing Plastic Fox
Medium
A user can have fewer votes than the specified minimum if they set a maxVotes value that is lower than the minimum number of votes.
In buyVotes
, there is no check to ensure that maxVotesToBuy is greater than minVotesToBuy, as we can see here :
https://github.com/sherlock-audit/2024-12-ethos-update/blob/main/ethos/packages/contracts/contracts/ReputationMarket.sol#L440-L449
which means the purchased votes will be less than or equal to maxVotesToBuy and, therefore, less than minVotesToBuy as we can see here :
https://github.com/sherlock-audit/2024-12-ethos-update/blob/main/ethos/packages/contracts/contracts/ReputationMarket.sol#L452-L467
None.
None.
- Bob wants to buy some votes from a market.
- He want to disable the maxvotes so he set the maxVotesToBuy to 0.
- He get absolutely no votes from the call.
The user will not get the votes he wants.
No response
Add a check with a custom error that will ensure that the minimum is less than the maximum of votes.