pmcgoohan
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
![zeromev logo](https://i.imgur.com/FHWje4B.png) ℹ️ please note: the latest version of this document can now be found [here](https://info.zeromev.org/zmgeth-proposal.html) ℹ️ # Zeromev-Geth: Unilateral Fair Ordering ## problem The default transaction ordering in Ethereum results in validators being bribed to [frontrun](https://info.zeromev.org/terms.html#frontrunning) users. This is worsened by [MEV-Boost](https://ethresear.ch/t/mev-boost-merge-ready-flashbots-architecture) which auctions off blocks to whichever builder is most profitable at frontrunning (and/or capturing [private order flow](https://ethresear.ch/t/two-slot-proposer-builder-separation/10980/10)). There are currently no good options for validators wishing to avoid this moral and [legal jeopardy](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4187752). While robust solutions to this problem are possible with consensus changes[^1][^2], these are several years away at best. This document introduces an interim solution for individual validators wishing to act well and in a fully decentralized manner. ## overview By changing a few lines of code, Geth can be made to order transactions by receive time instead of gas price. *Validators using this fork will no longer be accepting bribes for frontrunning* (either via MEV Auctions or Gas Price Auctions). ### advantages - **mitigates most frontrunning** because bribes of all kinds are ignored and [selfish reordering](https://info.zeromev.org/problem) is minimized - **validators may not be legally culpable** for any frontrunning that remains, as they are no longer accepting bribes to do so (note: this is not legal advice- speak to a lawyer!) ### issues Here are some of the main issues with this approach, followed by further discussion and proposed solutions: - [frontrunning within network latency](#frontrunning-within-network-latency) - [backrunning latency battles](#backrunning-latency-battles) - [validators earning less](#validators-earning-less) - [DDOS attacks](#DDOS-attacks) ### solutions #### frontrunning within network latency An attacker may be able to frontrun a transaction seen in the p2p network by getting their transaction to the [proposer first](https://medium.com/initc3org/strategic-latency-reduction-in-blockchain-peer-to-peer-networks-6599bf38fd53) via a more [direct route](https://bloxroute.com/). The only robust solution to this is to [encrypt transactions](https://ethresear.ch/t/shutterized-beacon-chain/12249) until after ordering is established, but this is beyond scope. This situation is anyway improved by time ordering, because this kind of frontrunning is limited to network latency (~500ms). Under the status quo transactions can be frontrun by seconds, minutes or hours. The more we reduce the latency between users and proposers, the more we also reduce these remaining frontrunning opportunities, to zero in the best case: ![Unilateral Fair Ordering Overview](https://i.imgur.com/NNTRHas.png) In this scheme, wallet nodes that receive user transactions directly also permit validators to connect directly to them. If these connections could be optimized to be as fast as the dedicated [distribution networks](https://bloxroute.com/) used by extractors themselves, frontrunning would no longer be possible. Validators can connect to wallets in one (or both) of two ways: - peered as [static nodes](https://geth.ethereum.org/docs/interface/peer-to-peer) in their execution clients - via JSON-RPC websocket subscriptions This preserves decentralization in that the public mempool is still used (unlike with builder based private order flow solutions). Because of the wide adoption of [Infura](https://infura.io/) by both wallets and validators, it is possible that conditions already exist to avoid frontrunning. For example, if a validator has a direct socket connection to Infura, even users of [Bloxroute](https://bloxroute.com/) may struggle to frontrun Metamask users in those blocks. #### backrunning latency battles With time ordering, backrunners can no longer bribe validators to put their transaction at the top of the block. To be successful, they must simply be the quickest to respond. ##### validators backrunning It may seem that this will inevitably lead to spam from latency battles between backrunners. But validators have a big advantage over any other actor: *they can add transactions to their own block with zero latency*. When a backrunnable transaction is received, the validator can immediately backrun it without breaking their own fair-ordering rules. Even where transactions arrive in batches, if the proposer was peering directly with the wallet node, other backrunners are unlikely to be able to compete. In this way, [neutral MEV](https://info.zeromev.org/terms.html#neutral-mev) can be extracted by the validator and spam can be avoided without the need for MEV auctions (which maximize [toxic MEV](https://info.zeromev.org/terms.html#toxic-mev)). ##### validators not backrunning Even if validators choose not to backrun, this will not necessarily lead to spam. The situation is better than with gas price auctions, because there is no bidding war. An extractor will only send one transaction per opportunity rather than multiple bids under an auction. Also, it is not commonly known that Geth already orders transactions by time where they share the same gas price. Not only that, but this was actually done to *mitigate* spam. As [this discussion](https://github.com/ethereum/go-ethereum/issues/21350) makes clear, there were concerns about spamming due to this modification. As far as we are aware, this has not occurred. You can see this clearly [here](https://zeromev.org/block?num=14012201). The vast majority of this block is receive time ordered to a high degree of accuracy due to most of the transactions within it sharing the same gas price. ![Zeromev Block 140122101 - Mostly Receive Time Ordered](https://i.imgur.com/3XRuhT0.png) When validators do not backrun themselves, whoever has the lowest latency network will benefit instead. As such, it is likely that backruns will be done by a small number of highly resourced actors. While profits would be centralized in that case, spam would be less of an issue. To avoid centralization, validators may be encouraged to backrun and given the tools to do so. This is made easier by the fact that backrunning a single known state requires far less sophistication and hardware cost than frontrunning the very large set of all possible ordering states. ##### blockspace reclaimed from frontrunning It should also be noted that where there is less frontrunning, there will also be fewer frontrunning transactions, and so the blockspace taken up by these will be reclaimed. #### validators earning less Unfortunately, validators ordering by receive time alone will earn less because they are only paid in tips after EIP-1559. They have a a few options here: ##### altruism Altruistic validators may choose to include low or zero tip transactions anyway. ##### base fee percentage To improve earnings without rewarding frontrunning, validators may require transactions to have a tip greater than some percentage of the base fee to be included. Users can rest assured that their transactions will be included in time order as long as they tip at least this amount (similar to a fee payment to a centralized exchange). ##### select by gas Validators can choose to build a block by gas price as usual, but then order the transactions within it by receive time. In this case, they earn the same as any standard Geth validator, while not permitting frontrunning within their block. You can see how blocks like this might look by clicking on 'Fair Order' for any block on zeromev.org. #### DDOS attacks There is no DDOS attack vector because of the EIP-1559 base fee. ## references [^1]: https://ethresear.ch/t/shutterized-beacon-chain/12249 [^2]: https://eprint.iacr.org/2021/1465 [^3]: https://medium.com/initc3org/strategic-latency-reduction-in-blockchain-peer-to-peer-networks-6599bf38fd53 [^4]: https://info.zeromev.org/problem.html

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully