MEV (Maximal Extractable Value) is derived when a miner or validator extracts additional profit by changing the order of transactions in the block they are about to include in the blockchain. Extractable Value has gone from a semi-legal and harmful practice for the network to a decentralized solution used by 90% of validators. Using MEV Boost can now increase ETH 2.0 validator revenue by 75%.
This article explores how MEV Boost works and how to use it in ETH staking.
What Is MEV?
MEV is similar to insider trading: a miner knows what will happen in their block and how it will affect DeFi applications and exploits this to their advantage through:
- Hijacking: The miner notices a profitable arbitrage transaction on a DEX, censors it, and puts the same transaction into the block on their behalf.
- Frontrunning: A trader conducts a significant DEX transaction that will push the token price up. The miner includes their transaction before that transaction to buy the token on the same exchange to get it cheaper and sell it after the price rises.
- Backrunning: The miner includes its transaction in the block so that it is executed immediately after a significant transaction by someone else. For example, to sell previously purchased tokens immediately after a large purchase on a DEX.
In theory, MEV could promote market efficiency, but in practice, it led to a Priority Gas Auction or PGA. Several bots noticed one arbitrage opportunity at once. They sent their arbitrage transactions to a mempool with higher commissions to outbid competitors and take profits from MEV. The PGA led to higher transaction fees for all users on the network.
What Is MEV Boost?
In 2020, venture capital firm Paradigm tried to solve the MEV problem by bundling willing profit-makers into a system with healthy internal competition. This service was called Flashbots. MEV Boost, also known as Builder API, is the core product of Flashbots, an intermediate layer between validators and network members looking for MEV opportunities. MEV Boost on PoS Ethereum works like this:
- A validator requests a relay via MEV Boost.
- The relay reports this to the network of builders, who, in turn, work with searcher bots.
- The searcher bots find profit opportunities and send transaction bundles to the builders.
- The builders form an execution payload from received transaction bundles and construct blocks based on them. The builders then send the finished blocks and the commission attached to them to relays.
- The relays check the received blocks for validity and then send payload headers to an escrow.
- The escrow shows the received payload headers to the validator.
- The validator of the current block selects one of the proposed payload headers, signs it, and returns it to the escrow. It does not see the contents of the ready block, nor can it steal the MEV transactions to execute them itself and get all the profit. Usually, the validator executes the payload with the highest commission.
- Both the escrow and the relay propagate the chosen block to the rest of the network.
- When the block makes it to the blockchain, the builder gets their MEV, and the validator gets the commission from the builder.
As a result, builders and validators earn more, and bots do not use a PGA. When using MEV-Boost, the validator becomes dependent on the health of the relay, but this is not so. If the relay or MEV-Boost stops responding, the local execution client will take transactions from the public mempool. In addition to lower overall transaction fees on the network, MEV Boost has two other benefits:
- MEV has become available to solo validators, which should help decentralize the network.
- With MEV-Boost, validators sign blocks blindly and do not censor transactions, which improves privacy.
As of 2022, 88% of Ethereum validators use MEV Boost. So does Everstake.
How to Use MEV Boost As a Solo Validator?
Below is an instruction for installing, setting up, and launching MEV Boost on a Linux machine.
Create a user mevboost to launch the service: sudo useradd --no-create-home --shell /bin/false mevboost
Go to Flashbots’s GitHub and check which MEV Boost version is the latest. Change the repository name in the installation command if it’s v1.5 or higher.cd ~
wget
https://github.com/flashbots/mev-boost/releases/download/v1.4.0/mev-boost_1.4.0_linux_amd64.tar.gz
Unpack the archive:tar xvf mev-boost_1.4.0_linux_amd64.tar.gz
sudo cp mev-boost /usr/local/bin
Give the mevboost user access to the folder: sudo chown mevboost:mevboost /usr/local/bin/mev-boost
Create a file from the configuration mevboost.service: sudo nano /etc/systemd/system/mevboost.service
Paste the template therein. In the relays line, paste one or more relay addresses from the list:[Unit]
Description=mev-boost (Mainnet)
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
User=mevboost
Group=mevboost
Restart=always
RestartSec=5
ExecStart=mev-boost
-mainnet
-min-bid 0
-relay-check
-relays https://relay.one,https://relay.two,https://relay.three
[Install]
WantedBy=multi-user.target
Reload the system configuration: sudo systemctl daemon-reload
Launch MEV Boost and check its status:sudo systemctl enable mevboost
sudo systemctl start mevboost
sudo systemctl status mevboost
Adjust the consensus and validator clients. To do that, open the respective service file and flag the ExecStart line:Lighthouse Consensus
--builder http://127.0.0.1:18550
Lighthouse Validator
--builder-proposals
Lodestar Consensus
--builder --builder.urls http://127.0.0.1:18550
Lodestar Validator
--builder
Nimbus Consensus (a Nimbus validator does not need additional config)
--payload-builder=true --payload-builder-url=http://127.0.0.1:18550
Prysm Consensus
--http-mev-relay=http://127.0.0.1:18550
Prysm Validator
--enable-builder
Reload the services:sudo systemctl daemon-reload
sudo systemctl restart beacon-chain validator
Check the logs to ensure everything works as intended:journalctl -fu beacon-chain
journalctl -fu validator
If something doesn’t work, follow the official documentation on Flashbots’s GitHub.
Conclusion
MEV has evolved from a questionable and unhealthy way for ordinary users to make money to an accepted and useful tool for validators. Flashbots calculates that a validator using MEV Boost adds an extra 75% to their revenue with an APR of 12.86% versus 7.35%.
MEV Boost is suitable for solo validators and does not require specific knowledge. If you are able to run an Ethereum validator node, you can double your earnings with MEV Boost.
Visit our Discord and Twitter to continue discussing MEV, Solana, and more.