Skip to content

Instantly share code, notes, and snippets.

@pietjepuk2
pietjepuk2 / mev_compare.py
Created May 6, 2023 08:48
Compare bids of MEV relays
import requests
GENESIS_TIME = 1606824000 + 23
# https://raw.githubusercontent.com/remyroy/ethstaker/main/MEV-relay-list.md
relay_list = [
("Aestus", "https://aestus.live"),
("Agnostic Gnosis", "https://agnostic-relay.net"),
("Blocknative", "https://builder-relay-mainnet.blocknative.com"),
("bloXroute Ethical", "https://bloxroute.ethical.blxrbdn.com"),
We can't make this file beautiful and searchable because it's too large.
12965000,1000000000
12965001,1124967822
12965002,1265451421
12965003,1423420054
12965004,1601260312
12965005,1801194152
12965006,2026211870
12965007,2279324154
12965008,2563965901
12965009,2884437784
@pietjepuk2
pietjepuk2 / base_fee.py
Last active September 10, 2021 14:17
Read base fee from Geth
import requests
FILE_NAME = "base_fee.csv"
LONDON_FORK_BLOCK = 12_965_000
session = requests.Session()
headers = {"Content-type": "application/json"}
# Get latest block number from Geth
response = session.post(
@pietjepuk2
pietjepuk2 / get_validator_duties.py
Last active August 6, 2023 16:21
Get validator duties (find largest gap in which to update for that $0.04 it will save/benefit you)
import json
import math
from datetime import datetime, timedelta
import requests
SLOTS_PER_EPOCH = 32
SECONDS_PER_SLOT = 12