Blokiments Docs
  • 🚀Welcome to Blokiments Docs
  • ⭐Start here
    • Build your first advanced signal bot
    • Crypto Security Tips
    • Essential Checklist Before Buying Any Crypto Token
  • ❓Frequently Asked Questions
  • 🛣️Roadmap and Releases
    • Releases
    • Supported Networks
  • 🧑‍🤝‍🧑Referral Program
  • FEATURES
    • Strategies
    • Discovery Hub
      • Filters guide
        • General filters
        • Social filters
        • Security filters
        • Trading filters
        • Our scores
    • Token Analyzer
      • Security metrics
      • Social metrics
    • Caller tracker & analysis
      • Finding well performing callers
      • Caller analyzer
      • Real-Time Alerting
    • Smart Money analysis
      • Find smart money wallets
      • Analyze wallets with ease
      • Track wallets in real-time
    • Watchlists
    • Alerts
      • Telegram Alerts
      • Discord Alerts
      • Webhook Alerts
    • Search
    • Telegram Token Checker Bot
    • Blokiments API
      • Google Sheets Integration
      • Get historical price data
  • GUIDES
    • 🔥Strategy building guides
    • 📚Blog
      • Security
        • Smart contract honeypot analysis
        • Rug pullls
        • Pump Scammer Analysis
        • Smart money scammer
        • Token Sewage Spill on Base
      • Tokenomics
      • Presales
      • 💧Liquidity
        • Liquidity pools
      • Getting Slipped? Or getting MEV’d?
      • Smart Token Sniper
      • Token Comparison Workflow
      • The Value of Merging On-Chain and Off-Chain Data in Token Analysis
      • The bad, worse, and the worst
      • Caller tokens analysis
      • In-depth token analysis
        • In depth: RFC
        • In depth: Magnetix
        • In depth: House
      • In-depth wallet analysis
        • Wallet report #1
        • Wallet report #2
        • Wallet report #3
    • 📑Useful resources
      • Twitter
      • Github
      • Webpages
  • About
  • Legal
    • Terms and Conditions
  • LINKS
    • App
    • Twitter
    • Community
Powered by GitBook
On this page
  • What Are MEV Bots?
  • How do MEV Bots Work?
  • Why MEV Bots Matter
  • What is Slippage?
  • How MEV Bots and Slippage Interact
  • Protecting Yourself Against MEV Bots and Slippage

Was this helpful?

  1. GUIDES
  2. Blog

Getting Slipped? Or getting MEV’d?

Have you ever encountered the term MEV bot or slippage? This post will explore what these terms mean and how they work.

What Are MEV Bots?

MEV, or Maximum Extractable Value bots, are automated programs designed to identify profitable opportunities within a blockchain’s transaction pool (mempool) and reorder, insert, or front-run transactions to extract value. These actions are often malicious and harm the original transaction sender.

How do MEV Bots Work?

  1. Arbitrage: MEV bots scan decentralized exchanges (DEX) for price discrepancies between different platforms and capitalize on arbitrage opportunities. If the price of a token is lower on one DEX and higher on another, the bot will buy low and sell high in a single transaction, capturing the difference. This is generally not malicious because it helps tokens keep the same price across all exchanges.

  2. Front-Running: MEV bots monitor the mempool (where unconfirmed transactions are visible) for large trades that might impact market prices. The bot can then front-run these trades by submitting a similar transaction with a higher gas fee, ensuring it gets processed before the original one, thus potentially making the original transaction invalid. By doing so, the bot gets all the benefits of the executed transaction.

  3. Sandwich Attacks: These are more malicious tactics. Sandwich attacks occur when the bot sees a large trade that will move the price of an asset significantly. The bot places one trade just before (buy) and one trade just after (sell) the large trade. As a result, it profits from the price swing while negatively impacting the original trader.

Why MEV Bots Matter

For miners or validators, MEV presents an opportunity to extract additional profits. However, for regular users, MEV bots can be problematic. When MEV bots front-run or executes sandwich attacks, they create a less predictable and often more costly trading experience. Traders can lose out on profits or pay more for a token than anticipated.

What is Slippage?

Slippage refers to the difference between the expected price of a trade and the actual price at which the trade is executed. In volatile markets, where token prices can change rapidly, slippage is a common occurrence, especially when large orders are involved or liquidity is limited.

Causes of Slippage

  1. Market Volatility: In decentralized markets, token prices can fluctuate significantly within seconds, particularly when large trades are executed. If a trade is initiated at a given price but completed at a later block, the price might change, causing slippage.

  2. Mev Bots: Bots increase the slippage by front-running your transaction or by sandwiching it.

  3. Execution Delays: On blockchain networks, transactions are not instantaneous. A delay in processing, particularly when the network is congested, can result in a different price by the time the transaction is mined, leading to slippage.

Minimizing Slippage

  • Setting Slippage Tolerance: Many DEXs allow users to set a slippage tolerance, which limits how much price movement is acceptable for their trade. If the price moves beyond this threshold, the trade will fail, preventing the user from making an unfavorable trade.

  • Trading in Low Volatility Periods: Waiting for times of lower market volatility or trading assets with higher liquidity can help minimize slippage.

  • Smaller Trades: Breaking large trades into smaller chunks can reduce the impact on the price of a token, thus minimizing slippage.

How MEV Bots and Slippage Interact

MEV bots can abuse slippage, particularly through tactics like front-running and sandwich attacks. Here’s how:

  1. Front-Running and Slippage: When a user submits a trade, an MEV bot can spot this in the mempool and submit a similar transaction with a higher gas fee, causing the user’s trade to execute later at a worse price, thus increasing slippage. The user expected to trade at a specific price, but due to the bot’s manipulation, the actual price at execution is higher.

  2. Sandwich Attacks and Slippage: In a sandwich attack, the MEV bot places a buy order right before a large trade, driving up the price. Then, after the large trade completes (at a higher price due to the bot’s initial buy), the bot sells, locking in a profit. This leaves the user facing increased slippage, often paying more for the trade than expected.

Sandwich attack example 1:

In this example, a smaller sandwich attack happenened. One might say that it is unsuccessful one.

This profit, however, does not seem to cover the high transaction costs on Ethereum. It's likely that this was either a test run of the MEV bot or the bot wasn't functioning optimally, as the low buy amount kept slippage minimal, which ultimately protected the victim.

Sandwich attack example 2:

In this second example, we encounter a more harmful sandwich attack in which the MEV bot made a significant profit at the victim's expense.

This resulted in a profit of 0.01429 ETH (33$) for the MEV, but if we didn't include the transaction fees. Unlike the first example, the profit here is much higher, indicating a more successful sandwich attack in which the victim faced higher slippage, increasing the cost of their transaction.

Protecting Yourself Against MEV Bots and Slippage

While MEV bots and slippage risks in decentralized finance, there are strategies and tools to mitigate their effects:

  1. Use of MEV-Protected Platforms: Some DeFi platforms and solutions, such as Flashbots, aim to reduce the impact of MEV by allowing users to submit transactions directly to miners, bypassing the public mempool. This reduces the risk of front-running and sandwich attacks.

  2. Higher Gas Fees: Offering higher gas fees can ensure that your transaction gets processed more quickly, reducing the window of opportunity for MEV bots to exploit it.

  3. Slippage Settings: Setting a slippage tolerance on platforms like Uniswap or SushiSwap ensures that your trade doesn’t go through if the price changes too much, helping you avoid unexpected losses.

  4. Private Transaction Services: Certain services allow users to submit transactions privately, preventing MEV bots from seeing them in the mempool. This can be a useful option when executing large or time-sensitive trades.

PreviousLiquidity poolsNextSmart Token Sniper

Last updated 7 months ago

Was this helpful?

MEV Buy: - transaction index 10

VICTIM Buy: - transaction index 11

MEV Sell: -transaction index 12

In this case, the victim purchased for 0.382 ETH. Before this transaction, a MEV bot executed a buy order for , spending 0.09915 ETH. The bot then sold all the $ ICP in a subsequent transaction for 0.10035 ETH, resulting in a profit of 0.0012 ETH (approximately $3).

MEV Buy: - transaction 14

VICTIM Buy: - transaction 15

MEV Sell: -transaction 16

In this case, the victim purchased for 0.4995 ETH. Before this transaction, an MEV bot executed a buy order for , spending 1.8328 ETH. The bot sold all the shortly after the victim's trade, selling for 1.8471 ETH.

📚
Ethereum Transaction Hash (Txhash) Details | Etherscan
Ethereum Transaction Hash (Txhash) Details | Etherscan
Ethereum Transaction Hash (Txhash) Details | Etherscan
$ICP
$ICP
Ethereum Transaction Hash (Txhash) Details | Etherscan
Ethereum Transaction Hash (Txhash) Details | Etherscan
Ethereum Transaction Hash (Txhash) Details | Etherscan
$HACHI
$HACHI
$HACHI