ethereum / ethereum-org-website

Ethereum.org is a primary online resource for the Ethereum community.
https://ethereum.org/
MIT License
4.88k stars 4.65k forks source link

Add MEV diagrams to the diagrams page #12691

Open nloureiro opened 2 months ago

nloureiro commented 2 months ago

The content is hard to understand, and by adding diagrams to this page will help understand

https://ethereum.org/en/developers/docs/mev/

sogobanwo commented 1 month ago

@nloureiro i would love to work on this

nloureiro commented 1 month ago

@nloureiro i would love to work on this

Awesome. Any ideas for the diagram?

sogobanwo commented 1 month ago

Yes, I am looking to add 2 diagrams. i. one that shows what MEV is after the definition ii. another that visualizes the example of arbitrage (how flashloan of 1000ETH was collected on AAVE and used to get 1045ETH.)

sogobanwo commented 1 month ago

Screenshot from 2024-04-24 00-30-49 Hi @nloureiro this is the proposed diagram I intend to upload on the page to explain the order of transactions due to gas fees by validators in order to get the max value from a block.

sogobanwo commented 1 month ago

Hi @nloureiro i just made a PR input this image in the article. Kindly review & merge while i come up with the next image. Thanks

nloureiro commented 1 month ago

ok, thank you! That is a great starting point. I wanted to have more eyes on this base diagram to be sure that we ar not forgetting anything. @wackerow @corwintines can you help here?

@sogobanwo Another thing, how are your Figma skills? Are you okay with doing the diagrams using your style guide? https://www.figma.com/file/Hj8Hnc6TYBs8GDxfdcCtqW/Diagrams-and-schematics?type=design&node-id=122%3A27&mode=design&t=QMcbsYJvpmuUYojp-1

If not, it's okay; no worries. We can have another contributor just to do the final design; you are already helping a lot.

sogobanwo commented 1 month ago

Hi @nloureiro i'm not too good with figma but with the style guide i should be able to draw the diagram with figma.

aslikaya commented 1 month ago

Hi! Yes @sogobanwo the specific example with a diagram would be nice to see too. For just the MEV part, I am not sure if ordering according to gas fees explains it correctly, MEV is pretty complex.

The part that was confusing to me was many actors involved in the process of mev-boost (users, searchers, builders, relays, validators) and each responsible for different things. I checked a few other resources, and see some diagrams about it from Flashbots website. Here they are:

Screenshot 2024-04-25 at 13 06 06 Screenshot 2024-04-25 at 13 09 35

block-proposal

I did one too, but I kind of combined the first two and some readings I guess. They got densed. I used google drawings, I don't have design experience. mev-boost

The relationship between relay, mev-boost and validator could be another diagram

wackerow commented 1 month ago

Thank you @sogobanwo and @aslikaya, appreciate these contributions... I do tend to agree that the first drawing seems to overly simplify MEV. Simply ordering txs by highest fee is pretty standard, and I suppose could be a form of MEV, but as the other diagrams demonstrate, MEV can get quick complex.

Seeing as these changes are targeting the dev docs, I would probably lean towards the more complex explanations, though maybe there's room for both. At a glance these all look pretty decent but will have to come back to look through them in more depth.

nloureiro commented 1 month ago

Hi @nloureiro i'm not too good with figma but with the style guide i should be able to draw the diagram with figma.

ok. no worries if you don't it on Figma, we can open an issue for someone else to do it. All good

nloureiro commented 1 month ago

@aslikaya @wackerow, would something like this make sense? maybe too many images to this page Screen Shot 2024-04-30 03 35 07 PM

I'm trying to understand how to push this forward.

did on this Figma to be easy to have an overview of the page, please add comments there if it is easy https://www.figma.com/file/ZEhZXwNPF6t5MrVKBpvyYt/MEV-diagrams?type=design&node-id=0%3A1&mode=design&t=DTJtEuo9Wg3ug0bL-1

aslikaya commented 1 month ago

Btw these two resources helped me understand mevboost: 1- Talk by Alex Stokes (then I realized a more recent, longer version exist: https://youtu.be/-xY1EEzcp0s) 2- Architectural overview on block proposal

nloureiro commented 1 month ago

Btw these two resources helped me understand mevboost: 1- Talk by Alex Stokes (then I realized a more recent, longer version exist: https://youtu.be/-xY1EEzcp0s) 2- Architectural overview on block proposal

I only have a high level of knowledge of MEV; I feel a bit out when discussing this level of detail. Let's try to get a proposal out and then get more eyes on it to validate it.

thank you for your help!

aslikaya commented 1 month ago

As I mentioned, here is another diagram to explain the relationship between validator-mevboost-relays-builders in more detail

validator-mevboost-relays

this page helped: Architectural overview on block proposal

I skipped the validator registration part here and focused on the more complicated part: when a validator is selected to propose a block

LauraSinisterra commented 3 weeks ago

Hi @nloureiro, would love to help designing the diagrams on Figma.

nloureiro commented 3 weeks ago

Hi @nloureiro, would love to help designing the diagrams on Figma.

Hi. Great!

At this point I'm working with @aslikaya and @wackerow on the main one

you can follow here https://www.figma.com/design/ZEhZXwNPF6t5MrVKBpvyYt/MEV-diagrams?node-id=254%3A594&t=vrIuMBRfrrt8W9Zh-1 this is where we are... almost ready for the data to finish the design Screen Shot 2024-05-24 01 11 25 PM

But I was wondering if we should have a simpler one at the top of the page based on @sogobanwo's proposal.

@aslikaya what do you think? Do we need a simplified version on the top of the page? (if yes, for sure... @LauraSinisterra, you can help... Thank you for reaching out) Screen Shot 2024-05-24 01 13 49 PM

aslikaya commented 3 weeks ago

I think it could be nice to show other parts of the process like searchers and public-private mempools without going into much detail, like an overview. The one we are working on now is pretty detailed. Maybe under MEV Extraction - where searchers are mentioned, yet mev-boost, builders and relays are not mentioned there, only towards the bottom of the page

almesh commented 2 weeks ago

https://t.me/+i7MQ2LQujC0wM2U0