You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Incorrect slippage check in ReputationMarket.sellVotes
Summary
When users sell votes, they can set a minimum price they want to receive per vote. However, the code checks this minimum price before deducting fees, rather than after. This means users could receive less than their specified minimum price.
Soft Chambray Jaguar
High
Incorrect slippage check in ReputationMarket.sellVotes
Summary
When users sell votes, they can set a minimum price they want to receive per vote. However, the code checks this minimum price before deducting fees, rather than after. This means users could receive less than their specified minimum price.
The
sellVotes
function lets users sell their votes and specify a minimum price per vote. Here's the issue:This means the actual amount received may be lower than what was checked against the minimum price.
Scenario
Let's say:
What happens:
Impact
Users receive less money than they expected based on their minimum price setting.
LOC
https://github.com/sherlock-audit/2024-12-ethos-update/blob/main/ethos/packages/contracts/contracts/ReputationMarket.sol#L553
Fix
Calculate the price per vote using the after-fee amount
proceedsAfterFees
The text was updated successfully, but these errors were encountered: