Bundles

Bundles allow sequential and atomic transaction execution on Solana. Batch execute trades or efficiently capture MEV!

What are bundles?

Bundles are a list of transactions that execute sequentially and atomically, all-or-nothing. To explain more:

  • Sequentially: provide a list of transactions in a bundle and they are guaranteed to execute in order.

  • Atomically: bundles execute atomically within the same slot. A bundle can't cross slot boundaries and if the entire thing executes successfully, it will all be committed to the chain.

  • All-or-nothing: bundles can only contain successful transactions. If any transaction in a bundle fails, no transactions in the bundle will make it on-chain.

A user can send a bundle that contains multiple transactions and guarantee that they are all executed sequentially.

How do they work?

Jito-Solana has a special bundle execution stage, called BundleStage, which understands how to execute bundles.

Users can send bundles to Jito's Block Engine and it will take care of sending bundles to the validators running Jito-Solana.

When can I use bundles?

Bundles only work when a Jito-Solana leader is producing blocks. The normal validator client doesn't receive bundles or know how to execute bundles.

What are some examples of bundles?

Arbitrage

One can use bundles to perform atomic arbitrage. When doing this, a user would listen to Geyser and wait for a transaction that exposes MEV. When they find one, they can submit a bundle with transactions: [user_tx, arb_tx].

An open-source arb bot implementing bundles is available here. This offers an easy way to get started and should be a good base for further optimizations.

Liquidations

To perform liquidations with bundles, one can subscribe to oracle transactions. When an oracle transaction comes in that allows someone's account to be liquidated, they can send a bundle with the transactions: [oracle_tx, liq_tx].

Batching DeFi operations

If one needs to batch DeFi operations and can't do it in a single transaction due to transaction size limits or compute budget, send a bundle to Jito's Block Engine. This allows one to get around the pesky sequence IDs needed to ensure correct ordering in DeFi operations. An example of batching defi operations could be market making an on-chain DEX.

What are tips?

NOTE: When tipping make sure to not use Address Lookup Tables for the tip accounts.

Because bundles have their own execution fast-lane, they need to tip validators so validators are incentivized to process them ahead of other transactions.

In order to tip validators, a user needs to submit a SOL transfer to one of the tip addresses on-chain. The tip addresses can be found here: https://jito-foundation.gitbook.io/mev/mev-payment-and-distribution/on-chain-addresses.

NOTE: Ensure that your tip is an instruction in the last transaction of your bundle. If you include it as a separate transaction, it could get stolen from a malicious validator or other user on the network if it ends up on a fork.

Note that tips don't prioritize transactions for non Jito-Solana leaders and will be a waste of money. The block engine currently has a 1,000 lamport minimum for tips.

How much should I tip?

Tips amounts depend on overall demand. CUs are not considered in the auction. However, more contested accounts generally require higher tips. Simple transfers should require lower tips. Here are two resources to see recent tip amounts through the auction

  • Dashboard showing recent tips: link

  • Websocket showing tip amounts: ws://bundles-api-rest.jito.wtf/api/v1/bundles/tip_stream

How does the block engine determine which bundles are sent to validators?

The block engine performs a series of checks with bundles when deciding whether to send them to a validator or not. The checks include:

  • Basic sanity check

    • are these actually transactions?

    • are they signed properly?

    • is there less than or equal to 5 transactions in the bundle?

  • Simulation check

    • will all transactions in these bundles succeed if they're sent to the validator?

    • how much is this bundle paying compared to other submitted?

  • Auction check

    • bundles are split into groups based on what state they read and write lock.

    • bundles are simulated and put in an ordering from highest to lowest payer.

    • the top N highest paying bundles are selected.

Why are my bundles not landing?

Bundles can not be landing for a few reasons:

  • The block is full. (we are actively improving this)

  • The bundle didn't win the auction.

  • The bundle did not tip the minimum amount necessary, as of this writing that amount is 1000 Lamports.

Last updated