S TOCHASTIC P ROPERTIES OF EIP-1559 BASEFEESA P REPRINT

arXiv:2105.03521v2 [cs.GT] 20 May 2021

Ian C. Moore, PhD
Syscoin Researcher
imoore@syscoin.org

Jagdeep Sidhu, MSc
Syscoin Core Developer
Blockchain Foundry Inc.
jsidhu@blockchainfoundry.co

May 24, 2021

A BSTRACTEIP-1559 is a new proposed pricing mechanism for the Ethereum protocol developed to mitigate
short-term volatility in demand for transactions. To properly understand this as a stochastic process,it is necessary to develop the mathematical foundations to understand under what conditions the basefee gas price outcomes behave as a stationary process, and when it does not. We believe understanding
these mathematical fundamentals is critical to engineering a well-designed system.
Keywords EIP 1559 · Base Fees · Stochastic Processes · Stationarity

1Introduction

The current Ethereum pricing mechanism employs the price auction model where high-value use cases are prioritizedover lower ones. The problem with this approach is that as Ethereum has grown more popular, users have difficulty
estimating optimal gas fees. In 2018, EIP-1559 was proposed by Ethereum Founder, Vitalik Buterin, as a major change
to Ethereum’s transaction fee mechanism, and introduces two different types of fees, which is the base fee and inclusion
fee [1, 4]. The idea is to have the base fee relatively stable while the inclusion fee serves as an additional tip offered tocompensate miners. This mechanism allows for the base fee to be adjusted after every block in accordance to demand.
Hence, when demand for gas is higher than the target gas price, the block size is adjusted upwards, and when demand
for gas is lower than the target gas, the block size is adjusted downwards. Blocks are allowed to grow as large as double
the target block size.
In this study, we investigate the stochastic properties of EIP-1559 base fees. As the main motivation behind EIP-1559
is to address the volatility and uncertainty associated with gas fees, we look at the mathematical conditions that thismechanism must have to achieve stationarity. We open up this discussion in Section 2 where we go over the EIP-1559
pricing mechanism. Using simulated gas demands, we analyse the stationary properties in Section 3. In Section 4 wesimulate gas demands. In Section 5 we analyse stochastic properties of gas fee simulations. Finally, we close off withour conclusions in Section 6.

2EIP-1559 Pricing Mechanism

The basic premise of the new EIP-1559 proposal begins with setting the base fee which increases when the network
capacity exceeds the target per-block gas usage, and decreases when the capacity is below the target. The calculation of
the updated basefee, bk+1 at the k + 1th block, is as follows:bk+1 = bk fk(1)

δkc(2)

fk = 1 +EIP-1559 Basefees

A P REPRINT

where δk = demandk − T arget Gas F ee and c = T arget ∗ Base F ee M ax Change; for the purpose of this study,
we applied the setup from Table 1, and assumed δk to be a normal stationary process. However before we do that, werun the abm1559 simulator [3] to show that this is the case, under the assumption that new users are Poisson distributed.
Constant
Value
Target Gas Fee
12,500,000
Base Fee Max Change
50
Initial Basefee
10,000,000,000
Table 1: EIP 1559 constants

3Analyse Stationarity

Definition: A time series {xt } is said to be strictly stationary if random vectors (xt1 , ..., xtn )T and (xt1 +τ , ..., xtn +τ )Thave the same joint distribution for all {t ∈ N0 } and n, τ ∈ N+ . This is defined as:d(xt1 , ..., xtn )T = (xt1 +τ , ..., xtn +τ )T ,(3)dwhere = means equivalence in distribution.
3.1

Augmented Dickey Fuller Test

Given the following higher-order autoregressive processes:∆yt = αyt−1 + θ1 ∆yt−1 + ... + θp ∆yt−p + t ,(4)the Augmented Dickey Fuller (ADF) test checks the existence of a unit root α = 1 (ie, H0: α = 1) where the nullhypothesis is non-stationary. The unit root in (5) is characteristic of a time series that makes it non-stationary.

4Gas Demand Simulations

To simulate gas demand δk in (2) we use the abm1559 simulator [3] where the following assumptions were made: (a)users are Poisson distributed; and (b) every TX consumes 21,000 Gas. For our analysis, we are interested in simulatinga year’s worth of gas costs, which is infeasible as running the full Ethereum chain simulator consumes a lot of overhead.
Hence, we used the simulator to generate a sample, which was analysed using Exploratory Data Analysis (EDA)
techniques, as shown in Figure 2. As we can see, the gas demand is behaving as a normal random sample.
We also applied the ADF test to the simulated gas demands, shown in top image of Figure 1, and found it to bestatistically significant (ie, p-val = 2.33e-29). Hence, rejecting HO, which indicate simulated gas demands to bestationary.

5Analyse Gas Fee Simulations

In Section 4 we simulated gas demand δk in (2) and found them to be stationary and normally distributed with µ =1.36e7, and variance σ 2 = 5.51e5. To simulate gas prices using EIP-1559 we used these parameter estimates to model a
year’s worth of gas demands and fed it through the system described in (1) and (2). These simulations can be seen inFigure 3.
We tested gas demands for stationarity. In Table 3 we fail to reject to H0 for all tests indicating insufficient evidence toconclude that the effect of stationarity exists in the gas fee simulations.
5.1

Problem Statement

For sake of comparison, let’s look at the stationarity for a standard first-order auto-regressive process (ie, AR(1)) definedas:xt = µ + α(xt−1 − µ) + t−12

t ∼ IID N (0, σ 2 )(5)EIP-1559 Basefees

A P REPRINT

Figure 1: Simulations of; (top) gas demands using random samples from a normal distribution; and (bottom) gas costs
using (1). As we can see, the gas cost simulations (bottom) are behaving like a random walk process

Figure 2: Testing normality of gas demands (top image of Fig. 1) using; (left) histogram with normal distribution fit ofdemands; and (right) Normal Q-Q plot indicates sample and theoretical quantiles match

Figure 3: Gas cost simulations using EIP-1559; we can visual see the non-stationary behaviour in price over time,
which is indicative of a random walk.

3

EIP-1559 Basefees

A P REPRINT

Simulation ADF Statistic p-value
Outcome1-1.506
0.531
not stationary2-1.260
0.647
not stationary
3-2.1700.217
not stationary
4-2.432
0.133
not stationary
5-1.844
0.359
not stationary
6-1.323
0.618
not stationary
7-1.6450.459
not stationary
8-1.6620.451
not stationary
9-1.1240.705
not stationary
10-1.930
0.318
not stationary
Table 2: ADF test on basefee simulations from Figure 3 to test null hypothesis (H0) that a unit root is present; whenunit root is present, then sample is considered to be non-stationary. As we can see, we fail to reject H0 for all ten tests
indicating insufficient evidence to conclude that the effect of stationarity exists.

The above process is stationary when |α|<1, hence has a single root 1/α outside the unit circle. The asymptotic
stationary distribution can be shown to be:σ2
x∞ ∼ N (µ,),(6)
1 − α2
when σ>0. Considering the (state space like) simularities to the AR(1) process to the system of the system of (1) and(2); the question is what are the constraints (if any) that time varying process δt must meet to ensure stationary outcomes
for the basefees.
5.2

Random Coefficient Autoregressive Models

Considering the problem statement in the previous section, we look to another relative to the AR(1) process, namely theRandom Coefficient Autoregressive of order 1, or RCA(1) process. The RCA(1) is similar to the AR(1) process in thesense that the parameter α is allowed to vary with time. This is quite similar to the EIP-1559 system of (1) and (2). TheRCA(1) model is given by:
xt = α + βt xt−1 + t ,(7)2where t is an independent sequence of random variables with 0 mean and variance σ > 0; βt is an independentsequence of random variables with mean µβ and variance σβ2 of the random coefficient βt , and variance σ 2 of the error
t . Given (3) and (4) it is obvious that when σβ2 = 0, the RCA(1) in (5) becomes a AR series, and becomes a random
walk when µβ = 1 and σβ2 = 0, hence non-stationary.
EIP-1559 (1) fits into the framework of a Random Coefficient Autoregressive (RCA) model when  is negligibly small.
This is good news, as it allows us to apply the body of work on RCA processes to this problem. The next question is;under what conditions does an RCA(1) process exhibit stationary behaviour. If we know this, then we can apply thisunderstanding to the EIP-1559 mechanism. To help with our understanding regarding this, we apply Wang’s Theorem[7]; see Figure 4.
Theorem Consider RCA(1) model (5) with βk , k , which is identically normally distributed. Then the sufficientcondition for the existence of a strictly stationary and ergodic solution is that:Z 1

1 − exp[−λ(1 − w2 )]dw,
1 − w20
where ς ≈ 0.57721, denotes Euler’s constant and λ = µ2β / 2σβ2ln(σβ2 ) < ς + ln(2) − 2(8)Proof: See Theorem 2 in [7].

6Conclusion

The purpose of this study was to understand under what conditions the EIP-1559 pricing mechanism would behave as astationary process. We believe this as a critical first step to understanding the constraints to engineering a well-designedsystem. Given the enormity of the Ethereum project, understanding these fundamentals are needed for setting up
4

EIP-1559 Basefees

A P REPRINT

Figure 4: Region of strict stationarity and ergodicity for RCA(1) determined via (8). The annotated red dot represents
where our setup (Table 1) is in relation to the region where an RCA(1) process behaves as a strictly stationary process.
Based on this we can see that our setup was non-stationary.
well-designed simulation experiments to help capture all the edge cases that may arise so that the number of updates
and patches are minimized prior to release.
It was determined that under the parameter setting used in this study, that the outcomes behaved as a random walk,which is a non-stationary process. The RCA(1) was used as the mathematical framework to help understand this, as we
can go to the literature to help guide our understanding of this kind of process. This conclusion was based on a series ofsimulations which we tested using the ADF, and Wang’s Theorem indicating the region of stationarity for an RCA(1)process.
Ideally, we would like EIP-1559 to behave as a stationary process. Hence, more investigation is required to understandthe setup that is necessary to achieve these conditions before proper simulation studies are implemented.

References[1] V. Buterin, Blockchain Resource Pricing, Apr 2019. Accessed on: May 2021. [Online]. Available:
https://github.com/ethereum/research/blob/master/papers/pricing/ethpricing.pdf[2] T. Roughgarden, Transaction Fee Mechanism Design for the Ethereum Blockchain: An Economic Analysis ofEIP-1559, Dec 2020. Accessed on: Apr 2021. [Online]. Available: https://arxiv.org/abs/2012.00854[3] B. Monnot, Agent-based Simulation Environment for EIP 1559, Accessed on: Apr 2021. [Online]. Available:
https://github.com/barnabemonnot/abm1559[4] L. Trapani, Testing for Strict Stationarity in a Random Coefficient Autoregressive Model, Jan 2019. Accessed on:
Apr 2021. [Online]. Available: https://arxiv.org/abs/1901.01077[5] C. Chatfield, The Analysis of Time Series: An Introduction. 4th Edition, Chapman and Hall, New York, 1989
[6] D. Nicholls and B. Quinn , Random Coefficient Autoregressive Models: An Introduction, Springer-Verlag, 1982
[7] D. Wang, Frequentist and Bayesian Analysis of Random Coefficient Autoregressive Models, North Carolina State
University PhD Dissertation, 2003

5