BlockNumberZero Logo

Sandwich Attack Simulator (v 0.5)

Understand how sandwich attacks work in DeFi trading

Whale Pool
Small Pool

Large liquidity pool with significant trading volume, typically found in major exchanges.

Parameters

Price Settings

1,000 2,000 20,000

Gas Cost

1 20 500
0.0006 ETH

Liquidity Pool

1k 10,000 100K
1M 1,000,000 100M
0.1% 0.3% 1%

Victim's Trade

0.01 1 100
0.1% 0.5% 10%

Attack Parameters

0.001 0.5 100

Price Impact Visualization

Liquidity Depth Chart

This chart shows how liquidity is distributed around the current price. The sandwich attack targets the slippage in this zone.

Pool State Updates

Stage ETH Reserve USDC Reserve Price (USDC/ETH) Constant K

Attack Summary

Victim Impact

Expected Output:

-

Actual Output:

-

Price Impact:

-

Slippage Tolerance:

-

Transaction Status:

-

Attacker's Profit

Front-run Cost:

-

Back-run Return:

-

Gas Cost (Total):

-

Net Profit:

-

ROI:

-

Profitable After Gas:

-

Detailed Transaction Breakdown