Protocol cryptoeconomics with the RIG
ETHCC 4 · July 2021 · 23:48
Barnabé Monnot introduces the Ethereum Foundation’s Robust Incentives Group and its methodology for evaluating protocol changes. He discusses agent-based simulation, formal analysis and empirical work on EIP-1559 and proof of stake.
Speakers
Topics
From ETHCC 4, hosted by Ethereum France.
Transcript
and hi everyone my name is bernabe munoz i am a researcher at the robust incentives group which is a research team at the ethereum foundation today i will tell you a bit about protocol crypto economics with the rig i'm very disappointed that i have to do this remotely i would much rather be here in paris which is also my hometown with you but i'm very happy that you you could make it and that you can see my presentation today let me just introduce very briefly what the rig is um so it's a research team hosted by the ethereum foundation uh that really focuses on everything
that has a strategic flavor and by strategic we mean sense that we look at situations where stakeholders have to make decisions to to optimize their payers maybe to maximize their rewards for instance but these are also situations where your payoff is is a function or is affected by the decisions of other stakeholders so it's a very general model of strategic incentives and let's say decision making which is well suited to study things such as protocol security crypto economics so i'm picturing here a few applications you might know all of this under the name of game theory and mechanism design but we've decided that
crypto economics is just much sexier so this is a for choice for instance it's a model that's in fact well suited to study many other things like growth of cities or even transportation which was actually my focus before getting into the ethereum rabbit hole today i want to give a brief overview of some of our latest results and discuss a bit our methodology around two specific applications so we've done a lot of work on eap1559 which is a very important change to the to the transaction fee market we also looked a bit at the proof of stake protocol so try to model the protocol in these
stakeholders game theoretic terms and at the end of my presentation i will show you a new model that was released last week which which is dedicated to to provide economic modelling for for the community so let me start with eip 155 i should probably start by saying that tim baker who is the amazing project manager of a lot of things in ethereum is actually going to be speaking about the road to mainnet for eip1559 it will be in this room in one hour i will only give a very brief introduction but if you want to learn more about the eip you should definitely go and attend his talk but let me just
briefly give you the gist of what is happening so erp 1559 is a reform of the transaction fee market which adds dynamic congestion pricing so the protocol adds this new what we call base fee a minimum fee which is a constraint that says okay if you want to be included in a block you have to pay at least the base fee and the base fee is dynamic so it varies block to block and it's it varies so that it tries to to equalize to to match uh demand for the chain for execution on the chain and supply of gas in in the chain so when more users want to transact it's a sign that
the minimum fee needs to be increased we need to price out more people and when less users want to transact we can we can decrease it we do that by doubling the size of the block so we now have 15 million gas per block after eip1559 the limit will be 30 million we still target 100 fullness so 15 million gas and and we use that as a kind of objective oracle that tells us whether blocks are getting too full if they are reaching max capacity or if they are not full enough and we use that to to vary the the base fee so users declare on top of the base field what they wish to add to that
minimum fee and we also declare their maximum fee and they end up paying the current base fee plus this uh priority fee um that they have declared right this is a very like two minute discussion of this please go check out tim's talk later so what have we done for eip159 we've done what we call agent-based models i mean we don't call them that they are called that in the literature it's a very well studied form of modalization the general idea is to code simple behaviors simulate so code simple agent behaviors and and just let them let the simulation play out
and kind of at the end of the simulation try to interpret the outcomes that we that we observe without necessarily specifying uh where we want the simulation to end up so we just go to basic rules the transition and we observe how things unfold over time here is one of the most famous agent-based model which is called the shelling segregation model it's a very simple interacting rules we start from a random state at the beginning and at the end we observe maybe something that like an emergent phenomenon and we try to to understand why it happens so to simulate the free market it's a bit more complex than this shelling model and we have first agents we have two types of them we have users
who want to transact so they have a certain value for their transaction and they have different bidding strategies and we also have blog producers who are responsible for the management of their transaction pool and for their inclusion strategies and so we have these two types of agents they coexist in this environment so the environment can be any flea mechanism so we've modeled current feminic engine we've also modeled eap1559 we've modeled an alternative proposal called the escalator anything can be modeled and we just let the simulation play out and we try to to understand what's going on i've left the link here this is where you can find some of our reasons so simulations are nice they really like
give us a view into this emergent phenomenon that sometimes we may not expect in fact to to arise or or we can kind of anticipate what the what the free market will look like once it's deployed we really need to de-risk as much as possible these big upgrades to the to the protocol so the more information we get ahead of time the better it is and in fact the simulations also sometimes give us clues as to things that we can formalize and this is what we've done in this paper with my co-founders leonardo's ethan you can find it on on archive we've managed to prove some results around the stability and the instability of eip159 in general cases as well as more pathological cases
one of them is plotted here and so this this kind of workflow starting from simulations trying to get ideas of what could happen being able to formalize what we can this is very helpful and it's definitely laying the groundwork for the work that we might be called to do in the future which is how do we tune eip1559 how do we interpret things if they go wrong after after it is deployed so there are many things that are possible but we definitely at this point just need to get data first so we're looking forward to the august 4th launch to to validate first assimilations and also some of our formal results one big thing that we emphasize in the
rig is the idea of open source and open science all of our results all of our simulations are basically based on notebooks so these notebooks are available in our repository we really focus on this aspect of reproducibility and try to make the notebooks as reader friendly as possible so you have access either to the raw notebook or to a html version of it and and what's been really nice is that we've seen now the community has sometimes used these notebooks to make their own simulations and to try and extend them in ways that that were maybe unexpected from from me and the team
so this is eip1559 i will now talk about a proof of stake which we are not allowed to call ev2 anymore we have again try to do as much as possible simulations to to understand the system the starting point was a little bit different because the specs for the ethereum proof of stake are very well written and then we we took that as kind of ground truth for our simulation but to to to zoom out a little bit the idea is to adopt the view of blockchains as these control dynamical systems so they are systems because they they have like many moving parts and they have some kind of state which is the the current chain of blocks like the data
they are dynamical because you have updates so a block is added this adds more information there are transition rules and it's controlled because you have users and validators in proof of stake who participate in consensus and who kind of steal the system towards certain states so as i as i was saying before what we've done is adopt this view try to abstract from these titan executable specs which is believe the ground truth for the ethereum proof of stake protocol and abstract from this as much as possible to arrive at the strategic representation of validator behaviors so we couldn't extract too much we still had to do a little
more such as simulating the propagation over the peer-to-peer layer but we arrive at this this model we are able to specify very simple let's say validator behaviors and and make it look like this agent-based model so validators can be either honest or rational or offline these types of behavior we try to simulate and try to understand well if we invalidators are doing what we want them to do do we actually get the outcomes that that we expect to get and interestingly sometimes we don't and i think two ways that the beacon runner has been helpful are these the first one is payoff
testing so the the proof-of-stake consensus is actually fairly com words that it pays out there are many different sub-mechanisms which kind of interplay with one another and recently we were able to figure out that some of the rewards that we expected to be paying out to validators it was actually not quite by a few percentage points so so this was helpful to to just simulate and collect these results and the second way that it's interesting to do this is to really do the strategic testing so we have this idea that validators should do their job honestly and we have some kind of specification for that honest job doing but sometimes validator
could be doing something else maybe being a bit late or sending wrong votes and somehow making a higher profit so in the proof of work for instance you can think of selfish mining as such a deviation and and with a beacon runner we really hope to to isolate these kinds of strategic questions and to have a clearer view of whether the protocol has defined is indeed rational for the validators who follow them one notebook about the payoff testing is available here it's about alter another notebook which was kind of looking at this idea of strategic deviations is also available at this address another thing that we are quite focused
on besides simulation is also data analysis so we try to understand not just the protocol from this virtual let's say point of view but even see it run try to collect data try to monitor some some critical metrics study also some dynamics as we play out and potentially if if we are called upon to diagnose issues when they arise so we've done for instance a deep dive into the aggregation mechanism of the votes in proof of stake for the first thousand epochs which revealed some perhaps inefficiencies or ways that the protocol could be more optimized and i also encourage you to check out these beacon digest notebooks which are produced by sham
sridhar who's an intern with us this summer he's been publishing every two weeks kind of like a summary of what has been playing out in proof of stake and then using research papers to to orient his analysis all right so at this point i will introduce this new model for ethereum economics we are really we believe it's important to understand the economics of ethereum of course but but all the more so because things are changing very rapidly these two previous topics that i discussed eip1559 proof of stake
they drastically change the way uh the economic uh if as an economic asset behaves so eip1559 adds this sink to the to the if asset the the heath that is collected from the base fee is burnt so it's a way to to remove it from the from the supply and proof of stake on on its own will also considerably reduce first the cost of securing ethereum but as a consequence also the issuance almost tenfold compared with proof of work and in fact the issuance will be much more also variable compared to proof of work and it's two ether per block reward for proof of stake we have instead this this sliding scale
where validators earn more or less rewards on their on their stake depending on the number of validators in the system so there's again like more moving parts and moving parts that are really inherent to the ethereum protocol and so so it's very important to to understand them this complexity there's definitely been uh the challenge was taken upon by the community to to to to try and do that it's critical to modern to model these long-term effects and understand possibly economic interaction not only at the protocol level but between the protocol and other applications for instance pingtale has been looking at the validator rewards
and then flashbox has used this model to to model the impact of mev for validators in ev2 i believe alex from flashbox is also going to talk about this either sooner or later today there's been a few economic calculators on based on spreadsheets the ultrasound many people have recently released their own front end to to model the deflation and the burn they're very focused on this and and finally rocket pool which is a staking provider for non-custodial validators has been releasing also an analysis on the post merge apy so so it's very it's definitely like a lot of moving parts a lot of people
are looking at it and and what the cadillac cad labs team which is a team that we see the grant from the ethereum foundation has done they've created this um very extensible very well designed python-based model that that contains the basic protocol dynamics such as proof-of-stake validator rewards and costs the eip1559 free market validation validator adoption patterns as well as different price models all of this is included in the model kind of out of the box so that anyone can take that model and either play with the parameters themselves run their own analysis and scenario or extend it so it's been designed for
modularity and extensibility so you can extend it to also understand maybe the impact of different parts of applications on the protocol or on these economics it's fully documented and it it comes with a few notebooks that kind of show you how to how to use the model and also provide some analysis it's built on this new library which is cadcad and in particular the radcad implementation of cad cad and so this is very helpful to to provide this extensibility and another good news is that it comes soon with an online master class probably by the end of the summer where you will be able to first learn a little bit about the ethereum proof of
stake protocol but also learn how to use the model and run your own analysis so i encourage you to try it out you can find the repo online on github at this address you can also contact the cad labs team for a model overview at the cadlabs.org twitter handle or you can also find me on twitter we've been collaborating with them to to build this model and uh and i'm happy to to to hear what you are what you intend to to build with it that's it for me enjoy paris very sorry that i cannot be here and thanks for tuning in you can find most of the things i've been discussing
today at our homepage io rig thank you so what do you mean by censorship
resistance like the action of miners who would be blocking for instance users from hanging there right so sorry right so for instance there's been some modelling around uh can miners collude to do something bad to the to the free market uh you you can model that for instance with the eip1559 simulator you you could find uh for instance um bounds let's say you could simulate
uh the the action of some group of miner colluding and another group playing fair and you could probably find some bounds on the amount of censorship resistance that the system has given some level of of collusion in the system for proof of stake the guarantees are slightly different so you have this protocol that provides let's say accountable finality so you know that if a group of validators that he colludes to try and stop the protocol from finalizing so from providing safety guarantees for proof of stake you know that there are some kind of emergency scenarios where you could fork
out these validators who do that or you could recover from from attempts at censorship differently so you can you can of course model both of these scenarios either with the beacon runner or with the eip1559 scenario possibly what you would get from simulations that you couldn't get from let's say a more formal analysis is these bounds that might depend on kind of random events when are you allocated slots to propose a block uh when are you yeah what is your inclusion strategy these sorts of things yeah i hope that answers your question okay then
thank you