Skip to content
Business logic Audit finding Intermediate

Missing slippage protection on `sellVotes()`

0xAnmol Follow with 0xDemon, 0xMosh and 37 others

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2024-11-ethos-network-ii-judging/issues/451

Found by

0xAnmol, 0xDemon, 0xMosh, 0xaxaxa, 1337web3, Abhan1041, Al-Qa-qa, BengalCatBalu, Contest-Squad, DenTonylifer, HOM1T, John44, KlosMitSoss, Kyosi, LeFy, Ryonen, X12, blutorque, bughuntoor, cryptic, dobrevaleri, durov, iamthesvn, immeas, justAWanderKid, ke1caM, mahdikarimi, nikhilx0111, pashap9990, qandisa, redbeans, rscodes, smbv-1923, t.aksoy, t0x1c, tmotfl, underdog, zeGarcao, zhenyazhd, zxriptor

Summary

The ReputationMarket contract provides preview functions (simulateBuy() and simulateSell()) to estimate outcomes before actual transactions (buyVotes() and sellVotes()). While buyVotes() includes slippage protection against price changes between simulation and execution, sellVotes() lacks this safeguard. While Base L2's private mempool prevents traditional frontrunning, users are still exposed to two risks:

  1. Market volatility between simulation and execution could result in receiving fewer funds than expected
  2. The sequencer prioritizes transactions with higher fees (ref), allowing users paying higher fees to execute trades first, potentially leading to unfavorable price movements for pending transactions with lower fees.

Root Cause

sellVotes() is missing slippage protection.

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

  1. User calls simulateSell() to preview expected returns
  2. Market experiences high sell volume, causing price decline
  3. User submits sellVotes() transaction with outdated price expectations
  4. Due to missing slippage protection, transaction executes at significantly lower price than simulated, resulting in unexpected losses

Impact

Loss of assets for the affected users.

PoC

No response

Mitigation

Implement a slippage control that allows the users to revert if the amount they received is less than the amount they expected.

Discussion

sherlock-admin2

The protocol team fixed this issue in the following PRs/commits: https://github.com/trust-ethos/ethos/pull/2214

The original report as published on Sherlock, by 0xAnmol. Images and videos are our own copies; raw HTML is shown as text. View it on Sherlock.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is known

A medium-severity business logic bug in Ethos Network Financial Contracts. Sherlock made it public on 20 December 2024. Found in the 675 audit contest (finding M-2), also found by 39 other wardens.

About Business logic

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by 0xAnmol

View all

7 more disclosed reports, best first.

More from Ethos Network Financial Contracts

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.