π°Guide | MEV-boost for Ethereum Staking
Quickstart guide to setting up MEV-boost for your ETH validator.
DOCUMENTATION HAS MOVED TO > https://docs.coincashew.com/guides/mev-boost
Below is for historical reference purposes only.
βWhat is mev-boost?
Enables solo and home stakers access to MEV, Maximal Extractible Value.
Enables validators to earn higher block rewards.
Optional and not required for ETH staking.
Open source middleware run by validators to access a competitive block-building market.
Built by Flashbots as an implementation of proposer-builder separation (PBS) for proof-of-stake (PoS) Ethereum.
home-staker (you) >> mevboost >> relay >> builder >> searcher +/- frontrun/sandwich += efficient markets :)

βοΈ How to MEV?
Prerequisite: You run a full Ethereum node (Execution Layer client [e.g. geth/besu/nethermind/erigon] + Consensus Layer client [e.g. prysm/lighthouse/teku/lodestar/nimbus]) and a validator.
Step 1: Create mevboost service account
The systemd service will run under this account, mevboost
sudo useradd --no-create-home --shell /bin/false mevboost
Step 2: Install mevboost
Downloading binaries is often faster and more convenient.
Building from source code can offer better compatibility and is more aligned with the spirit of FOSS (free open source software).
Create the mevboost systemd unit file.
sudo nano /etc/systemd/system/mevboost.service
The ExecStart
line lists relays: Flashbots, UltraSound, Aestus, bloXroute Max Profit, WenMerge. Remove or add other relays according to your preferences. Add as many or as few relays as you wish.
Paste the following into your mevboost.service
file. To exit and save from the nano
editor, press Ctrl
+ X
, then Y
, thenEnter
.
[Unit]
Description=MEV-Boost Service for Ethereum Mainnet
Wants=network-online.target
After=network-online.target
Documentation=https://www.coincashew.com
[Service]
User=mevboost
Group=mevboost
Type=simple
Restart=always
RestartSec=5
ExecStart=/usr/local/bin/mev-boost \
-mainnet \
-min-bid 0.03 \
-relay-check \
-addr 127.0.0.1:18550 \
-relay https://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@boost-relay.flashbots.net \
-relay https://0xa1559ace749633b997cb3fdacffb890aeebdb0f5a3b6aaa7eeeaf1a38af0a8fe88b9e4b1f61f236d2e64d95733327a62@relay.ultrasound.money \
-relay https://0xa15b52576bcbf1072f4a011c0f99f9fb6c66f3e1ff321f11f461d15e31b1cb359caa092c71bbded0bae5b5ea401aab7e@aestus.live \
-relay https://0x8b5d2e73e2a3a55c6c87b8b6eb92e0149a125c852751db1422fa951e42a09b82c142c3ea98d0d9930b056a3bc9896b8f@bloxroute.max-profit.blxrbdn.com \
-relay https://0x8c7d33605ecef85403f8b7289c8058f440cbb6bf72b055dfe2f3e2c6695b6a1ea5a9cd0eb3a7982927a463feb4c3dae2@relay.wenmerge.com
[Install]
WantedBy=multi-user.target
Reload systemctl to pickup the new service file.
sudo systemctl daemon-reload
Enable mevboost to automatically startup at system reboots and start the service.
sudo systemctl enable mevboost
sudo systemctl start mevboost
Check that the service started successfully.
sudo systemctl status mevboost
Sample of systemd logs showing mevboost running nominally.
β mevboost.service - mev-boost ethereum mainnet
Loaded: loaded (/etc/systemd/system/mevboost.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2022-09-17 23:32:00; 10s ago
Main PID: 12321 (mev-boost)
Tasks: 11 (limit: 34236)
Memory: 15.4M
CGroup: /system.slice/mevboost.service
ββ12321 /usr/local/bin/mev-boost -mainnet -relay-check -relays https://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@boost-relay.flashbots.net,https://0xad0a8bb54565c2211cee576363f3>
View Logs with the following command:
sudo journalctl -fu mevboost
Sample of logs showing mevboost running nominally.
Sep 17 23:32:23 ethstaker systemd[1]: Started MEV-Boost Relay.
Sep 17 23:32:23 ethstaker mev-boost[12321]: time="2022-09-17T23:32:32-00:00" level=info msg="mev-boost v1.3.1" module=cli
Sep 17 23:32:23 ethstaker mev-boost[12321]: time="2022-09-17T23:32:32-00:00" level=info msg="Using genesis fork version: 0x00000000" module=cli
Sep 17 23:32:23 ethstaker mev-boost[12321]: time="2022-09-17T23:32:32-00:00" level=info msg="using 2 relays" module=cli relays="[{0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae https://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@boost-relay.flashbots.net} {0xad0a8bb54565c2211cee576363f3a347089d2f07cf72679d16911d740262694cadb62d7fd7483f27afd714ca0f1b9118 https://0xad0a8bb54565c2211cee576363f3a347089d2f07cf72679d16911d740262694cadb62d7fd7483f27afd714ca0f1b9118@bloxroute.ethical.blxrbdn.com}]"
Sep 17 23:32:23 ethstaker mev-boost[12321]: time="2022-09-17T23:32:32-00:00" level=info msg="Checking relay" module=service relay="https://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@boost-relay.flashbots.net"
Sep 17 23:32:23 ethstaker mev-boost[12321]: time="2022-09-17T23:32:32-00:00" level=info msg="Checking relay" module=service relay="https://0xad0a8bb54565c2211cee576363f3a347089d2f07cf72679d16911d740262694cadb62d7fd7483f27afd714ca0f1b9118@bloxroute.ethical.blxrbdn.com"
Sep 17 23:32:23 ethstaker mev-boost[12321]: time="2022-09-17T23:32:32-00:00" level=info msg="listening on localhost:18550" module=cli
Step 3: Update consensus client and validator
Consensus Client Layer Changes (beacon chain)
Add the appropriate flag to the ExecStart
line of your consensus client service file.
Select the tab appropriate to your staking setup.
To exit and save from the nano
editor, press Ctrl
+ X
, then Y
, thenEnter
.
sudo nano /etc/systemd/system/consensus.service
--builder http://127.0.0.1:18550
For example, here is the expected result of an updated ExecStart
line of a V2 Staking Setup Prysm consensus client service file.
Flag is added on the last line.
When adding a new line, notice that previous lines require a backslash \
ExecStart=/usr/local/bin/beacon-chain \
--mainnet \
--checkpoint-sync-url=https://beaconstate.info \
--genesis-beacon-api-url=https://beaconstate.info \
--execution-endpoint=http://localhost:8551 \
--jwt-secret=/secrets/jwtsecret \
--suggested-fee-recipient=0x_CHANGE_THIS_TO_MY_ETH_FEE_RECIPIENT_ADDRESS \
--accept-terms-of-use \
--http-mev-relay=http://127.0.0.1:18550
Validator Client Changes
If required, add the appropriate flag to the ExecStart
line of your validator client service file. To exit and save from the nano
editor, press Ctrl
+ X
, then Y
, thenEnter
.
sudo nano /etc/systemd/system/validator.service
--builder-proposals
For example, here is the expected result of an updated ExecStart
line of a V2 Staking Setup Prysm validator client service file.
Flag is added on the last line.
When adding a new line, notice that previous lines require a backslash \
ExecStart=/usr/local/bin/validator \
--mainnet \
--accept-terms-of-use \
--datadir=/var/lib/prysm/validators \
--beacon-rpc-provider=localhost:4000 \
--wallet-dir=/var/lib/prysm/validators \
--wallet-password-file=/var/lib/prysm/validators/password.txt \
--graffiti "" \
--suggested-fee-recipient=<0x_CHANGE_THIS_TO_MY_ETH_FEE_RECIPIENT_ADDRESS> \
--enable-builder
After configuring your consensus client and validator to enable mevboost, reload and restart your services. Finally, verify your logs look error-free and show use of the new MEV configurations.
Lighthouse, Lodestar, Prysm
sudo systemctl daemon-reload
sudo systemctl restart consensus validator
sudo journalctl -fu consensus
sudo journalctl -fu validator
Teku or Nimbus
sudo systemctl daemon-reload
sudo systemctl restart consensus
sudo journalctl -fu consensus
Congrats! Your validator with mev-boost will earn more rewards when proposing a block.
π― How to Update MEV-boost
Update to the latest release with the following commands.
Review the latest MEV-boost release notes for new requirements or breaking changes.
ποΈ Uninstalling MEV-boost
sudo systemctl stop mevboost
sudo systemctl disable mevboost
sudo rm /etc/systemd/system/mevboost.service
sudo rm /usr/local/bin/mev-boost
sudo userdel mevboost
Finally, remove the Builder API changes made in step 3 to your consensus client and validator.
β FAQ
βοΈ Next Steps
π° MEV Smoothing: Earn rewards on a consistent basis! Potentially share lottery blocks. Average out your MEV rewards.
Smoothly - https://docs.smoothly.money/how-to-guide
Dappnode's Smooth - https://smooth.dappnode.io/how-to
π Stay Updated: Subscribe to flashbot's mev-boost repository to be notified of new releases. Hit the Notifications button.
π Stay in contact: Follow MEV-Boost Twitter contributors
π Future ideas: Learn about the future of MEV democratized by PBS.
βπ Support us on Gitcoin Grants: We build this guide exclusively by community support!π
π References
π Credits
Inspired by Remyroy's Guide on how to Prepare for The Merge
Last updated