Giter VIP home page Giter VIP logo

abm1559's Introduction

Agent-based simulation environment for EIP 1559.

Notebooks

Open research notebooks to present key ideas of EIP 1559 and fee markets.

We present a brief introduction to the rationale behind EIP 1559 as well as simulate the dynamics of the mechanism, including the basefee.

A good benchmark case to test fee market proposals is stationary demand. In this notebook, we simulate random waves of new users who have value and costs all drawn from the same distribution. Users decide whether to transact or not based on their values and costs. We show that in this environment, the basefee always settles to a stationary level that depends on the congestion of the chain, i.e., how large the demand is.

Before reaching stationarity, or when demand varies rapidly, the market endures transitionary periods where either too many users or too few decide to transact. When there are too few, the basefee naturally decreases. But when there are too many, users have an incentive to increase their premiums during this transitionary period, until sufficiently many users are discouraged by the basefee level, at which point being strategic is no longer helpful. We investigate this dynamics and briefly compare the efficiency in both strategic and non-strategic cases.

As shown by the previous notebook, strategic users in 1559 sometimes have the incentive to enter tip auctions when demand increases rapidly. The escalator is a proposal to automate in protocol the "transaction resubmission" pattern where a strategic user increases their bid over time until inclusion. Combined with 1559 to obtain a good default starting bid, the escalator could help users with various time preferences optimise their resubmission during demand shifts. In this introductory notebook, we present the behaviour of various user strategies and discuss their efficiency.

1559 will be introduced by a soft transition out of the legacy behaviour, with legacy transactions cast into 1559 format by setting their parameters from the declared gas price. This notebook investigates first the behaviour of legacy users in an environment where price references are provided by distributional oracles. We observe the inefficiencies of the legacy, first-price auction-based systems: sticky prices leading to overpayment and "bubbles" driven by high-value users. Meanwhile the introduction of the basefee and basefee-following users (explored in previous notebooks) "cools" the market, reducing the gap between transaction fees and true market-clearing price.

Publications

  • Reijsbergen, D., Sridhar, S., Monnot, B., Leonardos, S., Skoulakis, S., & Piliouras, G. (2021). Transaction Fees on a Honeymoon: Ethereum's EIP-1559 One Month Later. arXiv preprint arXiv:2110.04753. arXiv link

  • Leonardos, S., Monnot, B., Reijsbergen, D., Skoulakis, S., & Piliouras, G. (2021). Dynamical Analysis of the EIP-1559 Ethereum Fee Market. arXiv preprint arXiv:2102.10567. arXiv link

Running the notebooks

You can simply run the following commands in a terminal. If you prefer, use a virtual environment to install packages in a local folder.

git clone https://github.com/ethereum/abm1559.git
cd abm1559

###
# Optional: use a virtual environment
python -m venv env

# Unix
source env/bin/activate

# Windows
.\env\Scripts\activate
###

pip install -r requirements.txt
jupyter lab

abm1559's People

Contributors

barnabemonnot avatar dependabot[bot] avatar fredlacs avatar unixpi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

abm1559's Issues

Control randomness of the simulations

What

We use a random number generator from Numpy to generate every random event in the simulation. The generator can be seeded to ensure that the same samples are always drawn, which is important for reproducibility.

How

We need to be able to specify a seed as input to the simulation execution. When the simulation is repeated (e.g., Monte Carlo), we need to keep track of all the seeds that were used.

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.