Skip to main content
MEV transaction bundles are atomic collections of transactions submitted to block builders via relays like Flashbots. All transactions in a bundle execute sequentially in the same block, or the entire bundle is discarded.

Overview

Bundle provides type-safe construction and manipulation of MEV bundles for strategies like arbitrage, liquidations, and backrunning. Bundles guarantee atomic execution - either all transactions succeed in order, or none are included.

Quick Start

API Reference

Constructors

Methods

Bundle Options

Practical Examples

Sandwich Attack Bundle

Arbitrage with Revert Protection

Time-Bounded Bundle

Computing Bundle Hash

Building Bundle Incrementally

Error Handling

Bundle provides typed errors that extend the Voltaire error hierarchy:

Error Types

Flashbots RPC Format

The toFlashbotsParams method converts bundles to the format expected by Flashbots relays:

Transaction

Transaction encoding and signing

Keccak256

Required for bundle hashing

Hash

32-byte hash type for tx hashes

Flashbots Docs

Flashbots Auction documentation