Urgent.News

What's breaking now, across thousands of outlets.

Finance & Markets

I went looking for sandwiches and found a DEX pool trading with itself

A DEX trader sees a quote and a fill and cannot tell what stood between them. I set out to measure the obvious suspect, the sandwich: a bot that buys just before you and sells straight after, in the same block. I found almost none. What I found instead was a pool where two thirds of the volume was three wallets trading with themselves. The pool was ranked #1 on the same activity those trades were…

A DEX trader encountered a puzzling situation while searching for sandwich transactions. The trader aimed to identify bots that buy just before a user and sell immediately after, all within the same block. However, the trader discovered something else: a pool where approximately two-thirds of the volume involved three wallets trading with themselves. This pool ranked first in terms of activity during the observed trades.

The underlying code, known as middleman.edycu.dev, was developed by Edycutjong. The code is written in Python, MIT licensed, and does not require any secret keys. The key components required for a sandwich detector include the maker's wallet (ma), the block number (h), the log index inside the block (lgid), the side of the trade (tp), and the amounts of tokens traded (a0 and a1).

Using this code, the trader identified a row that demonstrated a sandwich transaction. The information in the row included the block number (26006339), the log index (209), the side of the trade (sell), the maker wallet (0xc9160fdab187f2e55567b760d88a87ae7fe56d95), and the amounts traded (842991.8537715519 and 1.0430246602456774). The maker address helped the trader determine if the same wallet participated in both sides of the trade.

The trader also noted that the block number and log index were initially quoted as strings, which caused issues in the detector algorithm. To rectify this, the trader implemented a function to convert them into integers. Rows that couldn't be placed were discarded and counted.

The trader then joined the printouts to determine the correct order of trades within each block. By doing so, they identified a pattern of round-trip transactions within a single block, indicating a sandwich approach. For instance, a specific transaction involved three wallets trading with themselves, accounting for 66.2% of the pool's volume. The sandwich rate for this particular pair was found to be extremely low at 0.025%.

In conclusion, the trader's findings revealed that while there were no same-block sandwiches, there were instances of round-trip trades within a single transaction. This information is crucial for traders to understand the dynamics of the market and make informed decisions.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Finance & Markets

Two in three 'liquidity pulled' alerts are the same wallet putting it back

A treasury bot pings: LP removed, −$21,330,275, UNI/WBTC. Somebody pulls up a chart, somebody asks in the group chat whether the market maker left, and for the next hour the answer is a guess.

  • $21,330,275 liquidity removed from UNI/WBTC pool
  • Wallet re-added 99.8% within six hours
  • 66.6% of large liquidity events show re-addition

Frozen tax thresholds to hold back Brits for ten miserable years

In March 2021 Chancellor Rishi Sunak described it as “a tax policy that is progressive and fair.” In November 2022, Chancellor Jeremy Hunt extended the policy, describing it as necessary and fair. In October 2024, Chancellor Rachel Reeves announced an end to the policy, saying extending it beyond 2028 “would hurt working people.” Alas, a…

If Brexit is to blame for Britain’s economic woes what’s the EU’s excuse?

The Labour government is blaming Brexit for low growth but ignoring that’s it’s a phenomenon plaguing the EU as well, says Paul Ormerod At the weekend, Bridget Phillipson became the latest leading politician to pin the economic woes of the UK on Brexit. She recognised that youth unemployment will continue to rise but argued that [...]

More from Wednesday 23 September →