Sensei
  • Introduction
    • πŸ“•Features and Pricing
    • βœ…Sensei Setup
      • πŸͺ¨QuickNode Setup
      • πŸͺ„Alchemy Node Setup
      • πŸ›‘οΈbloXroute Setup
      • πŸ§™Alchemy API Setup
      • 🧱Blocknative API Setup
      • 🧲Etherscan Chrome Extension Setup
    • πŸ“šArchives
      • πŸ›Bug Submission Etiquette
      • πŸ˜‡Signature Mint Requests
      • πŸ–₯️Why Choose Webapp?
      • ☎️Mobile and Tablet Support
      • πŸͺ¨Private Nodes 101
  • ADVANCED MEV FEATURES
    • ⚑MEV Bundling
      • ✨ Introduction to Bundling
      • πŸ’‘ Core MEV Concepts
      • πŸ‘‘ Native Integration
      • πŸ“• How To Bundle
        • πŸ”Œ Relay Endpoints
        • 🧐 Troubleshooting
    • πŸ”Katana Contract Looper
      • ✨ Intro to Contract Looping
      • βš”οΈ Katana V3 Setup
      • βœ… Wallet Whitelisting
      • πŸ”± Deployment
      • πŸ“œTask Creation & Execution
      • πŸ’Έ Consolidate Proxy Tokens
      • πŸ“• Katana V1 - Archived
        • Deploy & Add Upgradeable Proxies
        • Katana Task Creation & Execution
        • Consolidate Proxy Tokens
          • Manual-Token Consolidation
          • Same-Tnx Auto-Consolidation
  • DEFI TRADING FEATURES
    • βœ…Sensei DeFi Setup
    • πŸ†“0% Trading Fee Extension
    • 🎯Sensei Auto-Sniper
    • πŸ“œSensei Swaps
    • πŸ”§Advanced Orders: Limit Order, Stop Loss, Take Profit
    • ⚑Advanced MEV Bundling
    • βš™οΈCustom MEV Execution
    • πŸ”Katana - "Max-Buy" Killer
    • ⚠️Auto-Avoidance
    • ⛑️Anti-Rug Protection
    • πŸ“±Alpha Stream
    • πŸ“ˆLive Trading Charts
    • πŸ—ƒοΈPortfolio Dashboard
    • βš™οΈDefi Settings
  • NFT Trading Features
    • 🌾Blur Farming Module
      • βœ…Funding Blur Pool
      • πŸ“œCreating Blur Tasks
      • ⚠️Emergency Withdrawal
    • πŸ‘οΈNFT Mint Bot [MEV]
      • Standard Task Setup
        • Mint Setup
        • Custom ABI
        • Execution Methods
      • Sigmint Task Setup
      • Fair.xyz Task Setup
        • Getting Started
        • Mint Setup
      • Gas Speedup
        • Manual & Intelligent Gas Speed-Up
        • [PRO] Precision Gas Targeting
        • [PRO] Backrun Auto Speed-Up
      • Quick Tasking & Mint Stream
    • 🏹NFT Deal Sniper [MEV]
      • Deal Sniper Task Setup
      • Execution Methods
      • Configs
      • Global Execution
      • MEV Sniping
    • 🐳NFT Bid Bot (OpenSea)
      • Collection Bidding
      • Token Bidding
    • πŸƒβ€β™‚οΈNFT Mempool Frontrunner
    • 🌊NFT Liquidator
      • Introduction and Setup
    • 🧩Wallet & Token Manager
      • Wallets
        • Wallet Creation
        • Wallet Import & Export
        • Wallet Customisation
        • Disperse & Consolidate
      • Marketplace Approval
      • NFT Manager
      • Multi-Wallet Listing
    • βš™οΈSettings
      • General
      • API Keys
      • Mint Bot
      • Katana
      • Nodes
      • Notifications
      • Wallet Manager
      • Deal Sniper
      • Bid Bot
Powered by GitBook
On this page
  • πŸ”¨ Block Builders
  • 😴 Public Builders
  • πŸ’ͺ MEV Builders
  • πŸ“£ Relays
  • πŸ”Œ Relay Endpoints
  • πŸ›‘ Revert Protection
  • πŸ’° Bundle Attractiveness
  • 😈 Bribing
  • πŸ₯Š Bribing vs Priority Fee
  • πŸ₯‡ Bundle A vs Bundle B
  • 🎯 Target Blocks
  1. ADVANCED MEV FEATURES
  2. ⚑MEV Bundling

πŸ’‘ Core MEV Concepts

These are mandatory concepts to understand when trying to bundle

Previous✨ Introduction to BundlingNextπŸ‘‘ Native Integration

Last updated 1 year ago

Bundling is a unique mechanism that provides numerous benefits. With it comes a new mental model of transaction execution. Let's take a look at the new concepts to understand. It's not too complicated!

πŸ”¨ Block Builders

A block builder is a special entity in the Ethereum ecosystem that takes in transactions and constructs blocks.

Their sole goal is to create the most profitable block it can given the transactions it knows about.

The block builder competes against other block builders to build the most profitable block. Every 12 seconds, the most profitable recent block is chosen by the protocol and it gets included into the blockchain.

There are two main types of builders to be aware of.

😴 Public Builders

Public block builders look at the Ethereum public mempool for transactions. They compete at the same level as most other public builders, since transactions sent via regular nodes are propagated transparently across the network and make it to multiple public builders.

πŸ’ͺ MEV Builders

MEV block builders look at the Ethereum public mempool and simultaneously accept 'private' transactions and bundles directly from sophisticated bots (known as 'searchers'). This means they are aware of transactions that other public builders (and maybe even other MEV builders!) aren't aware of.

MEV builders are obliged to ignore/drop private transactions and bundles if they can't be included in a block. This makes it a very lucrative venue of execution for MEV bots that require guaranteed transaction ordering (for strategies like sandwiching and arbitrage) and do not want to pay for expensive fails.

This guarantee of revert protection and guaranteed ordering means that the majority of advanced and high gas transactions are sent exclusively to MEV builders, allowing them to build more profitable blocks most of the time compared to public builders.

Example: Builder 0x69

One of the top builders is Builder 0x69. You can see if they constructed a block by viewing the block on a block explorer like Etherscan.

Here we can see Builder 0x69 built a block that provided ~0.3 ETH in fees. This means that at the time the next block was considered, no other block builder proposed a block with more than this amount in fees.

πŸ“£ Relays

Relays are to MEV builders as nodes are to public builders.

Bundles are not natively supported within official Ethereum block building software. As such, block builders run special software that can accept bundles.

When you send a bundle, you send it to a MEV relay. This is a direct line of communication with a specific MEV Block Builder.

If you want to maximise your chance of bundle inclusion, you should aim to send your transaction to as many relays as reasonably possible.

πŸ”Œ Relay Endpoints

Like your Node has a specific URL/endpoint, so do relays. On the Twitter of Builder 0x69 (one of many MEV builders), we can see they advertise their relay endpoint.

MEV relays want your bundles, so they will ensure to advertise it in most cases. If you are unable to find social media presence for a given builder, you can often find a link to their website in the block metadata itself, viewable on Etherscan.

πŸ›‘ Revert Protection

Bundles, by default, will not be included if even if a single transaction within the bundle will revert. This will be changable in the future, but for now, your bundles will need all transactions within them to be valid in order to have a chance of inclusion.

There is nothing special about a reverting bundle transaction. The offending transaction would also fail if it were to go into the public mempool, for the same reasons as always:

  • Insufficient Balance

    • You do not have enough funds in your wallet to cover Max Fee * Gas Limit

  • Contract Rejections

    • Mint is out of supply by the time your bundle is simulated for inclusion

    • Your transaction data is incorrect (wrong merkle proof, signature, or method/parameters)

  • Invalid Nonce

    • Another transaction was sent by a wallet in your bundle, between your bundle creation and execution, using the nonce that it is the bundle.

πŸ’° Bundle Attractiveness

One big aspect of bundles is that they will only be included if they are sufficiently attractive. Bundles are 'scored' based on effective priority fee. This is simply the amount of ETH paid in fees to the block builder per gas unit inside the bundle.

This is virtually the same as regular transactions. If your transaction has a Priority Fee of 1,000 GWEI and it uses 50,000 gas units. The effective priority fee of the transaction is 0.02 per gas unit.

😈 Bribing

A bribe is simply an amount of ETH paid directly to the block builder via a technique known as a 'coinbase transfer'. This allows a new way of easily increasing the attractiveness of a bundle.

πŸ₯Š Bribing vs Priority Fee

To understand how bribing compares to simply increasing gas, let's take a look at two bundles.

Bundle A

Txn
Builder Tip
Gas Usage
GWEI Tip Per Gas Unit Used

1

100 GWEI Priority Fee

50,000

0.002

2

200 GWEI Priority Fee

100,000

0.002

3

60 GWEI Priority Fee

42,000

0.0014

This bundle uses only priority fee, and contains 3 transactions with an effective priority fee of 0.0054 GWEI per gas unit. It contains no bribes.

This is calculated as follows: (0.002 + 0.002 + 0.0014) / 3 = 0.0018

Expressed differently, ~180 GWEI per 100k gas usage.

Assuming a base fee of 0 GWEI. This bundle would pay 180 * (50,000 + 100,000 + 42,000) GWEI = 0.03456 ETH in fees.

Bundle B

This following bundle uses exclusively a bribe to determine the attractivess of the bundle.

Txn
Builder Tip
Gas Usage
GWEI Tip Per Gas Unit Used

1

0 Priority Fee

50,000

0

2

0 Priority Fee

100,000

0

3

0 Priority Fee

42,000

0

4

0.038 ETH Bribe

30,000

1,266.67

This bribe transaction (transaction #4) in isolation has a GWEI tip per gas unit of 1,266.67 GWEI.

0.038 ETH / 30,000 = 38,000,000 GWEI / 30,000 = 1,266.67 GWEI

Despite the other transactions having 0 Priority Fee, this bribe transaction brings up the effective priority fee of the entire bundle.

The effective priority fee is 0.00571 GWEI per gas unit.

(0 + 0 + 0 + 1,266.67) / (50,000 + 100,000 + 42,000 + 30,000) = 0.00571

πŸ₯‡ Bundle A vs Bundle B

In this example, Bundle B is slightly more attractive than Bundle A. If a block builder had to choose between the two, then it would choose Bundle B.

This is not because of the existence of a bribe, but simply because the priority fee paid in Bundle A wasn't big enough.

Bundle A could've paid more priority fee in its transactions and can easily be more attractive than Bundle B.

The main takeaway here is that bribing provides convenience to increasing the attractiveness of a bundle, but it brings no inherent value in and of itself*.

*there are other benefits to using bribes, but they aren't relevant in our implementation of bundling

🎯 Target Blocks

Unlike Ethereum transactions that get propogate infinitely by default once you send it, bundles must specify a single target block for the bundle to land in.

This means that if you send a bundle twice, to target the next two blocks, and your bundle isn't included in those next two blocks - your bundle is effectively 'deleted' and won't be included ever, unless you send the bundle again.

https://etherscan.io/block/17008760