Giter Site home page Giter Site logo

mev-blocks's Introduction

mev-blocks

Run locally

yarn install
yarn gen-docs
yarn run start

Build docker container

docker build -t mev-blocks .

Run docker container

docker rm -f mev-blocks; docker run -d --network=host -e 'POSTGRES_DSN=postgres://mev_blocks@localhost:5432/mev' --init --name mev-blocks --restart=always mev-blocks

mev-blocks's People

Contributors

dvush avatar epheph avatar jparyani avatar martriay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mev-blocks's Issues

Wrong units?

The docs total_miner_reward in the Get Blocks API say it is measured in ETH, but the number is way too high, e.g.,

{
  "blocks": [
    {
      "block_number": 12006597,
      ....
          "gas_used": 292129,
          "gas_price": "129000000000",
          "total_miner_reward": "37684641000000000"
        },

I suspect that this should be in wei not ETH.

Add "after" query param

Would be awesome if i could more easily start parsing data X number of elements at the time from the oldest block with an after param.

Right now i can start reading from the oldest block, but i'll end up with a uneven amount of data and overlap if i ask for the next 10.000 range one chunk at the time

should we expose bundle & block timestamps?

Idea: expose three new timestamps in /transactions and /blocks

  • block.witnessed_at
  • transaction.received_at
  • transaction.sent_to_miners_at

@jiangjinyuan already made an issue about block timetamps: #7

Returning the timestamp at which a new block was witnessed by the relay will let you know exactly how much time you have, between then and when the block gets mined, to submit a bundle.

I think this is an easy yes.

Exposing data about other searchers' bundles, however, might be contentious.

Pros:

  • allows searchers to compare timestamps of conflicting bundles
  • this way you can know whether your opponent is sending bundles before you

Con:

  • anyone can see how quickly your bot builds and sends a bundle (thereby leaking info about how fast your strategy's algorithm is)

Some blocks are missing the bundle_type attribute

Here is what block query should look like (with bundle_type) returned:

$ curl https://blocks.flashbots.net/v1/blocks?block_number=14849437 | jq '.blocks[0].transactions[0]'
{
  "transaction_hash": "0x3c265fa66e96365cd8b0aa974d482b10e392eacb095662b230bb02bf42016239",
  "tx_index": 0,
  "bundle_type": "flashbots",    <-----------------------
  "bundle_index": 0,
  "block_number": 14849437,
  "eoa_address": "0xD2006fcC22DF4a674839b357Ba1525cCb05efe92",
  "to_address": "0x8aFF5cA996F77487a4f04F1ce905Bf3d27455580",
  "gas_used": 131095,
  "gas_price": "30969086989",
  "coinbase_transfer": "4059892458912163",
  "total_miner_reward": "4059892458912163",
  "is_megabundle": true
}

Here's an example that is missing the "bundle_type" attribute, it's always on megabundle (but not all megabundles are missing it):

$ curl https://blocks.flashbots.net/v1/blocks?block_number=14849053 | jq '.blocks[0].transactions[0]'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6486  100  6486    0     0  15602      0 --:--:-- --:--:-- --:--:-- 15742
{
  "transaction_hash": "0xb1a35fde6c36691e2d3185571616335490c5c7e65c7237ff9a151089115bb432",
  "tx_index": 0,
  "bundle_index": 0,
  "block_number": 14849053,
  "eoa_address": "0x881cd15C7c1aBF84416764fFbc6Dad44751122bb",
  "to_address": "0x1111111254fb6c44bAC0beD2854e76F90643097d",
  "gas_used": 180569,
  "gas_price": "7000000000",
  "coinbase_transfer": "0",
  "total_miner_reward": "1263983000000000",
  "is_megabundle": true
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.