Building the best blocks with mev-boost

It’s 1pm, you’re off on your 30 minute state mandated break from your burger flipping job at McDonalds

Screen Shot 2021-05-07 at 5.52.29 PM.png

Typically as a burbger flippor you’re building orders (blocks) and ordering them based on time but your store is different, you structure orders based on tips and bribes. So traditionally you’re sent an order via the public TV screen (mempool) that shows orders coming in (txs). To make more money you sort through orders (txs) who pay higher tips/bribes and make sure those are made first before going onto other orders to finally deliver a tray full of orders (a block)

You (a miner) validate the tray with other flipoors until it lands onto the pickup table(landing block on-chain)

This is how a traditional eth mempool works; miners build the blocks and people who want to structure their txs pay the miner higher gas/bribes in order to achieve it

In the Flashbots auction relay, customers send their orders discretely through the app all at once with a sealed-bid auction until the highest bidder gets to send a “bundle” (one or more txs) to a whitelisted flashbots miner running their geth fork(fancy version of a burbger flipoor) and they build the block in a greedy fashion until they’ve extracted all the value they can structuring the block

However this presents an issue…

What if the validators/miners are đź’© at their job of extracting value/structuring blocks?

bob_the_builder_036_16x9_132674_1920x1080.jpeg

mev-boost is a step in PBS (proposer-build seperation) where proposers(validators) can let builders build efficient blocks which allows good block builders to

  1. extract value ordering txs

  2. get tips

  3. allow smaller validators to sell blockspace

  4. creates a competitive market for the best builders than just relying on mev-geth structuring

In return builders bid as much as they see profitable to be able to secure the blockspace and the validators end up getting most of that value without needing to actually build the block themselves

For the sake of technicality I won’t go deeper on how PBS works but there are mechanisms that prevent builders from blacklisting/ignoring txs and other validators stealing your block structures once they approve your block’s headers

If you want to try getting the headers/body of the best blocks built with mev-boost on Kiln tesetnet:

git clone https://github.com/flashbots/mev-boost.git

make build

cd test-cli

make build-cli

Open up 2 terminal tabs side by side and run

./mev-boost -relays https://builder-relay-kiln.flashbots.net
./test-cli generate // sometimes doesnt work with arm/m1 chips, either generate them on a server or create a public/private keypair
./test-cli register -mev-boost https://builder-relay-kiln.flashbots.net -vd-file validator_data.json  -genesis-fork-version 0x70000069
./test-cli getHeader -genesis-fork-version 0x70000069 -mev-boost https://builder-relay-kiln.flashbots.net -mm

I’ve yet to build a block on my own but Flashbots’ wiki has some great tutorials on how to start, I’ll post my blocks in another post: https://github.com/flashbots/mev-boost/wiki

https://github.com/flashbots/boost-geth-builder.git