Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wiki - PBS research content #162

Merged
merged 81 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
71e4aef
Initialize draft for PBS
shyam-patel-kira Mar 15, 2024
91f442f
Added Introduction; added Insights t Consensus layer
shyam-patel-kira Mar 16, 2024
f11b3e4
Merge branch 'eth-protocol-fellows:main' into pbs
shyam-patel-kira Mar 19, 2024
c0bb1f9
Covered some more information on the topic
shyam-patel-kira Mar 19, 2024
f11c2bc
Basic outline for pbs
shyam-patel-kira Mar 19, 2024
3422d57
Merge branch 'main' into pbs
shyam-patel-kira Mar 20, 2024
537147c
Define pbs structure; add image; seperate sections for topics
shyam-patel-kira Mar 20, 2024
300227d
Merge branch 'pbs' of https://github.com/shyam-patel-kira/protocol-st…
shyam-patel-kira Mar 20, 2024
1b73121
Merging for collab: #96 from shyam-patel-kira/pbs
raxhvl Mar 21, 2024
85c482d
ePBS wiki - 01 entry with some sections added
thogiti Mar 24, 2024
b048b7e
ePBS wiki - 02 main references added
thogiti Mar 24, 2024
cb1fa51
ePBS wiki - 03 counterarguments section added
thogiti Mar 24, 2024
aba161f
ePBS wiki - 03 counterarguments bypassability added
thogiti Mar 24, 2024
baf85ff
ePBS wiki - 05 minimum viable ePBS section is added
thogiti Mar 25, 2024
928cd57
ePBS wiki - 06 fixed some formatting issues.
thogiti Mar 25, 2024
175cd65
ePBS wiki - 07 Table of contents is added at the top for better reada…
thogiti Mar 25, 2024
c8e916d
ePBS wiki - 08 fixed some grammar errors.
thogiti Mar 25, 2024
6b86593
ePBS wiki - 09 Desirable properties of ePBS mechanisms section is added.
thogiti Mar 25, 2024
aeba2eb
ePBS wiki - 10 TBHL proposal section is added.
thogiti Mar 25, 2024
05f55ee
ePBS wiki - 11 small grammar errors fixed.
thogiti Mar 26, 2024
80b8025
ePBS wiki - 11 small grammar errors fixed.
thogiti Mar 26, 2024
35bf31f
Update PBS entry with all my progress (#112)
ynyesto Mar 26, 2024
a5d21f6
Edited based on the suggestions from the review on the intro section.
thogiti Mar 28, 2024
43b84ad
fixed some typos.
thogiti Mar 28, 2024
7cb1d87
fixed a link error.
thogiti Mar 28, 2024
f1dc25d
fixed format issues and cleaned up some repititive content.
thogiti Mar 28, 2024
b005289
fixed format issues.
thogiti Mar 28, 2024
2d697da
Initialize draft for PBS
shyam-patel-kira Mar 15, 2024
fbddfd8
Added Introduction; added Insights t Consensus layer
shyam-patel-kira Mar 16, 2024
67f5c4c
Covered some more information on the topic
shyam-patel-kira Mar 19, 2024
bede268
Basic outline for pbs
shyam-patel-kira Mar 19, 2024
229bb37
Define pbs structure; add image; seperate sections for topics
shyam-patel-kira Mar 20, 2024
9f1c820
curate the content to make it more readable; organize rewritten detai…
shyam-patel-kira Mar 29, 2024
2174d3f
Add mev introduction page; update research topics
shyam-patel-kira Mar 29, 2024
5865dc8
Merge pull request #130 from eth-protocol-fellows/main
taxmeifyoucan Mar 30, 2024
d243c64
Added PTC section.
thogiti Mar 31, 2024
d0ca650
Fixed reference format issues.
thogiti Mar 31, 2024
b011821
Fixed reference format issues.
thogiti Mar 31, 2024
5ea721b
Merge branch 'pbs' of https://github.com/eth-protocol-fellows/protoco…
shyam-patel-kira Mar 31, 2024
b013473
fetch upstream
shyam-patel-kira Mar 31, 2024
37db092
Update to more readable format
shyam-patel-kira Mar 31, 2024
61664e6
Remove redudant references
shyam-patel-kira Mar 31, 2024
bdb08de
Move resources to last section
shyam-patel-kira Mar 31, 2024
655a2d1
Link the wiki to ePBS; organise structure
shyam-patel-kira Mar 31, 2024
3437afb
final typos
shyam-patel-kira Mar 31, 2024
3d2518a
Update research topics
shyam-patel-kira Apr 1, 2024
3f38e2a
Update mev wordings
shyam-patel-kira Apr 1, 2024
ff2d107
summarise security section; add some details on censorship
shyam-patel-kira Apr 1, 2024
655424d
Fix article link
shyam-patel-kira Apr 1, 2024
a8d1eee
Add recent bloXroute-lighthouse incident
shyam-patel-kira Apr 1, 2024
129e943
Update wordings for recent incident
shyam-patel-kira Apr 2, 2024
3aac3f6
PEPC section is added.
thogiti Apr 4, 2024
7156fd2
PEPC section is added.
thogiti Apr 4, 2024
aa498de
fixed some formatting issies with bullet points in PEPC.
thogiti Apr 4, 2024
254654f
Open questions in ePBS section is added.
thogiti Apr 4, 2024
9e3b0b8
Fixed duplicate header in PEPC section.
thogiti Apr 6, 2024
d17b85e
Simplify and merge structure to minimum files
shyam-patel-kira Apr 8, 2024
cf567b3
Resolved teh conflict with pbs.md file.
thogiti Apr 8, 2024
abb3eb4
Merge branch 'pbs' into pbs
thogiti Apr 8, 2024
0aa14c2
Merge pull request #115 from thogiti/pbs
thogiti Apr 8, 2024
36d98b7
Resolve merge conflicts
shyam-patel-kira Apr 8, 2024
be25567
Updates on previous entry with current changes (#129)
shyam-patel-kira Apr 8, 2024
f3ff538
Merge branch 'main' into pbs
taxmeifyoucan Apr 9, 2024
6296d58
fixed spelling errors and updated wordlist.
thogiti Apr 9, 2024
0cd4fbd
Merge pull request #163 from thogiti/pbs
thogiti Apr 9, 2024
cb51845
fixed spelling errors and updated wordlist.
thogiti Apr 9, 2024
882f3c1
Merge pull request #164 from thogiti/pbs
thogiti Apr 9, 2024
5bbae41
Fixed spelling errors across all folders.
thogiti Apr 9, 2024
1e1fd27
Merge pull request #165 from thogiti/pbs
thogiti Apr 9, 2024
541fe88
update pbs sidebar
taxmeifyoucan Apr 9, 2024
326f2f7
Merge upstream
shyam-patel-kira Apr 9, 2024
29ad3cd
fix typos in mev-boost
shyam-patel-kira Apr 9, 2024
674aa36
Add ePBS link to sidebar
shyam-patel-kira Apr 9, 2024
a887bb6
Add crosslinks
shyam-patel-kira Apr 9, 2024
8ae358a
Resolve conflicts with main
shyam-patel-kira Apr 9, 2024
3410e40
Fix a broken link
shyam-patel-kira Apr 9, 2024
5042570
cross reference links added
thogiti Apr 10, 2024
a26b19d
Merge branch 'pbs' into pbs
thogiti Apr 10, 2024
97d1eb0
Merge pull request #168 from thogiti/pbs
thogiti Apr 10, 2024
0c2c365
Update PBS resources
taxmeifyoucan Apr 10, 2024
8b948e0
typos
taxmeifyoucan Apr 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
- [Precompiled Contracts](/wiki/EL/precompiled-contracts.md)
- [Transaction](/wiki/EL/transaction.md)
- [DevP2P]
- [MPT]
- [JSON-RPC](/wiki/EL/JSON-RPC.md)
- [Consensus Layer](/wiki/CL/overview.md)
- [CL Clients](/wiki/CL/cl-clients.md)
Expand All @@ -53,13 +52,13 @@
- [Scaling](/wiki/research/scaling/scaling.md)
- [Core Changes](/wiki/research/scaling/core-changes/core-changes.md)
- [EIP-4844](/wiki/research/scaling/core-changes/eip-4844.md)
- Blobs
- Sharding
- Statelessness
- Purge
- MEV
- PBS
- Censorship
- [MEV](/wiki/research/PBS/mev.md)
thogiti marked this conversation as resolved.
Show resolved Hide resolved
- [PBS](/wiki/research/PBS/pbs.md)
- [MEV-boost](/wiki/research/PBS/mev-boost.md)
- [ePBS](/wiki/research/PBS/ePBS.md)
- Proof of Stake
- [Upgrades](/docs/wiki/research/Beacon%20Chain%20Upgrades.md)
- SSF
Expand Down
Binary file added docs/images/MEV-Boost blocks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/PBS-outline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/mev-boost-architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/pbs/block-building.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/pbs/mev-boost.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/pbs/scourge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
618 changes: 618 additions & 0 deletions docs/wiki/research/PBS/ePBS.md

Large diffs are not rendered by default.

60 changes: 60 additions & 0 deletions docs/wiki/research/PBS/mev-boost.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Mev-boost: A popular PBS Implementation

[Mev-boost](https://github.com/flashbots/mev-boost) is a widely recognized, out-of-the-protocol, open-source implementation of Proposer-Builder Separation (PBS) for Ethereum. It allows validators to outsource block building to specialized builders, potentially leading to increased validator rewards and improved network efficiency.

Here's how mev-boost works:
shyam-patel-kira marked this conversation as resolved.
Show resolved Hide resolved

<figure style="text-align: center;">
<img src="images/pbs/block-building.png" alt="Block-building">
<figcaption style="text-align: center;">Current Block building. Source: <a href="https://barnabe.substack.com/p/pbs">Baranabé's article</a></figcaption>
</figure>

On one side, mev-boost implements the [builder API](https://github.com/ethereum/builder-specs) used by an Ethereum node to outsource it block production. On the other, it connects to a network of relays and handles the communication between builders and proposers.

1. **Block Building:**
Specialized builders, known as "searchers" in mev-boost, compete to create the most profitable block for the proposer. They do this by optimizing transaction ordering and inclusion, taking into account factors like gas fees, transaction priority, and potential [MEV (Maximal Extractable Value)](/wiki/research/PBS/mev.md).
Searchers submit their constructed blocks to relays.
2. **Relay Network:**
Mev-boost operates a network of relays that act as intermediaries between searchers and proposers.
Relays receive blocks from searchers and perform various functions like block validation, filtering, and propagation.
Relays ensure that only valid and high-quality blocks are sent to proposers.
3. **Proposer Selection:**
Validators run mev-boost software connected to their beacon node. When validator is chosen to propose a block, they receive blocks from relays and choose the best one based on predefined criteria, typically the block that offers the highest reward.
The validator then proposes the selected block to the network for validation and inclusion in the blockchain.

## PBS Block Creation

The process of block creation through PBS works as follows:

### Block Construction

- Builders continuously monitor the transaction pool (mempool) for new transactions. They assess these transactions based on potential MEV opportunities. They select the transactions that best align with their MEV optimization criteria. Also, block builders can take transaction bundles from private orderflows, or from MEV searchers, just as miners did in PoW Ethereum with the original Flashbots auctions. In the latter case, builders accept sealed-price bids from searchers and include their bundles in the block.
- Once the transactions are selected, builders assemble them into a block ensuring that the block adheres to the Ethereum protocol's rules, e. g., txs are valid, the gas limit is not surpassed.

### Block Auction

Instead of builders directly offering their assembled blocks to validators with a specified price, the standard practice is to use relays. Relays validate the transaction bundles before passing them onto the proposer (validator). Also, implementations can introduce escrows responsible for providing data availability by storing blocks sent by builders and commitments sent by validators.

### Benefits of mev-boost:

- **Increased validator rewards:** By outsourcing block building to specialized searchers, validators can potentially earn higher rewards through optimized transaction ordering and MEV extraction.
- **Reduced centralization:** Mev-boost enables a more competitive block-building landscape, reducing the economy of scale of large mining pools and enabling home stakers achieve same kind of rewards.

### Challenges and Considerations:

While mev-boost offers certain benefits, it also raises some concerns:

- **Security:** Introducing new actors and dependencies can create new attack vectors and vulnerabilities. There have been multiple [incidents](https://collective.flashbots.net/t/post-mortem-april-3rd-2023-mev-boost-relay-incident-and-related-timing-issue/1540) of missed blocks on mainnet due to mev-boost issues.
- **Censorship resistance:** If only a few powerful searchers or relays dominate the ecosystem, it could lead to centralization and censorship concerns.
- **Coordination:** Effective communication and coordination between searchers, relays, and proposers are crucial for the smooth functioning of mev-boost.

It's important to note that mev-boost is just one implementation of PBS. Other implementations with different designs and features are also being developed and explored, for example [mev-rs](https://github.com/ralexstokes/mev-rs) is under development.

Overall, mev-boost represents a significant step towards realizing the potential benefits of PBS in Ethereum. However, continuous research and development are crucial to address the challenges and ensure a secure, decentralized, and efficient implementation. One path towards more stable PBS model is [enshrining it in the protocol](/wiki/research/PBS/ePBS.md), adding mev-boost like features directly to the Ethereum clients.

## Resources

- [Flashbots docs on mev-boost](https://boost.flashbots.net/)
- [Overview of censoring entities](https://censorship.pics/)
- https://www.mevwatch.info/
- [MEV-Boost: Merge ready Flashbots Architecture, 2021](https://ethresear.ch/t/mev-boost-merge-ready-flashbots-architecture/11177)
21 changes: 21 additions & 0 deletions docs/wiki/research/PBS/mev.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Maximal Extractable Value (previously Miner Extractable Value)

Maximal Extractable Value (MEV) refers to the the maximum value that can be extracted from block production beyond the standard block reward and gas fees by strategically ordering, including, or excluding transactions in a block.

In Ethereum, MEV has gained greater attention as validators extract increasingly more value, especially in DeFi (Decentralized Finance) applications. Arbitrage opportunities facilitated by strategies like front-running, sandwiching or back-running are possible by ordering transactions in the block. This can also lead to negative consequences, such as unfair advantages for large-scale pools, censorship or increased slippage for DeFi users.

[Proposer-builder separation (PBS)](/wiki/research/PBS/pbs.md) can change the dynamics of MEV extraction in that there could be a redistribution of MEV between the two roles, potentially changing the incentives and rewards associated with each. Since block builders are responsible for transaction ordering and inclusion, they may develop new strategies or promote increased competition that could result in more efficiency and fairer distribution of MEV across the network.

## Evolution of MEV

Maximal Extractable Value (MEV) originated during the proof-of-work era, where it was known as "Miner Extractable Value." This terminology reflected the miners' ability to influence transaction order in the block, including their inclusion, exclusion, and sequencing. Following Ethereum's transition to proof-of-stake with The Merge, validators have taken over the consensus, rendering mining obsolete within the protocol. Despite these changes, the mechanisms for value extraction remain in place, leading to the adoption of the term "Maximal Extractable Value" to address these activities.

Although MEV has been possible since the inception of Ethereum, it gained significant attention with the rise of DeFi and more accessible tooling. In the early days, MEV opportunities were primarily seized by outbidding rivals in the public mempool, marking the era known as Priority Gas Auction or PGA. Details about this chaotic era is captured in [Flashboys 2.0](https://arxiv.org/abs/1904.05234). During that time, [Flashbots](https://www.flashbots.net/) came out as open R&D initiative to improve public knowledge and access to MEV tools.

In the Post-Merge world, the concept of miners ceased to exist but their builder and proposer role is facilitated by validators, responsible to add blocks to the chain in the same way. Anticipating the changes after The Merge, Flashbots, along with the client teams and the Ethereum Foundation commenced the development of [mev-boost](/wiki/research/PBS/mev-boost.md). MEV-boost is an out-of-protocol implementation of Proposer-builder Separation. See the [section on PBS](/wiki/research/PBS/pbs.md).

## Resources

- [A study of the transaction supply chain from CryptoKitties to MEV-Boost to PBS - Barnabé Monnot](https://www.youtube.com/watch?v=jQjBNbEv9Mg)
- [MEV Day playlist](https://www.youtube.com/playlist?list=PLRHMe0bxkuel3w3C7P_WVvp9ShLi3HKRI)
- [How to light up dark forest - Flashbots](https://collective.flashbots.net/t/how-to-light-up-the-dark-forest-a-walkthrough-of-building-a-cryptopunk-mev-inspector/881)
Loading