The orderbook mechanism implemented in the DittoEth protocol's OrdersFacet.sol
smart contract presents potential front-running risks. Specifically, the cancelBid()
, cancelAsk()
and cancelShort()
functions may be susceptible to front-running, putting traders at risk of unfair execution of their trades.
Order books on-chain have been criticized for their slow processing speeds, which can be exploited by malicious actors, particularly miners. In the DittoEth protocol, the observed vulnerabilities lie in the cancelBid()
, cancelAsk()
and cancelShort()
functions. Malicious actors or miners can prioritize transaction acceptance of a bid over its cancellation, thereby preventing a user from cancelling a bid when market conditions change unfavorably. This can be exploited by accepting a bid before its associated cancellation transaction gets processed, even if the cancellation was initiated first by the trader.
Potential loss of funds for traders. If they are unable to cancel their orders in time due to mempool manipulations, they may be forced into unfavorable trades. Furthermore, this vulnerability can undermine the trust in the DittoEth protocol, making users hesitant to engage in trades using the platform. Such front-running attacks can distort the fairness of the trading environment and can lead to significant financial implications for affected users.
Implement Commit-Reveal Scheme: Implement a commit-reveal scheme. Users first commit to an action without revealing specifics. After all commitments are made, users reveal their intended actions, which are then processed.
Batch Processing: Process orders in batches rather than in real-time. This minimizes the opportunity window for front-running.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.