π‘ Core MEV Concepts
These are mandatory concepts to understand when trying to bundle
Last updated
These are mandatory concepts to understand when trying to bundle
Last updated
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!
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 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 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.
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 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.
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.
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.
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.
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.
To understand how bribing compares to simply increasing gas, let's take a look at two bundles.
Bundle A
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.
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
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
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.
Txn | Builder Tip | Gas Usage | GWEI Tip Per Gas Unit Used |
---|---|---|---|
Txn | Builder Tip | Gas Usage | GWEI Tip Per Gas Unit Used |
---|---|---|---|
1
100 GWEI Priority Fee
50,000
2
200 GWEI Priority Fee
100,000
3
60 GWEI Priority Fee
42,000
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