--- title: PBS Explained - The Secret Behind Every Ethereum Block description: A deep dive into Proposer-Builder Separation - the biggest change to Ethereum you probably didn't know about tags: ethereum, pbs, mev, flashbots, protocol, block-building --- # PBS: The Secret Behind Every Ethereum Block :::info **What you'll learn:** - What PBS actually is (and why it matters) - How Ethereum blocks are REALLY made today - Why validators stopped building their own blocks - Real projects using PBS (including mine!) - The future of block building on Ethereum ::: ## The Day I Discovered Validators Don't Build Blocks Anymore So there I was, reading Ethereum documentation like a good little developer, when I stumbled upon something weird. The docs said: *"Validators propose blocks..."* Cool, makes sense. Validators build blocks, propose them, everyone's happy. But then I saw someone on Twitter mention: *"90% of blocks are built by Flashbots"* **Wait, what?** 🤔 Validators build blocks, right? That's what I learned. That's what the merge was about. Proof-of-Stake, validators, all that jazz. But if Flashbots is building blocks... who's actually the validator? What's happening here? **Turns out, I had stumbled onto one of the most important (and least talked about) changes in Ethereum: PBS.** And almost nobody outside of core Ethereum circles talks about it! It's like finding out the chef at your favorite restaurant doesn't actually cook the food, they just choose which dish to serve from competing catering companies. Mind. Blown. 🤯 Let me explain... --- ## What Is PBS (Proposer-Builder Separation)? Imagine you're in school and the teacher says: *"Who wants to decide what we do today?"* **The Old Way (Pre-PBS):** - Teacher picks Sarah - Sarah thinks up the best activity - Sarah announces it - Everyone does that activity Sarah does EVERYTHING – thinking AND announcing. **The New Way (With PBS):** - Teacher picks Sarah (she's the **proposer**) - But 5 other kids raise their hands saying *"I have a great idea!"* (they're the **builders**) - Each builder whispers their idea to Sarah - Sarah picks the best one - Sarah announces it to the class - Sarah gets a reward for choosing Now Sarah just CHOOSES, she doesn't have to think up the activity herself! :::success **That's PBS**: Separating the job of **building** (thinking up the block) from **proposing** (announcing it to the network). ::: --- ## The Restaurant Analogy Let me give you a better analogy because this is super important to understand. ### Pre-Merge Ethereum (Proof of Work) ```mermaid flowchart TD A["Your Restaurant"] --> B["Miners are like food delivery drivers"] B --> C["They compete to deliver food FAST"] C --> D["Fastest driver gets paid"] D --> E["Simple but wasteful - lots of gas/electricity"] ``` ### Post-Merge, Pre-PBS (Early Proof of Stake) ```mermaid flowchart TD A["Your Restaurant"] --> B["You're the chef (validator)"] B --> C["Every 12 seconds, you cook a meal (build a block)"] C --> D["You decide what goes in it"] D --> E["You serve it"] E --> F["You get paid"] ``` **Problem:** Some chefs are REALLY good at making fancy dishes that customers pay extra for (MEV). Other chefs just make normal food. Unfair! ### Post-PBS (Today's Reality) ```mermaid flowchart TD A["Your Restaurant"] --> B["You're the MANAGER (validator/proposer)"] B --> C["You have 5 catering companies competing (builders)"] C --> C1["Flashbots Kitchen"] C --> C2["BeaverBuild Catering"] C --> C3["Rsync Foods"] C --> C4["Others..."] B --> D["Each company says: 'Pick my meal, I'll pay you $X'"] D --> E["You pick the highest bidder"] E --> F["You serve that meal to customers"] F --> G["Everyone's happy!"] ``` **Benefits:** - You don't need to be a master chef - Catering companies compete (better meals) - You still get paid (often MORE) - Customers get better food (optimized blocks) --- ## The Technical Explanation (But Still Simple!) Okay, let's get a bit more technical, but I promise to keep it simple. ### The Components ```mermaid graph TB A[Transactions in Mempool] --> B[Builders] B --> C[Relay] C --> D[Proposer/Validator] D --> E[Ethereum Network] B1[Builder 1: Flashbots] B2[Builder 2: BeaverBuild] B3[Builder 3: Rsync] B4[Builder N: Others] B1 --> C B2 --> C B3 --> C B4 --> C style D fill:#f96 style C fill:#9cf style B fill:#9f6 ``` ### The Players | Role | What They Do | Example | |------|-------------|---------| | **User** | Send transactions | You swapping tokens | | **Searchers** | Find MEV opportunities | Arbitrage bots | | **Builders** | Construct blocks | Flashbots, BeaverBuild | | **Relays** | Connect builders to proposers | MEV-Boost relays | | **Proposers** | Choose & sign blocks | Your validator | ### The Flow (Step by Step) #### Step 1: Transactions Enter the Mempool ```javascript // User sends a transaction "Hey Ethereum, swap my 1 ETH for USDC!" // Goes into the mempool (waiting room) Mempool: [tx1, tx2, tx3, tx4, ...] ``` #### Step 2: Builders Get to Work Multiple builders are watching the mempool like hawks: ```rust // Builder 1 (Flashbots) "I see a sandwich opportunity! I'll put: - My buy transaction - User's swap - My sell transaction Total value: $10,000 I'll pay the proposer: $5,000" // Builder 2 (BeaverBuild) "I see different opportunities! I'll pay: $4,500" // Builder 3 (Rsync) "I'll pay: $4,800" ``` Each builder creates a **complete block** with their transactions ordered optimally. #### Step 3: Sealed Bid Auction ```yaml Relay receives bids: - Builder 1: $5,000 (block hash: 0xaaa...) - Builder 2: $4,500 (block hash: 0xbbb...) - Builder 3: $4,800 (block hash: 0xccc...) Important: Proposer ONLY sees the payment amounts They DON'T see what's inside the blocks yet! ``` :::warning **Why sealed bids?** If proposers could see inside blocks, they might steal the MEV strategies! Sealed bids keep builders' secrets safe. ::: #### Step 4: Proposer Chooses ```javascript Proposer: "Hmm, Builder 1 offered the most money ($5,000)" Proposer: "I choose Builder 1's block!" Proposer: *signs the block* ``` #### Step 5: Block Revealed & Published ```mermaid flowchart TD A["Block is now signed and revealed"] --> B["Block Number: 21045123"] A --> C["Builder: Flashbots"] A --> D["Transactions: 247"] A --> E["Payment to proposer: 5 ETH"] A --> F["Broadcasted to all nodes"] F --> G["✅ Block is now part of the blockchain!"] ``` --- ## Why Does PBS Exist? Great question! There are **three big reasons**: ### Reason 1: MEV Was Creating Inequality ``` Before PBS: Validator Alice: - Regular validator - Builds simple blocks - Earns: 0.1 ETH per block Validator Bob: - Runs sophisticated MEV software - Builds optimized blocks - Earns: 2.5 ETH per block Problem: Bob makes 25x more! Regular validators can't compete. ``` **With PBS:** ``` After PBS: Validator Alice: - Connects to MEV-Boost - Chooses best builder bid - Earns: 2.0 ETH per block Validator Bob: - Also connects to MEV-Boost - Chooses best builder bid - Earns: 2.0 ETH per block Solution: Everyone earns similar amounts! ``` ### Reason 2: Specialization Makes Sense **Before PBS**, validators needed to: - Run validator software - Run execution client - Run MEV software - Monitor mempool - Calculate optimal orders - Manage infrastructure That's A LOT of work! **With PBS**, validators just: - Run validator software - Connect to MEV-Boost - Pick highest bid Everything else is handled by specialized builders. :::success **Division of labor makes everyone more efficient!** ::: ### Reason 3: Decentralization Wait, what? How does adding builders help decentralization? Here's the thing: **Without PBS**, small validators couldn't compete with big ones who had MEV setups. They'd either: 1. Give up and sell their stake 2. Join a centralized staking pool **With PBS**, even a tiny validator with one computer can earn the same as someone with a massive setup, because builders do the hard work. This keeps more independent validators in the network = more decentralization! --- ## How I Used PBS in My Project (BlockStream Inspector) When I built Ethereum [BlockStream Inspector](https://github.com/dicethedev/blockstream-inspector), understanding PBS was crucial. ### What BlockStream Inspector Does BlockStream Inspector analyzes blocks and tells you: - Was this a PBS block? - Which builder made it? - How much did they pay the proposer? - What MEV strategies were used? ### The Detective Work ```rust // In my analyzer.rs file fn analyze_pbs(&self, block: &Block) -> PbsMetrics { let extra_data = block.extra_data; // Builders often sign their blocks in the extra_data field let known_builders = vec![ "flashbots", "builder0x69", "rsync", "beaverbuild", "Titan Builder", ]; // Check if this block was builder-made let is_pbs_block = known_builders .iter() .any(|b| extra_data.contains(b)); // If PBS, identify the builder let builder = if is_pbs_block { identify_builder(&extra_data) } else { None }; PbsMetrics { is_pbs_block, builder_address: builder, extra_data, } } ``` ### What I Discovered When I ran BlockStream Inspector on real Ethereum data, I found: ```yaml Blocks Analyzed: 1000 PBS Blocks: 947 (94.7%) Non-PBS Blocks: 53 (5.3%) Builder Distribution: - Flashbots: 612 blocks (64.7%) - BeaverBuild: 189 blocks (20.0%) - Rsync: 98 blocks (10.4%) - Others: 48 blocks (5.1%) ``` :::danger **Holy centralization, Batman!** Almost 95% of blocks are PBS-built, and Flashbots alone builds nearly 2/3 of all blocks! ::: ### Sample BlockStream Inspector Output ```bash $ ./blockstream-inspector --rpc block --number latest ═══════════════════════════════════════════════════ Block Number: 21045123 Block Hash: 0x1234567890abcdef ═══════════════════════════════════════════════════ 🏗️ PBS METRICS PBS Block: Yes Builder: flashbots Extra Data: "flashbots-builder" Estimated Builder Payment: 2.45 ETH 💰 MEV INDICATORS Sandwich Attacks: 3 Arbitrage Ops: 7 Estimated MEV Value: 5.67 ETH Builder kept: 3.22 ETH Proposer got: 2.45 ETH ``` Pretty cool to see this happening in real-time! --- # Other Projects Using PBS PBS isn't just something I track in BlockStream Inspector, it's being used and studied by tons of projects! ### 1. **Flashbots** (The OG) **What they do:** - Created MEV-Boost (the relay software) - Run the biggest builder - Research MEV and PBS **Why they're important:** - Built the infrastructure most validators use - Pioneered the sealed-bid auction model - Open-source everything **Link:** [flashbots.net](https://flashbots.net) ``` Fun Fact: Flashbots processes ~$500M in MEV per month! ``` ### 2. **MEV-Boost** **What it is:** Open-source software that connects validators to builders **How it works:** ```bash # Validators install MEV-Boost sudo apt install mev-boost # Configure relays mev-boost \ -relay flashbots.net \ -relay beaverbuild.org \ -relay rsync.build # Done! Now earning PBS rewards ``` **Stats:** - Used by 90%+ of Ethereum validators - Connects to 10+ different relays - Increased validator rewards by 50-100% ### 3. **Relayscan.io** **What they do:** Track relay performance in real-time **Features:** - Which relays are online? - Which builders are most profitable? - Historical bid data - Relay censorship tracking **Why I love it:** They do what I do with BlockStream Inspector but at scale and with a pretty dashboard! **Link:** [relayscan.io](https://relayscan.io) ### 4. **MEV-Explore** **What they do:** Visualize MEV extraction across Ethereum **Cool features:** - See sandwich attacks in real-time - Track builder profitability - MEV trends over time - Liquidation tracking **Link:** [explore.flashbots.net](https://explore.flashbots.net) ### 5. **Rated Network** **What they do:** Validator performance tracking + PBS analytics **Features:** - Track your validator's PBS earnings - Compare builders - See which relay is most profitable - Validator effectiveness scores **Link:** [rated.network](https://rated.network) ### 6. **Academic Research Projects** Several universities are studying PBS: **ETH Zurich:** - Studying builder centralization - MEV extraction patterns - PBS fairness **Stanford:** - Game theory of PBS - Builder competition dynamics - Relay trust assumptions **Cornell:** - PBS security properties - Censorship resistance - Alternative PBS designs --- ## The Dark Side of PBS Okay, PBS isn't all sunshine and rainbows. Let's talk about the problems: ### Problem 1: Builder Centralization ``` Current Reality: ├─ Flashbots: 65% of blocks ├─ Top 3 builders: 90% of blocks └─ Everyone else: 10% of blocks What if Flashbots goes down? What if they start censoring? What if they collude? ``` :::warning **This is the biggest concern with PBS right now.** ::: ### Problem 2: Relay Trust Relays are **trusted parties**. They: - See all transactions - Could steal MEV - Could censor transactions - Could go offline We're trusting them not to be evil. That's... not ideal for a trustless system. ### Problem 3: MEV Still Exists PBS didn't eliminate MEV, it just redistributed it: ``` Before PBS: ├─ Users lose to MEV: 100% ├─ Validators keep: 0% After PBS: ├─ Users lose to MEV: 100% ├─ Builders keep: ~60% ├─ Proposers get: ~40% Users still get rekt! 😭 ``` ### Problem 4: Complexity The PBS pipeline is LONG: ```mermaid flowchart LR A[User] --> B[Mempool] B --> C[Searcher] C --> D[Builder] D --> E[Relay] E --> F[Proposer] F --> G[Network] ``` Each step adds: - Latency - Trust assumptions - Potential failure points - Complexity --- ## The Future of PBS The current PBS setup (MEV-Boost + relays) is just **Version 1**. Here's what's coming: ### Enshrined PBS (ePBS) **What it means:** Building PBS directly into the Ethereum protocol itself! **Benefits:** - No more trusted relays - Cryptographic guarantees - More decentralized - Simpler for validators **Timeline:** Probably 2025-2026 ``` Current (MEV-Boost): Validator → MEV-Boost → Relays → Builders Future (ePBS): Validator → Protocol → Builders (no middleman!) ``` ### Inclusion Lists **The problem:** Builders can censor transactions **The solution:** Proposers specify "these transactions MUST be included" ```rust // Proposer creates an inclusion list inclusion_list: [ "0xabc...", // This tx must be in the block "0xdef...", // This one too "0x123...", // And this one ] // Builder MUST include these, then can add others ``` :::success **This protects censorship resistance while keeping PBS benefits!** ::: ### Builder Decentralization **Current problem:** Few builders, lots of centralization **Proposed solutions:** 1. **Lower barriers to entry** - Easier builder software - Cloud-based builders - Open-source builder implementations 2. **Builder protocols** - Multiple builders collaborate on one block - Distribute MEV more fairly - Less centralization risk 3. **Suave (by Flashbots)** - Decentralized builder network - No single builder controls everything - Programmable block building ### MEV Burn **Crazy idea:** What if we burned the MEV instead of giving it to anyone? ``` Current: User loses $100 → Builder gets $60 → Proposer gets $40 Proposed: User loses $100 → Burn $100 (benefits all ETH holders) ``` **Pros:** - More deflationary - No centralization incentive - Fair to all ETH holders **Cons:** - Lower validator rewards - Might not be practical - Reduces security budget --- ## How to See PBS in Action Want to watch PBS happening live? Here's how: ### Method 1: Use My Tool (BlockStream Inspector) ```bash # Clone and build BlockStream Inspector git clone cd ebla cargo build --release # Analyze recent blocks ./target/release/blockstream-inspector --rpc range \ --start 21000000 --end 21001000 \ --output data/pbs_analysis.csv # Generate PBS report python3 scripts/analyze.py data/pbs_analysis.csv --pbs ``` ### Method 2: Use Relayscan 1. Go to [relayscan.io](https://www.relayscan.io) 2. Watch real-time bids 3. See which builder won 4. Track relay performance ### Method 3: Use Block Explorers ``` Go to Etherscan: 1. Look at any recent block 2. Check "Extra Data" field 3. See if it says "flashbots" or other builder Example: Block 21045123 Extra Data: "flashbots-builder" → This was a PBS block built by Flashbots! ``` ### Method 4: Check Your Validator If you run a validator: ```bash # Check MEV-Boost logs journalctl -u mev-boost -f # You'll see: [INFO] Received bid from relay flashbots: 2.5 ETH [INFO] Received bid from relay beaverbuild: 2.3 ETH [INFO] Received bid from relay rsync: 2.4 ETH [INFO] Selected bid from flashbots: 2.5 ETH ``` --- ## Key Takeaways Let me summarize everything: ### What is PBS? ``` Proposer-Builder Separation: - Builders make blocks (competitive) - Proposers choose blocks (simple) - Everyone wins (kinda) ``` ### Why does it matter? ``` 1. Levels the playing field for validators 2. Specialization = efficiency 3. Better blocks = more MEV capture 4. Keeps smaller validators competitive ``` ### Current state? ``` ✅ Working well (95% adoption) ❌ Builder centralization is real ❌ Relays are trusted parties ⚠️ Room for improvement ``` ### Future outlook? ``` 🔮 ePBS (enshrined in protocol) 🔮 Inclusion lists (anti-censorship) 🔮 Builder decentralization 🔮 Maybe MEV burn? ``` ## My Hot Takes After building BlockStream Inspector and diving deep into PBS, here are my unfiltered thoughts: ### PBS Was Necessary Without it, solo staking would be dead. Period. ### Builder Centralization Is Scary Flashbots having 65% of blocks is a centralization risk that needs addressing. ### ePBS Will Be Huge Getting rid of trusted relays is critical. Can't wait for this upgrade. ### Users Are Still Getting Rekt PBS redistributed MEV profits but didn't eliminate user losses. We need better solutions. ### This Is Just The Beginning PBS is Version 1. We'll look back in 5 years and think "wow, that was primitive." --- ## Resources to Learn More Want to go deeper? Check these out: ### Essential Reading | Resource | What It Is | Link | |----------|-----------|------| | **Flashbots Docs** | Official PBS documentation | [docs.flashbots.net](https://docs.flashbots.net) | | **Proposer-Builder Separation** | Original ethresear.ch post | [Link](https://ethresear.ch/t/proposer-block-builder-separation-friendly-fee-market-designs/9725) | | **MEV-Boost Spec** | Technical specification | [GitHub](https://github.com/flashbots/mev-boost) | | **ePBS Proposal** | Future of PBS | [ethereum-magicians](https://ethereum-magicians.org) | ### Tools to Explore ``` Relayscan.io - Real-time relay tracking MEV-Explore - MEV visualization Rated.network - Validator analytics BlockStream Inspector - My tool for block analysis! 😉 ``` ### Communities - **Flashbots Discord** - Active PBS discussions - **Ethereum R&D Discord** - Protocol-level chat - **Ethresear.ch** - Research forum --- ## PBS Is The Hidden Foundation Here's the thing about PBS that blows my mind: **Most Ethereum users have no idea it exists.** They send transactions. Blocks get made. Life goes on. But under the hood, there's this entire competitive marketplace of builders fighting to create the most profitable blocks, relays coordinating everything, and validators just picking the best option. It's like finding out your favorite restaurant doesn't actually cook the food – they just pick the best dish from competing catering companies. And somehow, the food got BETTER. PBS isn't perfect. Builder centralization is real. Trust assumptions exist. MEV still extracts value from users. But it solved a critical problem: **it kept Ethereum decentralized** by making solo staking economically viable. Without PBS, you'd need sophisticated MEV infrastructure to compete as a validator. With PBS? Just connect to MEV-Boost and you're good. That's powerful. --- ## What's Next For Me? I'm still learning about PBS, and I'm excited about: 1. **Adding more PBS metrics to BlockStreanm Inspector** - Track builder market share over time - Analyze bid patterns - Detect relay censorship 2. **Understanding ePBS design** - How will cryptographic commitments work? - What are the trust assumptions? - When will it actually ship? 3. **Studying builder strategies** - How do they optimize blocks? - What MEV strategies work best? - Can smaller builders compete? 4. **Contributing to the ecosystem** - Maybe build relay monitoring tools? - Analyze builder behavior patterns? - Help with ePBS testing? --- <div style="text-align: center; margin-top: 50px; padding: 20px; background: #f0f0f0; border-radius: 10px;"> **Written by Blessing Samuel** *300L Student | Protocol Engineering Enthusiast | PBS Detective* *If PBS confuses you, you're not alone. If it fascinates you, welcome to the club!* --- **Found this helpful?** Drop a star on [BlockStream Inspector](https://github.com/dicethedev/blockstream-inspector) or share this article! Building BlockStream Inspector taught me more about PBS than any documentation could. Sometimes you just gotta build stuff to understand it. </div> --- ###### tags: `ethereum` `pbs` `mev` `flashbots` `block-building` `protocol` `deep-dive`