Tim Roughgarden: EIP-1559 – Tackling the Gas Fee Problem on Ethereum #390
11 May 2021 · 1:37:06
Tim Roughgarden, a professor of computer science at Columbia University, joins Epicenter to explain EIP-1559, the Ethereum proposal that replaced the first-price gas auction with a variable base fee. The conversation covers the game theory behind the base fee mechanism, why it burns rather than pays miners, the risk of miner collusion to suppress fees, and alternative designs considered for the upgrade.
Speakers
Topics
Transcript
this is epicenter episode 390 with guest tim rufgarden we're here with tim rough garden today tim rough garden is a professor of computer science at columbia university and he has written a pretty exhaustive paper on eip 1559 which we'll talk about with him today but before we go to the interview we'd like to tell you all about our sponsors this week our first sponsor uh for the week is
solana solana is a next generation blockchain with lightning fast blocks and fees less than a cent per transaction scalability is perhaps the biggest challenge preventing crypto from becoming the backbone of the world's financial system and today solana the best solution we have so go to solana.com epicenter to learn more we would also like to think thank exodus exodus is an easy to use wallet which supports hundreds of assets and has native apps for all platforms including ios and android and as a fully non-custodial wallet there are firm believers in the not your keys not your coins mantra go to exodus.com and give it a try we would also like to thank parisrock parisrop just came out with a huge
update that's even faster and more liquid it's cheaper than uniswop and comes with a new gas token that can cut your gas fees by up to fifty percent plus for all our listeners paraswap offers 50 gas refunds for the first swap of at least one ether make your trade and go to parisrap dot io epicenter to claim your refund so hi tim it's super good to have you here great to be here we've actually had this scheduled for a long time and eip 1559 has been in the works for quite a while so tim you're very much not our usual guest you're a computer science professor at colombia um tell us what your research focuses on sure so once again thanks very much for
having me a pleasure to be able to speak to your audience about erp 1559 so i have two main areas of expertise you know which sometimes overlap and sometimes don't so one of them is just in algorithms so many people sort of know me from my courses and research uh in books on uh on on algorithms as is taught in a typical computer science curriculum um and then the other one which is the part which really relates to blockchains is you know my whole career you know 20 plus years i've been very focused on interactions between computer science and economics and in particular i'm really passionate about sort of applications in computer science that require uh game theoretic or economic reasoning so my training is totally in computer science i'm just sort of a total auto didact
on the game theory and economic side but it's something i've been doing for a couple decades now um and i don't think i have to tell anyone in your audience that um you know blockchains are sort of uh anyone with that interest it's just an incredibly exciting opportunity were you involved with like things before like your work on 1559 or was 1559 showing your first foray into researching blockchain from like a very academic standpoint yeah it's a good question so it's kind of it's been like a slow build i would say so i started dabbling in it maybe about five years ago so you know right now i'm at columbia but before i was at columbia i was at stanford in the computer science department for about 15 years or so
and literally i shared a wall with dan bonay and um you know we had you know we're all part of the same sort of theory group um so we wrote a paper together back in 2016 which appeared in financial crypto which was about sort of incentives uh in mining pools you know in bitcoin mining pools um and so that was fun and i definitely started teaching more about really bitcoin specifically in some of my undergraduate courses because again it's such a great illustration of sort of you know you know the role that game theory can play in computer science applications um and you know i sort of was follow i'd say you know 2016 2017 i sort of was following along from sort of a hobbyist sort of perspective you know number one because
i had some other kind of big projects i wanted to finish you know books i wanted to write and papers i wanted to write but number two is i was hedging my bets a little bit so you know the question was you know would there be like what was clear is that you know doing top-rate research on blockchain protocols would be sort of a multi-year endeavor there's just so much to learn and i have sort of very high standards right so i really wanted to do it right and so given that given the cost that it was clearly going to be needed to to do good work in the area i wanted to make sure that you know there's going to be enough intellectual depth um that it would be you know that's something i could work on for sort of you know several years
and find it really fascinating um and then i'd say maybe you know end of 2018 being in 2019 i became basically fully convinced of that i just was totally sold i was like you know what it's gonna be at least five years of great work probably more you know totally worth it to sort of you know just uh just sort of dive in um so i'd say the last sort of you know year maybe i've been focusing more and more of my energies on blockchain research and so what brought you to this fees problem why was that the obviously there's a lot of academics in the space but i think you know people tend to think focused on like you know developing new consensus protocols and things like that but like you know there this usually isn't
actually that much going on on like thinking about fees so why was that the problem that attracted you right so couple things so i i think it's a great point that you know i mean there's a lot of really nice academic research around sort of blockchain certainly one of the most vibrant ones has been you know consensus protocols you know formal properties and sort of new designs which makes total sense because you know i mean you know consensus protocols and distributed computing that's been sort of a core part of computer science for a long time right there's really a rich history there a couple of turing awards have gone to researchers basically for consensus protocols um and so there's a massive community where sort of this is you know this is sort of what they did
anyways and then along come blockchains and it's just you know and it's it's just it's a paradise right because there's you know you know satoshi comes up with a new consensus protocol try to analyze it or even just this sort of shift of focus from the traditional permission setting or the permissionless setting where there's all these new questions you can ask so it makes total sense that that happened very quickly because it plugged in so neatly right there's a community that really did not have to learn much new stuff to start doing really interesting research on the consensus side and you know i i feel like there's a pretty similar opportunity on what i would characterize broadly as the market design side um you know so transaction fee mechanisms that's one example of sort of creating a market in this case would be
the market for say you know evm computation you know or just space on the blockchain um but especially you know once you start you know once you start thinking about sort of application level stuff you know it's obvious there's just tons of there's just an enormous need for sort of people who are all in on sort of crypto but also really know fair amount about market design and but it's i agree with you that's that uh you know there's there's the the migration of academics to sort of work really seriously on on market design and blockchains has been slower than on the consensus protocol side that said i think you're going to see it speeding up in the next year or two obviously there are incredibly smart
people in the ethereum ecosystem but it's all very unformal and very um meme driven i don't come from the computer science background but i also have an academic background in physics and to me that was um a major culture shock despite the fact that physicists are not known for being particularly stuck up or attached to traditional business ideas how was that for you tim uh honestly it was really exciting so um because i mean it was one of the things that actually i took notice of very early on in maybe 2016 or so i just saw you know tons of super smart people you
know turning away from you know what could have been a ride into the sunset at google or whatever other kind of cushy tech job they had dropping everything and going into crypto right and that's been happening for many years um and that's you know that's usually a very strong signal that something interesting is happening um so i totally agree with the comment that there's just like super high iqs for for people who who work in crypto i also agree you know it's true it's many uh many people don't necessarily have like a phd per se but you know i view that as kind of you know neither here nor there and i got to tell you you know being sort of an academic you know sort of you know ivory tower or whatever you know 2017 i started getting cold calls from people building things saying like
we really really need a computer scientist who knows about mechanism design and like you said i mean it's just not that common you get sort of a call with from like you know the outside world saying like we have incredible demand for your very specific you know expertise so and that's another thing i started getting those calls i was like this is not going to happen every day right so it also became as clear as more sort of a moment in time for someone with my kind of skill set that this you know like i said this can be huge opportunities here for people interested in that sort of computer science economics um back and forth another thing i'll say is i mean what's interesting is you know i mentioned briefly that i have sort of online courses and algorithms you know and those have you know you
know really like over a million people have taken them they've kind of run for eight or nine years and so through those courses i interact i've interacted with tons of let's say you know non-traditional students right so so people who are not college students people who maybe majored in history but now are trying to convert to being a programmer and they just you know and algorithms is this hard subject that they need to know they don't have to know how to do proofs by induction but they kind of need to know you know how to pass their technical interviews so that was like many years actually of communication with with you know you sort of as a profession like teaching undergraduate students is kind of a funny thing right it's it's hard to keep yourself honest because they're a totally captive audience right you've got all these 19 year olds you
know they want to get a's you know they don't really you know they don't really know what their outside offers are at that point so you can kind of get away with a lot if you're just teaching undergrads and so somehow you know when you're talking to people that you know maybe have families you know they're really busy but you know still really want to learn i mean somehow i mean it it i feel like i evolved tremendously as an educator um sort of through that process and there's parts of sort of you know doing kind of formal work in crypto that sort of reminds me of that so the first thing is i mean i really do feel like you know even if people don't have formal academic backgrounds i feel like there's a lot of just you know relevant academic work is held
in very high esteem right so i don't feel like oh i never get the sense like oh you know you're a you're a fancy professor right you know we don't want to hear what you think i've never gotten that vibe at all it's more kind of like you know just excite like if i actually start working on problems that you know people care about i just get very positive feedback about it people just seem very excited and moreover like you know it's it's because they're so smart it's very easy to i mean it is you know i'm not gonna maybe like write proofs you know i'm not gonna have a tweet storm which is like a full proof or something but as far as you know what's really important you know the really important takeaway messages has really been very little um trouble i'd say communicating that to
the people who are really who are really interested so i found it to be obviously i still interact with academics my phd students and all that kind of stuff but you know this adds like a totally new dimension uh to you know me communicating about technical material and as a result it just i mean it leads to sort of personal growth it's like yet one more community that i feel connected to um and that i gain experience with sort of how to best how to best explain different different technical concepts [Music] let's get to our sponsor solana now this is a special ad for me to read because i've been a deep supporter of this project since meeting the solana team back in 2018 i invest personally in the project and my company course one is super deeply involved in the solana
ecosystem including running the biggest validator so what's so cool about solana well we all know that scalability is the single most important issue facing the blockchain industry today and the solana blockchain is an amazing solution for it the network supports thousands of transactions per second with 400 block times and over 500 validators the special thing about solana is also that it's not a charted blockchain it's a single blockchain hyper optimized for performance so that makes it really easy to maintain composability between all of the apps on solana so that they work together seamlessly now and forever the solano ecosystem is growing at a rapid pace and it's a great
place to build your project or just get involved with the community so go to solana.com epicenter to learn more let's talk about fees on ethereum which we're here to talk about so um maybe before we dive into 1559 let's talk about the status quo and kind of explain how the fee system currently works so as an economic computer scientist um you describe fees on ethereum currently as a first price auction can you explain to us what that is sure and maybe i should be used to just very briefly to go back one step you know kind of just let's all remember why is there a transaction fee mechanism at all like why even bother having that component you know in ethereum and um the reason is because you know
with ethereum uh you really have the problem that you want which is that you know demand exceeds supply okay so by supply here i mean you know the amount of you know ethereum virtual machine computation which is available um and so you know there's on average one block every 13 seconds or so uh in one block you know there's a fixed amount of gas i think it just got raised to 15 million gas gas here being kind of a proxy for the amount of computational and storage costs um and so that means it's a finite resource right there is 15 million gas every 13 seconds or so on ethereum and nothing more so that's the supply and then the demand is just people who would you know like to see their transaction get sort of executed on the ethereum blockchain uh you know and at a price of zero the
demand for space on the ethereum blockchain would be way way way more than just 15 million gas worth of transactions per 13 seconds so that's the first thing is you can't include everybody you have to include some people and exclude some others then the question is who do you want to include who do you want to exclude and one very sort of natural approach would be like well let's try to include the transactions for for whom you know inclusion is the most valuable right so the transactions that generate the most value for the person sending the transaction and that's exactly what transaction fees accomplish right so you know if you have a very valuable transaction you want to get across the ethereum blockchain you can signal that it's a very valuable transaction to you by offering to pay a you know non-trivially large
transaction fee so when you have transaction fees it naturally sort of screens it separates the population transactions into the valuable ones those willing to pay a non-trivial fee and the sort of not so valuable ones the ones that aren't willing to pay that so that's why you need transaction fees and one thing one thing that's a very important point actually which is that you know probably at some point we'll start talking about sort of transaction fee revenue and you know you know where does it go and how do we feel about it you know and i just want to point out that that really you know that transaction fee revenue is generated primarily as a side effect of other things that you really want so what you really want is you want the blockchain to be efficiently utilized you mean the blocks are full and they're full with the most valuable
transactions that are out there and the only way you can accomplish that the only way to actually sort of separate the wheat from the shaft is to charge prices which then generates revenue so it's really just sort of a necessary evil if you like of trying to have an efficient allocation of the ethereum blockchain okay so that's that's sort of why you need a transaction fee mechanism and um you know ethereum's current transaction fee mechanism is basically copied um from what nakamoto used uh in bitcoin and it's really i mean it's a very natural i mean you know it's kind of the perfect thing to do in a first cut blockchain i mean it is i think the natural starting point um and in it's called the first price auction or alternatively a pay-as-bid
auction and so the way it works is just when you submit a transaction to the ethereum network you or you know your wallet on your behalf submits with that transaction um a bid okay so an offer to pay a certain transaction fee which is denoted in gway per unit of gas then it's really up to miners right so miners are sort of monitoring the mempool they see all these different transactions each transaction has a bid attached to it a gas price is willing to pay and miners can pack the block however they want it's natural to expect and miners generally do do do roughly this it's natural to expect miners to pack the block uh full with the transactions that are with you know offering to pay the highest gas prices so that's a first price auction as a
creator of a transaction you are yourself responsible for coming up with this offer you have to decide how much you're willing to pay and then if you're included in a block that is in fact what you will pay and in fact you will pay that directly to the miner of that block so that's the status quo so as a user what's my best course of action how do how do i determine what uh gas price i would like to pay yes that's a in the under the status quo you mean yeah yeah so that's that's a it's a tough question to be honest so you know i think you know i think probably the the broadest probably a lot of the audience you know will in it you know won't necessarily you know when they interact with the ethereum blockchain they don't
necessarily actually pick the transaction fee right they'll more have that be set automatically by your wallet so i'm sure many of your much much of your audience has experience with say the metamask wallet uh where it basically suggests you know what gas price you should offer and then even if you've ever clicked on i forget if it's called advanced or whatever but you know you can sort of expand it and it gives you three options it says oh if you're willing to wait a long time here's this lower gas price that we recommend and then here's an average one and then if you really want it included immediately here's a higher gas price that we recommend so if you think about it it must be that the you know developers um who designed metamask had to sort of tackle that exact same problem that you're
now asking like what you know what actually should you bid so they presumably have some algorithm that that gives its best guess um and then and then sort of offers it to you and um something which you know was known way before black i mean first price auctions obviously been around way before blockchains and you know in the old applications and the new applications it's just it turns out to be a very difficult problem i mean in a perfect world you could you know telepathically know exactly what everybody else was bidding and then bid just high enough so that you would get included in the block so that's what you wish you could do so if you knew what everybody else was bidding then it wouldn't be a hard problem you just bid the minimum amount necessary
for inclusion the challenge of course is that you do not know what sort of the you know newest arriving transactions are going to have for their bids you have to sort of guess that and that of course is going to depend on you know demand and demand is fluctuating often quite rapidly in ethereum so and you'll see this i mean i'm sure much of many many members of your audience will have had the experience where you use meta masks recommended you know gas price and then all of a sudden you know your transaction hangs for like 45 minutes and that's because you know it was using sort of the past to try to predict the future and you were unlucky enough to submit your transaction exactly in a period where the gas prices sort of shot through the roof and so you're using this kind of gas price
that would have been fine five minutes ago but it's not fine it's not fine now so that's that's the challenge you wish you knew what other people were bidding so you could just barely outbid them that requires guessing what people are going to be bidding in the next block and you know that's it's all you can do is make an educated guess and you're going to be wrong some portion of the time have you looked at how much users spend too much so basically if you look at um how how much gas users actually spend and what would have sufficed to get them included um by how much do they overspend in in you know in percentage terms do you know that's a good question i've never seen this i've only seen kind of anecdotal discussion of that
and and i have to say it's a little hard to know i mean so you can go to ether scan and check out various blocks there's no question you see a widespread in the gas prices that people pay now there's various reasons for that and it can be hard to know what's going on like you will see transactions that have a gas price of zero um and that may be because the miner submitted you know created that transaction itself but included its own transaction it didn't bother with the transaction fee it could be there is some other kind of off-chain agreement um off-chain way that the miner was getting paid and then you will see transactions with extremely high gas prices um and but often you know that's because their transaction you know basically they're vying to not just get included in the block but to be for
example first in the block okay if someone's executing a front-running attack or something like that so you look at you know you look at either scan you see the sort of distribution of of gas prices and you can say okay well so i mean you can do a heuristic like let's filter the zeros let's filter the ones where it seems like it's the minor or some off-chain arrangement of the minor let's filter any stuff which is crazy high and then let's look at what remains and let's agree that you know that's our guess of who the normal users are in this block and even there you definitely see you see big spreads they are not tightly concentrated you know is it a factor of two or four between the men and the max i don't remember but it's in any block that you see there's
there's surprisingly little concentration in the gas prices that even sort of the the middle part of the distribution are using it's a good question i mean like i love your questions i'd love to see someone make a a serious uh empirical attempt to get a to get a number on that percentage let's get to our sponsor exodus exodus is a fantastic cryptocurrency wallet that strikes the right balance between ease of use security and great features you can get exodus on the iphone desktop app web app android whatever platform you use it's a non-custodial wallet and that is so critical because what's the point of crypto if you don't control your own assets with exodus
you always do they're old school and they've been around since 2015. over 1.2 million users rely on exodus so you know that they've stood the test of time they have support for over 100 different crypto assets and from within exodus you can easily change one different asset to the other they also allow you to buy crypto with fiat and they even have a great offer where you can buy up to five hundred dollars worth of crypto through their ios app and pay just one dollar in fee so go to exodus.com epicenter and check out their wallet we want to thank exodus for their amazing support of app center one piece uh also is that like you know
the gas price is used there's almost like two auctions going on at in parallel there's one which is just to be included in a block and that my transaction will be executed and then the other is about the ordering within a block right where it's like you know some people are playing again you know oftentimes you know if i don't really care i just care about my transaction happening but there's other people who are playing a game where they're like oh i want to be the first in this block for xyz reason has there been any like attempts to like sort of you know separate out these two like study these two markets independently of each other yeah that's a great question i agree that's also my mental model um for the blocks it's almost like there's this kind of right so there's
like 15 million gas for the transactions and some portion of that which is not zero but also not 15 million is engaging in so-called priority gas auctions you know basically trying to really over not overpay but but pay a lot to signal that they not don't just want to be included but they want some particular position and there definitely are there have been attempts to measure for example you know you know what fraction of the overall fees come from the group of very high paying position dependent transactions versus just kind of normal transactions and i don't you know again you have to make lots of assumptions to come up with a number um but you know you know the bottom line
is it's it's you know well bounded away from both 0 and 100 so there's a significant fraction of fees coming from you know these priority gas auctions there's a significant fraction of fees or at least a significant fraction of the gas in the block let's say uh is not paying fees you know uh are just paying for inclusion or not playing for positions honestly i think you know sometimes i get questions like you know what are what are good open questions you know sort of uh for mechanism designers in the blockchain space and i think this is actually a great one which is suppose you want you know and just you know just take it from like a clean slate approach like just say from scratch right so i'm not sure originally the creators of you know bitcoin or ethereum necessarily envisioned these priority gas
auctions maybe they did i'm not sure but in any case now we know that they're going to happen in a general smart contracts platform and you could ask the question knowing that would we go back and actually somehow design a different transaction mechanism where the intuition would be you know let's because right now it's sort of very restrictive all the only vocabulary you have to communicate your preferences to ethereum's transactions your mechanism is the one number the one bid okay obviously off chain you know you could try to communicate with a minor and say more stuff but you could imagine that in the on-chain transaction fee mechanism you allow transactions to have a richer vocabulary right so just like a very sort of trivial thing would be like maybe you have an optional second bid which is specifically for the first slot
of the block for example and so that whole space is really completely unexplored at least from an academic perspective so that's something i'd love to see to see research on so that's the status quo let's talk about eip uh 1559. what's the proposal where where are we headed and what does the proposal entail so we should probably take this in pieces because it's it's honestly so efp 1559 it really proposes multiple tightly coupled changes um to ethereum's current transaction mechanism to to first price auctions and so you know one question would be what is it trying to accomplish
another question is like how does it work so how does it accomplish that so let me start with the first question uh my understanding is that the origins of eip 1559 is to solve exactly the problem we were just discussing that it's hard to figure out how to bid in um in first price auctions right so even the very smart people sort of working at metamask have only you know they haven't fully solved the problem and real so you know really you'd like to have you know you know bidding for space on ethereum being as easy as just like buying something on amazon right so when you go to amazon you you pull up a product page like for a book maybe the book costs 40 bucks what's the cognitive burden on you it's really just
a binary decision is this book worth forty dollars to me or not and either way it's okay right you get to make up your mind either way and you're not going to regret your decision either it's worth 40 or it's not in which case you buy it or you don't and you'd love it for sort of you know obviously not everyone's going to get their transactions into the ethereum blockchain but you would love it to be as transparent as possible so you would love it if you sort of transaction shows up you know and ethereum promises you look next block you know if you're willing to pay a gas price of 90 way you're going to get in uh if you're not you're not going to get it and it's totally up to you just pick either way but you'll get in if you if you bid 90
right which is not true now right you bid with metamask tells you to bid and you may or may not get in you don't know depends on sort of fluctuations in demand and who knows what else uh so that my understanding is the origin story of eip1559 you would like to change the mechanism and change the bidding mechanic so it's just obvious in some sense uh what gas price you should include with your transaction that's that's what i think of as the original motivation now interestingly to accomplish this goal you have to as i said make several tightly coupled changes and there are actually some side benefits of the other changes that you make in the service of that goal in fact at this point i think some of those side
benefits have really even maybe eclipsed um in sort of the community's mind the importance of the original goal of easy fee estimation and the main one i'll foreshadow just right now is is a lot of people are excited about eip1559 because they think that it improves the tokenomics of the ethereum network uh specifically through um you know as we talk through how it works we'll see that uh some portion of the fees are actually burned meaning they go to nobody so they don't actually go to the minor of the black that includes those transactions the fees are literally just removed from the circulating supply of ethereum so who likes that well anyone who's a holder of ethereum likes that because that's sort of like the protocol doing a buyback right so like in the spirit of a stock
buyback so by decreasing the supply you know in principle at least that increases the value of all of the remaining supply so ethereum holders see this as um you know potentially uh very impactful um on sort of you know the the price of ethereum and also just generally um connecting the value of the ethereum network to the value that's flowing through the ethereum network all right so that's the that's the what is it trying to do right so now that now we can move on to to how does it do it okay so i would say there's kind of three main ideas okay so three parts to it so part number one is there's going to be what an ethereum is called a base fee
in each block okay an auction theory you would call it a reserve price okay so the base fee is like a price floor it's the minimum gas price which anyone's going to be able to get away with to be included into this block okay so like maybe it's 90 grey and then according to 1559 if you bid less than 90 you were literally ineligible to be included in this block you're just sort of filtered in effect from consideration that's the base fee so this is meant to be that posted price you see on amazon okay so that's the that's the goal a couple questions now is all right so some transactions will pay the base fee some won't right maybe so one question is just how is this base fee computed okay so we'll get to that
in a second um i guess the the top order bit with how the base fee is computed what's totally crucial is that the base fee is a deterministic function of the history of the blockchain okay so all of the predecessor blocks on the longest chain okay that this block is extending and in particular the base fee of a block is completely independent about all of the contents of that block the minor of that block cannot influence the block's base fee the transactions included in that block do not affect that block space fee okay so that's the higher order bit that's super important it's a history dependent present independent base fee or reserve price um we can talk more about specifically how it's computed if we
want in a little bit okay and so then there's a question of you know what happens to the revenues generated by that base fee and these are exactly the revenues that get burned okay so uh any transaction that agrees to pay the base fee say of 90 per unit of gas all of that ether will just disappear okay we'll be burned now you know why do we do that do we do that because we like fee burning so actually even if you don't care about fee burning it turns out the game theory really demands that these fees are burned or at least the game theory demands that these fees do not go back to the minor of that block okay perhaps they could be redirected elsewhere but they cannot go to the
minor of that block why not okay so the issue is is that if you just tried to like have this base feed disallow transactions that we're not willing to pay 90 but then everybody everybody was paying 90 or more was included and all of that got transferred to the minor the problem is through an off-chain agreement the miner and the creators of these transactions could totally evade the base fee right so like say i'm a transaction and i only want to pay 60. i don't want to pay 90. okay i could just have an agreement with the miner off chain that says look you know i'll pay 90 on chain so that i'm eligible for inclusion but then you need to refund me 30 off chain so that my net payment
is 60. so as a result through this sort of off-chain evasion you do not succeed in preventing the low-value transactions from getting onto the onto the chain so that's really where the feed that's where the fee burning arises is sort of an inevitability given the design decision to have this to have this base fee [Music] you know most people book flights on travel aggregators to get more options and the best prices for the travel plans so when you're making defy swaps use pair swap it beats market prices across all major dexes and thanks to their network of professional market makers you'll get zero slippage on your trades they just pushed a huge update
that's even faster and more liquid thanks to a brand new algorithm it's cheaper than uniswap and it comes with a new gas token that cuts your gas fees by up to fifty percent it's no wonder metamask argent and monolith all rely on the periswap api so give parasop a try at pairswap.io epicenter this url allows you to claim a fifty percent refund on gas fees for your first swap of at least one eth this offer is available until may 1 2021 and refunds will be made every friday starting april 9th we'd like to thank paraswap for their support of epicenter is there another reason as well which is that like you know we don't want an incentive for miners to drive up the base fee as well
if the fees go back to the miner of that block it's free for a miner to spam transactions in order to drive up the base fee and by burning the fees it puts a cost on a miner to actually try to drive up the base fee is that one of the main considerations as well or is that just sort of a side thing yeah good question i view that as a side benefit in the same and we can have a longer discussion later about you know how could miners collude and manipulate this protocol you know but the short answer is is you know that kind of manipulation you know manipulating the base fee uh so miners colluding to sort of set the base fee where they want it to be that in effect is something you could already do now okay before 1559 right if ethereum miners wanted to they
could say hey guys agreement okay never again will anybody accept a transaction you know with a gas price less than 60 way okay never and they all sort of swear to swear that they'll do it and that has you know that's roughly the same as sort of manipulating the base fee so that it's 60 basically so you're right that it does further disincentivize that particular manipulation but i don't know that i'd be so worried about that manipulation even without the fee burn so i really view the the first the first reason is to fix the game theory around the base fee okay so that's part one that's so so key idea number one base fee uh it's a deterministic function of everything that's happened
in the past it's independent of anything that has to do with this block itself all right now the second part uh the second key idea is to help answer the question like okay well where does this base be basically come from right it doesn't just like fall from the sky we have to compute it how do we compute it how do we use history to say what to with how to how to choose it um and it's you know the high level idea is very natural it's basically just kind of local search in effect so if if it appears that the current base fee is too low you adjust it upward and vice versa if it appears the base fee is too high you adjust it downward so what does it mean that it appears that the base fee is too high or too low well suppose
you know the the the current base fee was like 150 way and there wasn't even 15 million gas where the transactions willing to pay 150 way right so the miner says look it looks around in the mempool it's like whoa there's all these transactions that are ineligible here are the transactions that are eligible for inclusion because their gas price is 150 or more but it's only like 10 million gas worth of transactions but that's all i got to work with so i guess i'll just publish this block which is only two-thirds full well that would be a signal right that the base fee is too high right you're actually not filling up your block right and so that's bad we want the blocks to be full we want to use all of the available real estate so that's what i mean by sort of an on-chain signal
that the base fee is too high the block is under full but now let's think about the symmetric situation right so imagine actually you know the block that you see on chain is full okay it's 15 million gas per the transactions how do you differentiate between the situation in which you got the base fee exactly right so that there was exactly 15 million gas for the transactions willing to pay it versus the scenario where it's way too low and in addition to the 15 million gas of transactions you happen to see on chain there was another 25 million gas transactions that were not included on chain that would have wanted to have been included
on chain at the current base fee in the first of those scenarios you don't want to change the base fee at all it's exactly right exactly the right amount of people are willing to pay it in the second of those scenarios the base fee is too low demand is super high and you want to raise the base fee so this is what inevitably leads us to sort of the second key idea in the design which is variable size blocks so this is another really quite significant change from how things work right now so the way ethereum works right now is there's a cap on how big blocks can be and i think was just raised to 15 million gas per block and any block but more than that is simply invalid okay it doesn't uh doesn't count so in under eip 1559 the ethereum protocol is going to be
granted additional flexibility on how to allocate how to allocate its blocks uh it is still going to have to conform to an average block size of 15 million gas okay and that's just because that's kind of what people are comfortable the network handling and in particular like if black sizes get too big you know then you have forces towards centralization right because you need sort of more and more uh resources to to run a node if the blocks get super big so people are only comfortable with an average block size of whatever say 15 million gas however under eip 1559 ethereum will be allowed to temporarily violate the target of 15 million gas up
to a cap of 2x the target so up to a cap of 30 million gas so we're gonna be seeing blocks with variable sizes possibly as big as 30 million possibly as small as zero uh but the protocol will make it so that the average block size is going to be tuned to 15 million gas per block all right so how does this solve the problem we had earlier right the problem we had earlier was how do we know whether the base fee is just right or whether it's too low well now we just look at how big the previous block was so remember a miner has the capability of going up to 30 million gas if it wants assuming there are enough eligible
transactions to to pack it with or again eligible means that the transaction has a gas price at least as large as the current base fee and so it's intuitively i mean we expect a miner to pack a block as full as possible with eligible transactions okay we'll see in a second that they do get some revenue from the transactions even despite the fever so we're thinking of miners they're going to they're basically going to look at the mempool they're going to say which transactions am i allowed to include and they're just going to include them all or you know if if that's more than 30 million if that's more than the max they'll have to make some decisions but if it's under the max right the miner does not care about this target of 15. okay the miner's just like look i've got 30 million to work with the
protocol allows it if i can pack that with sort of you know fee paying transactions i'm going to do it so if you see a block which is really big if you see a block which is more than the 15 million target okay possibly as big as 30 but anywhere more than 15 then you know your base fees too low and it's time to adjust the base fee upward you're because remember you're shooting for a steady state of 15 million gas per block so whenever you see more than that the base fee is too low you need to raise it and then like in the previous example if you ever see a block that's below the target of 15 million you know the base fee is too high and you adjust it upward and it's kind of a it's you know and then you know in the in the
you know there's a specific formula by which that adjustment is made i don't think those details are super important for a conversation today but that's that's sort of the really the key point okay blocks there's there's a target size for blocks blocks are allowed to violate it by up to 2x why is that allowed well now it gives you an unchained signal of both directions both of whether the base fee is too high like before but also whether the base fee is too low and then for the next block you just you sort of gradually adjust it accordingly to try to get the block size back to the target of 15 15 million so so just like before basically the base we can can vary between zero and in effect infinite right
right okay and basically it will be the same for every transaction included in that block but it won't be like a posted price thing because on amazon when i buy a book for forty dollars i know that i get it whereas if if um i actually just paid the base fee it's still possible that there will be um that the demand has just gone up and basically there will be many more transactions and mine won't get included right so the bad case is when the base fee is crazy low compared to the demand like imagine the base fee was zero then there's gonna be like you're not going to be guaranteed inclusion because anybody would be happy to get in at zero how can you guarantee that it's you so that's a bad case
but as the point is as long as the base fee isn't excessively low meaning as long as it's sort of like roughly correct in the sense that remember the target is 15 million gas but really as long as the base fee is high enough that at most 30 million gas is eligible then actually there's room for everybody so you're not actually competing right so as long as you're willing to pay the base fee and as long as the total number of the total gas of transactions willing to pay the base views 30 million or less you're golden right there's room for you there's room for everybody there's room for every eligible transaction and that's exactly the power of the base fee right it automatically removes from contention a whole bunch of transactions
the ones not willing to pay the base fee and if the only remaining contestants all fit in the block well then there's no hard decisions to be made by the miner just include them all so what what but what are the incentives for the miner to actually include me because i mean they could they could actually potentially benefit a lot from censoring me right and basically under the current system that's pretty expensive because they would for forego my transaction fee whereas if if they don't get any money from me why would they include me at all great so this this is this is a perfect lead into talking about the third and final key idea in the 1559 proposal so again just to review the key idea number one a base fee which is independent of the current blocked
history dependent uh key idea number two variable size blocks so that you have an on chain signal of whether the base fee is too high or too low so that you can adjust it for the next block and now good so i mean you've mentioned exact so so the last two questions mentioned are exactly the questions you should be asking which necessitate the third idea right so first of all why won't miners just publish empty blocks say collect the block reward because that's all there is for them to collect anyways and then secondly what do you actually okay but what like what if you do have a situation where the demand just spiked like crazy and the current base fee is too low and more than 30 million worth of transactions you're willing to willing to pay it i mean you still need to specify how the
protocol works in that hopefully edge case scenario so it's the same answer to both of them okay so the third idea is to have what's what's known um in 1559 is tips and tips are really basically just the first price auction laid on top of the base fee okay so each transaction will specify how much above and beyond the base fee it's willing to pay for inclusion and like in the status quo first price auctions that part okay the excess above the base feet known as the tip that actually will be transferred to the minor of that block okay so really you know a user is going to be paying
some amounts and part of that amount will go to the base fee and part of that amount called the tip will go to the mine so how does this solve our problems well so first of all now you know you can make sure miners have a non-trivial incentive to include your transaction by by setting the tip right so again two regimes there's the regime where there's competition for the current black and regime and the regime where there's not right so if there's not competition for the current bloc meaning the base fee isn't too crazy low it's at least high enough that there's at most 30 million gas that's willing to pay the base fee so in that regime which is the happy regime and hopefully the common regime uh then the tip you need to pay should be minimal
right it's just the minimal amount to make it worth the miners while to include your transaction rather than leaving that part of the block empty so the analogy i sort of like to use is it's kind of like you know imagine inside of a new york city so you can imagine i go out on the street and i want to put some money on the sidewalk you know that guarantees that someone picks it up in the next 60 seconds like if i put down a penny might not happen but honestly even if i just put down a one dollar bill that's gonna get picked up in the next 60 seconds right even though it's not really that much money right so that's you know in the in the regime where the base fee is at least approximately right that's how i think of the process right so you're just putting
a dollar on the sidewalk the miner's like well it's not much money but i may as well pick it up right why not um and so you know we'll we'll see sort of what the norms around what the tip should be um when there's no competition you know but so right now i would expect it to be like really small in the one or two way range so kind of like gas prices from years ago and then okay and so then in the other regime we're actually you know you are in this edge case the demand has suddenly spiked the base fee hasn't caught up yet it's way too low then you know at least 1559 devolves gracefully into the current status quo transaction fee mechanism it basically devolves like suppose again if the base fee was literally zero it would literally then be a first price
auction okay so the hope is that 99 of the time there's no need for any users to engage in the auction either they're willing to pay the base fee or they're not and if they're willing to pay the base fee they leave a small tip of one or two way and they're good one percent of the time okay you're going to be back in the usual first price auction kind of scenario but still if you're a user who doesn't want to touch a first price auction with a 10-foot pole uh ideally you should just be able to wait small number of blocks you know five blocks or whatever the base fee will have caught up uh to the new peak and demand and now all of a sudden once the base fee is where it should be again if you're willing to pay that high base
fee you won't be competing with other transactions you just pay the base fee and you'll get into the block this is a bit of a tangent but is there marginal cost to a miner for including a transaction yeah so i would say it's a good question i would say at least a little bit at least epsilon for some small epsilon and indeed like if you submit a tr if you submit a transaction with zero you know with zero fee and this was true i mean even even back when there was room for everybody you know typically you wouldn't necessarily be included uh at least not for a long time if you set the fee to be zero one one reason i mean i mean there's a couple things but but so one
one opportunity cost comes from uncle risk right so so for those of you who know this sort of ethereum consensus protocol in some detail right so it's a longest chain protocol so you have forks so if you mine a block that doesn't wind up on the main chain it's sort of a bummer because you know you solved this hard proof of work you're expecting to get this block reward but oops you're not on the longest chain uh and unlike bitcoin ethereum at least gives you a consolation prize okay so if you get uncle'd so if you have a block but someone else found a block sort of roughly the same time as you and the other miners extended their block rather than yours you still get some fraction of the black reward and i think it can be as high as even three quarters or seven eighths or
something like that so you can get still a very significant reward if you if you get uncle but still you lose something right you are gonna lose you know an eighth of an eighth or a quarter of an eighth which is not nothing so that's the first thing and then secondly the bigger the block you publish the longer the propagation delay of transmitting it to the other to other minors and so the bigger the chance that someone else will beat you out and you'll wind up getting uncle so there is some sort of you know it's small but there's there's sort of a still non-zero risk every transaction means a little bit higher probability that you're going to wind up getting uncle and sort of lose some of that block reward so if nothing else that puts a lower bound greater than zero on what minor should be paid for
transaction inclusion have you looked at um how cyclical the demand for block space is so basically i mean basically if you look at commuters i mean typically there are rush hours and then traffic will be slower prices on trains would be higher and so on um or i don't i remember when i when i was a kid um you had to call relatives and far off cities at certain after 8 pm or something because then telephone lines were cheaper and you know like that kind of thing have you looked at how big that effect is for ethereum which is in effect um a global thing yeah that's that's a great question in fact i'm i'm literally working with someone on exactly this question
so we're you know my collaborators sort of scraped a bunch of it's a guy named named g low and so he scraped a bunch of data from the ethereum blockchain and we're trying to kind of come up with a reasonable model of of demand and again it's it's i mean there's a lot of things that are that are difficult about the problem that we sort of already you know touched on right so one it's censored data you sort of don't see the willingness to pay um of people who are excluded you know you've got these weird off chain agreements that give you some very low gas prices you've got these pg's which give you some very high gas prices so it's something hard a little bit hard to cut through the noise but that's exactly what we're doing so we're trying to come up with
a reasonable traffic simulator or transaction simulator grounded in historical ethereum data right both for us to play with and also for other people to play with and so literally right right in the thick of that project so but as far as i have not seen a again this you can definitely find anecdotal discussions and you know like i i recall right so there's like this interesting blog post that you know vitalik wrote several years ago where he was analyzing the elasticity um around around sort of uh you know block space so in other words like as you increase the block size how rapidly would you expect the the sort of market clearing price to go down um so that involves some sort of heuristic um uses of
historical ethereum data there's a couple other examples like that but i really think there should be a sort of serious empirical study this is super interesting so the elasticity would have been the next question i would have asked so basically how elastic do you think the demand is if you look at different types of transactions if i just say i have a super high value transaction i have um a million dollars that i want to get to sunny um then obviously it'll be difficult to price me out um but say i'm an arb trader then you can put a very precise dollar value that this transaction will be worth to me on on the transaction have you looked at this or is this also is this also in the works so we have we have um it's quite noisy so you know i don't
you know i'm speaking here but you know nothing's published nothing's close to being published i mean it's very sort of early days so i don't want i don't want anything i say here to be taken too literally or sort of to be quoted as truth because this is just kind of our very preliminary sort of explorations um so we have been looking at that it's very noisy um and we've been um but we find you know we found actually elasticity a little bit higher than what vitalik did several years ago which we think is you know our is that just because you know gas prices are higher and so you know if gas prices are super low you know you don't necessarily care much if they double right whereas the current gas prices people really do care uh if they double but that's again there's a lot
more work to do before we feel confident in those in those conclusions you know even though our target block gas limit is 15 million we have to make sure the network is capable of being a running 30 million gas blocks for you know a reasonably extended period of time and i so in a way doesn't that imply that the network's true like potential capacity is 30 million gas per block but then we end up with in an equilibrium state where we only end up like you know when the system is in equilibrium we we where we basically are only spending 15 million gas and doesn't this just like artif isn't just like pricing out half the people because we just artificially like
reduce the supply of block space to like half and it's like well you know maybe if we yeah you know here's this min fee base fee that we're all getting in and we're filling this up at 15 million and this is a nice equilibrium but there's all these like other people who'd be willing to pay maybe like ten dollars less and there is technically capacity that the network could handle them but we're just not letting them in now yeah that's uh it's a good question so you know the motivation behind the design i mean the thinking is that so i'm gonna take a step back and just ask you know what criteria should we use to decide on what let's take the current version where this is a single block size and you could say you know what are the criteria by which we should set the current block
size and clearly bigger is better in some respects right you sort of accommodate more transactions you're going to have lower prices so there's definitely reasons you'd want bigger block sizes so what's pushing in the other direction right so it's basically i guess two things one is just kind of technical capabilities like just you know say of the you know peer-to-peer network that's being used right there's a certain amount of uh because you know there is this block rate of 13 seconds right so so i mean nodes have to be able to keep up they need to be processing you know faster than every 13 seconds and including you know the communication that's required and then also people you know in the ethereum community are very concerned about uh forces towards centralization um and
so there's a concern that you know if you if you really could only handle the you know if a block size was so big that you needed sort of a really serious machine to to keep up with the block rate that that would be insufficiently open okay i think that's something different communities could disagree on you know and i think we even sort of see different decisions being made by different blockchains in that regard but in ethereum that you know there's really i think it's part of the culture that you know you really you know anybody should be able to run a node basically um with sort of pretty minimal investment anyway so so those are the things that are pushing back on the block size from above and if you actually if you think about those forces you kind of realize that's really kind of governed more by
the you know the average rate of data creation as opposed to the peak rate right i mean so it's definitely true that so if you had a machine that couldn't handle a 30 minute a 30 million block in 13 seconds if it needed like 20 seconds for that it would fall behind right but then again it would sort of catch up because again any 30 million block is going to be compensated for by some less than 15 million blocks later so again i mean the base fee adjustment is going to ensure that you know if you look at a window of i don't know you know say like 10 minutes or something the amount of you know the amount of data that was generated that some of the block sizes over a 10 minute period is going to be almost exactly the same as 15 million times the number of blocks
i mean that's true if you're like just syncing the network right but if you're trying to run a mining node or something that's clearly not okay right because then you'd not be you you like if you're like mining or like you're you know you're doing something any super mission critical you want to be at the tip of the chain as much as possible yeah i agree but it wouldn't be the end of the world um and as you say i mean maybe think less of minors and more about just people running nodes right i think that's more you know this the sort of openness aspect i think that's probably yeah that's probably both but but you know i think in particular you know you want you know if someone wants to be altruistic and just kind of help out ethereum by running a node you
obviously want the barriers of doing that to be as low as possible i mean people argue about what should you know what should the block size be so the old arguments are about the maximum block size the new arguments are going to be about the target block size you can also argue about the 2x multiplier for that matter but i'd say the way to think about eip1559 is just set the target block size as high as you can get away with right meaning subject to kind of the bandwidth of the network that you're using and subject to you know the the centralization risk you're willing to tolerate and then whatever that is eip1559 just layers on the sort of extra flexibility where you can uh borrow uh block space from the near future to bring it into the present if
there's a if there's an urgent need for it so that's how i think of it so so you know go ahead and max out the target block size as high as you can get away with and then further exploit the fact that if you think about it really what's constraining the choice of the target block size is really all stuff about sort of average throughput not not maximum throughput and then use that as the variable as as the on-chain signal for for whether demand is high or low where did we land on this 2x number from so from my understanding it seems that the reason we need a max limit above the target limit is because without that we there's no ability to detect when demand is higher why can't we say like okay let's aim for
like 90 percent full blocks and by full i mean as opposed to like the max block size and every time the uh block product the block fill is like greater than 90 that's when we start to increase the fee why does it have to be 2x yeah i wouldn't i wouldn't say it has to be or i guess why was that chosen yeah so i discussed this in the report i'm trying to remember what i said so it's a 50-h page report so somehow i don't parts of it has slipped from memory a little bit because you could also definitely say why not go above two right so so the benefit of going above two would be you have even more flexibility in sort of temporarily increasing block size to absorb short-term uh demand spikes i mean personally i
tend to see the max block limit as the more important limit from like a protocol like perspective in the sense that like you know we can't we fundamentally can't let the get block limit guess to like 100 million otherwise that even mining nodes won't be able to keep up and so i feel like you know that is kind of what has to be in my opinion has to be like hard-coded like okay this is our no go limit like we fundamentally can't put this higher and then the target limit we can choose like okay what percentage of that max limit do we want the target to be yeah let me re i'm going to refer the audience to section 866 of my report i mean i could i could just read it here but that feels kind of boring
i mean i will say so as you say there needs to be some cap right just just yeah to avoid just you know obviously you know infinite size block it would not you know everything would everything would halt but i don't know that in in talking to you know people in the community and people who sort of you know develop clients and and such right so so i mean both are important right so both what is the target block size and what is what is the and in fact i mean i i know some of the teams did stress testing where they really took a test net you know copied over all of the state from mainnet you know and then simulated sort of two x blocks for some period of time i mean so definitely people were
concerned about this but the tests you know the tests i think all went well um i mean one other thing i mean one sort of side point i mean anecdotal evidence that sort of you know burst should be okay um is that you know i talk about the block rate being once every 13 seconds but it's really a poisson process by the nature of sort of the the proof of work mining so you will you will actually sometimes have one block very soon after another one um and you will sometimes have say a few minutes where you produce twice as many blocks as you would have expected like that's going to happen once a week or something like that and it doesn't really seem to be a big deal so that was another thing that gave people comfort that at least kind of 2x one could handle i you know i could
imagine going more i mean again i do think you know i think so things like cost of running a node etc i think those are good for setting the target block size and then you know especially ratio is bigger than two you know i i could imagine i mean i think that's worth keeping in mind that might be a nice aspiration point um because that again you know if the ratio is bigger than two that means it's even more rare that you're going to be in this situation where you have just a base fee that's way too low right it's even more of the time you're going to have room for everybody and no one's going to have to worry about the first price auction right so that's what's nice about ratios bigger than two it's sort of the extra flexibility you have to accommodate
a sudden demand spike i guess i was more interested in the opposite i wanted it to be like maybe only like 1.25 x because that way it's like at equilibrium we're still running at the majority like 80 of our max limit but wouldn't that assume that the that the variability in demand is very low well if that variability would just have to be pushed across multiple blocks i mean that same thing happens now i mean i guess when i guess one thing is like when we see spikes in demand on ethereum i think it's more than a 2x spike in demand right usually the spikes in demands are in the like magnitude you know in the in the me
bits auction like at the end like this demand on block space just went up like 10x or something so you know no matter what i think during demand spikes we're go we're usually going to have to spread that demand over multiple blocks anyways yeah so one just just sort of looking back at my report now so what so one thing that comes up it's kind of a subtle point but um with with if you use less than 2x if you use like 1.5 or something like that it does interact you know it's not you know i definitely don't think it's the end of the world but it interacts a little bit badly with the game theory around cartels of miners trying to manipulate the base fee in the sense that you know what you know
there's certain attacks which you know would require 51 collusion to pull off with the 2x ratio but would require only 34 of the hash rate with a ratio of 1.5 i mean you have to make a decision i mean i mean one thing that's one thing that's nice about the 2x it's just sort of convenient is the update rule is is then very symmetric right so basically the the specific update rule is after a double full block after a 30 million block you increase the base fee by 12 and a half percent after an empty block um you decrease the base fee by twelve and a half percent if you don't you know if you have asymmetric deviations around the target right so so with 2x you can be either 15
above the target it can be 15 below the target so you can just have this completely symmetric kind of adjustment function so if you can only go if you can go like down to zero but you can only go up to say 22.5 you can only go 50 over then you have to make a decision it's kind of like okay am i going to increase i should have said like in the current proposal you literally interpolate between the two right so if you have like a 25 million block you would just sort of linear and interpolate between sort of the zero and twelve point five percent to be sort of pro rata up to the up to the block size and so if you made it asymmetric you'd have to decide okay if i see a 1.5 full block which is as full as they can get
in this scenario do i you know again sort of increase the base fee by 12 and a half percent or do i just increase it by point two five percent um and if you only increase it by six point two five percent maybe that's now all of a sudden too slow uh other hand if you do increase it by twelve and a half percent now all of a sudden the cartel of miners that control more than a third of the hash rate they can now manipulate the base fee downward by publishing empty blocks so they as long as they can make one out of three m blocks empty that's going to be enough downward pressure to get the base fee to drift downward whereas if you have in the symmetric case with the 2x ratio you'd actually need to the cartel would need to get really you know 50
of the blocks to keep the base fee from sort of rising up due to the non-colluding miners i don't know that that's you know i don't think this is deal breaker stuff and so i i agree with you i mean there's not this i find the the partitioning of it like you have the target and then you have the multiplier i actually find that partitioning of things very helpful because i do think so much of the decision making is just around kind of the average block size but i definitely agree the the mult you know the multiplier you could imagine iterating with as you know in a post 1559 world you could imagine that being a parameter that gets revisited uh every hard fork for example there's one aspect that gets talked
about too little i think um so and i i'm wondering whether you feel this is this is like a side issue as well so basically a couple of years ago i remember there was this upheaval in the eth community when people realized that in principle you could actually abstract ethereum away so basically in in principle you could pay a minor any way you choose to to get them to include you in the block right so basically in principle you can paypal them the fees you could kind of set up an agreement that they have to include x number of transactions from you per day um you can pay them indirectly via mev which we actually see happening a lot right now so we see a
lot of zero gas transactions being included so this this with 1559 completely changes right so basically in principle the miner could make up for any shortcoming and base fee for the user so i could maybe still transmit a zero fee transaction but someone has to pay an eth because that heath is going to be burned right how much of that was intentional and how much was you know this narrative of making the fee market more predictable and you know the usability for the user better yeah i mean in some sense this is really you should just ask vitalik this question directly but you know my my guess from sort of you know he was writing about these ideas as early as 2014
so from like reading his early writings on it and also just some discussions with him my sense my guess is that the origin story is like i said where really the goal was easy fee estimation fee burning came out as a side product the game theory kind of dictated fee burning and then that took on a life of its own i mean one thing that's interesting is a little bit of a side but i mean so for people who are fans of the fee burning aspect right a very natural question would be like why not just like let's let's just like throw out all this bass fee stuff like you know people will d metamask is fine like let people deal with it but let's let's let's burn half the fees set okay keep everything as it is right now but let's like burn half the fees and
let the miner keep the other half but the problem is that totally doesn't work actually right because now basically again the the my you know so and it's again because of off chain agreements so the miner and the users can basically you know you know all the money that's supposed to go to the protocol they can secede off-chain and sort of keep it for themselves so you know how would that work basically all the users would just submit zero bids on chain they'd submit whatever bids they want to the miner off chain and then the payments would all occur off chain and so there would be no burn so what's kind of amazing is like you know i mean i do think these are the two biggest things about it you know easy easier fee estimation and fee burning those are the two real real big things to talk about and
so what's kind of amazing is how really you can't have one without the other it's like choose both or choose neither they're really inextricably linked and different members of the community you know some care more about the the ux the user experience issues others care more about the tokenomics and that's fine but really you know i you know i think that's i mean this is part of i think why it's a scary change for a lot of people because it's really sort of uh you know it's really kind of changing the economic model of ethereum which kind of you know in a major way but i think this is one of the reasons that despite you know the fear that people naturally have about making a change of this magnitude there are really two totally orthogonal reasons for people to get really passionate about it
um and so i think that's really broadened the base of support uh but completely agree i mean now i i has gotten to the point you know and it may just be because we're in a bull market or whatever but i mean i do feel like i hear more about the fee burning slash tokenomics aspect last month or two then i've heard then i hear people talking about the the ux these are experience improvements and i mean the the the fees have become much more dependable dependable ever since um mev gas um has uh the majority stake of other clients right so basically we haven't seen the crazy spikes that uh we've had in the past year or so things have been calmer yeah it'd be interesting to know
how i mean the block size also went up that probably helped some but yeah presumably you know flashbacks etc is a major part of it so let's talk about collusion one of the favorite topics here so in principle the miners could collude to drive down the base fees right right to zero and have the majority of the value go to the inclusion fees or the the tip fees instead right so basically if minus never mind a block over 12.5 million gas the base we would just continuously drop all the way down to zero and for that you'd only need like 50 of the miners right right so collusion so this is a
it's it's tricky to speak very formally about this but i i can tell you the approach i took in the report so basically what i argue in the report is that the sort of forces working against minors trying to collude in these kinds of ways the forces working against minors are as strong post eip 1559 as they are now it's not to say it's impossible but you know i think the fact that miners colluded only very limited ways now suggests that they will continue to collude in only very limited ways afterwards so let me just talk a little bit about sort of the status quo uh this is important to understand i think so point number one so first of all you might say like well could minors even
collude at all right maybe it's just sort of hopelessly decentralized and it's just not feasible but you look at kind of like how the block size changes get made and it appears that at least kind of the major players in the ethereum mining community are able to coordinate to some degree right by sort of figuring out when the block uh sizes should should increase and so that's interesting right so so it seems like when they want to they can roughly coordinate to to have something to make a persistent change to how how things work and so the question then is you know why don't they use that ability to coordinate which they apparently have to do other things and who knows but you know i my speculation is that
okay you know they're managing the block size and you know they're managing the block size in a way that's quite plausibly really helpful for the ethereum community right like they've never changed the block size in a way where it was obvious it was just in their interest and against the interest of sort of other parts other ethereum stakeholders now when miners increase the block size they can be doing it for a few different reasons right one reason would be just because they want to make more fees this again is going to depend on the elasticity that we discussed but you could imagine that maybe if you know it's pretty inelastic right then when you increase the block size you're just gonna be making more transaction revenues so that'd be a self-interested reason why miners might want to increase the block size on the other
hand if you thought it was more elastic they could they know we're trying to do everyone a favor we're willing to work a little harder and all of you will get lower gas prices right so it's in the benefit of the community i'm not sure how you would assess you know which of these is sort of dominant but the point is is is it's a type of collusion which is very palatable right because it's it seems to be for the health long-term health of the of the ethereum network the long-term health of the ethereum network with eth2 looming at the horizon for the mine basically the miners will be excluded anyway so basically their losses kind of bounded right is this a good time to put them with them their backs to the wall yeah no that's a fair point and i have to
when i wrote this report it was before kind of people started talking about moving up the merge right so at the time i was writing this report it was it seemed like there would be a more non-trivial window where you'd have both proof of work and eip1559 now it's looking like that window might be shorter yeah i mean and this is sort of the conclusions i come to in the report i mean i basically say you know the difficulty of persistent collusion by minors is the same however they may be newly motivated to actually overcome the barriers that are there so you could imagine that i mean you can imagine a kind of you know you know almost like a sort of you know kamikaze exit right where they sort of say you know like you said it's like we have very
little to lose we have three months to get whatever we can get right so you could imagine them trying to just like have a fork which doesn't have efb 1559 and trying to get people to sort of use that again i think that that won't be easy because you know as soon as you have say like a stable coin you know saying like oh it's no it's only the assets on you know the 1559 fork that are act that actually kind of are backed by our assets right as soon as some major stablecoin picks a fork you know i just don't see any i don't see how you could have a significant alternative fork um that almost you know that has serious use so i don't know i mean it'll definitely be interesting to see how it plays out yeah i mean that's all i can say is i don't think
there's no like new attack vector i would say really around collusion that 1559 introduces however you know it may make attack vectors which were previously reviewed regarded as not worth it they may newly be regarded as worth it because it's sort of just as you say i mean that um you're only sort of compounding your interest over a very short short window at that point so that'll be interesting to see interesting to see i mean one thing i think is clear is that you know i feel like the ethereum community is pretty mobilized to you know minimize whatever the whatever the chaos is going to be i mean i think you know there's a lot of awareness that this could happen i think
my sense is you know leaders in the community have contingency plans so in some sense i'm not like deeply worried that there's going to be you know that there'll be a month where it's unclear which fork you should be using i just i don't that i think is an implausible scenario are there not collusion attacks though that can be done to so i guess part of what you're suggesting is that there's like certain like social norms and taboos in place to prevent collusion but i feel like you know what we've seen from like the communications from many of the miners in the last couple months is that they don't see that acting against 1559 as a taboo to them and they are like ready to put in the work to like try to prevent it and
so aren't there like ways that even within the 1559 like paradigm miners can like collude to basically undo the effects of 1559 at least the ones that they care about which is the fee burning right so that so good so i mean i guess i was talking more about sort of extra protocol collusion which i kind of view as sort of the more serious you know that's more the doomsday scenario i would say right so for in protocol collusion right so thanks for bringing me back to that i mean so here's an important point which is that right now right there's a form of collusion that miners could do that they're not and not be in some sense it's conceptually not hard for them to do which is again whether when you want to
do this would depend on sort of what the demand looks like but there will be periods of time where you it would be in miners interest to artificially decrease the block size so instead of using 15 million use 10 million so that they can squeeze higher prices out of the transactions that are willing to be you know that are willing to pay for just being in the smaller block right revenue is price times quantity right as you decrease quantity the price goes up and so there will be situations where you know q goes down p goes up and the product the revenue actually goes up so um that's you know so that is something miners could do right now again this is the example where they get together they say no one is ever going to accept um a transaction with gas price less than 60
way right they could totally do that and they would probably make more transaction fee revenue if they did that at least in a smart way okay in a way that was informed intelligently by design and they don't at least as far as i know they don't and i don't you know i i don't really want to speculate why they don't i mean you could imagine things you could imagine it's just too hard to pull off logistically you can imagine that they're worried that they would it would people would notice and it'd be retaliation from the etherian community you can imagine that you know they're they just don't want to you know they don't want to hurt they don't want to hurt ethereum because that's what their business relies on you know to me that's all kind of right the point that the facts on the ground are they don't
try to artificially impose a sort of limited supply to boost revenues right so whatever reasons they don't do that and given that they don't do that i mean there are these shenanigans you can do to manipulate the base fee after 1559 but none of them are any easier to pull off than the one i just talked about that you could do now okay about sort of imposing a smaller block size they're just kind of variations of that same idea right so okay so now you're now maybe you're keeping the block size down not so much to sort of boost the immediate revenue p times q but more to like get the burn to go down but it's really the same thing right you really ask you're basically asking miners to make a short term sacrifice right in the short term as a minor you
have to give up tip revenue or fee revenue that you'd otherwise get by packing a block full so you're being asked to sacrifice your own fee revenue for the good of the collective of minors and that's you know so that's what the game theory looks like it's basically you know in game theory you would call this sort of a uh multiplayer prisoners dilemma game and you know this question is you know and so if you have a repeated prisoner's dilemma game one thing that's interesting to think about is whether you know the participants can sustain cooperation over time and you know sort of anecdotally it appears that miners you know have not been able to or not been willing to sustain that kind of cooperation over time for the sort of obvious sort of economic manipulations you could do now
so i don't really see a reason why they would start doing that after 1559 except again it's possible that they would just it would just change the equation like if they just felt under attack they're like well it's going to be a real pain it's going to be very harmful to ethereum to do this stuff but all of a sudden we don't care anymore so now we're gonna do it i do think that is a possibility one is like the social norms have changed but the other is i think also that like you know artificially decreasing the block limit today in ethereum it has this like negative effect on the network but i feel there's like collusion attacks on in 1559 that don't actually have a tangible impact on the network so so the one that i'm thinking about specifically
and tell me if this attack even makes sense because i just thought of it on this like you know a minute ago while you were speaking about it was you know what if miners go ahead and like bring you know okay we spend one day just like trying to bring the the gas the base be as low as possible right and then all we do then is miners we agree to alternate blocks between being 30 million gas and zero gas and like so every other block is empty and the every other block is maximally filled and now we ended up still keeping our average 15 million target rate and we you know but we kept the base fee low we're preventing the base fee from going higher and this didn't impact the network because we
you know in the expected way that 1559 is supposed to work at equilibrium we're still making 15 million on average 15 million gas blocks in in this version we're also making 50 million gas blocks but now the majority of revenue is going to miners instead of being burned and i feel miners might not see this as a negative because it's like it doesn't seem to be having a negative impact on the network and so they might not be so dissuaded from doing it yeah i mean you're going to get different opinions between miners and holders on this point right i mean i think at this point like the tables have sort of turned and you know you know maybe one point miners sort of felt or some miners felt that you know the transaction fees were rightfully theirs and i think now with
1559 sort of you know actually really happening in just a matter of months and everybody's so excited about it and who knows if that has something to do with the price spike or not recently but but you know there's no doubt a lot of ethereum holders now i think feel actually like those the base fee revenues is rightfully theirs um so i don't really see it's hard for me to envision any attack along those lines that would not be you know you know that would be even neutrally viewed by by the majority of the ethereum community there was also talk of um not burning the fee but actually redistributing the
fees to other miners so i mean from a game theoretic perspective it's important that the fee not go to the minor that mines the block and ie has the dictatorial say on which uh transactions go in it and in which order um but in principle the transaction fee could go to miners of different blocks preceding or succeeding succeeding or a random pool or whatever this was abandoned at some point why was this yeah that's a good question i wanted that myself and there's been a little bit of dis like this is something i highlight in my report um i call it the sort of pay it forward or sort of l smooth mechanism i specifically was proposing paying the base fee revenues forward deminers of
future blocks what you said is exactly correct all the game theory tells you to do is give it anywhere other than to the minor of the block this could be a foundation it could be past minors future minors whatever i you know look specifically at the case of paying it to future miners it's a good question i mean you know there's no question from an implementation perspective burning is the simplest and i i can't imagine that initially that was the proposal i don't know i could imagine initially that was the proposal uh for that reason right just because like let's start with this and like let's acknowledge these other more complicated things we could do if we wanted presumably somewhere along the line people got so sold on the sort of the
new tokenomics that the fee burning version would would introduce that you know i think probably like i said i mean there's just a lot of community enthusiasm um about about the tokenomics change that that the fee burning brings in um so at this point you know i can see why it's not getting a lot of discussion i guess at this point and part of it is there's just another thing is you can you can um interpolate between these two mechanisms right so this is again something that could be revisited if necessary you know in future hard forks you know you could say like oh actually you know let's go ahead and pay you know 25 percent of the basic revenues forward and burn 75 again as long as none of it goes to the current miner you're fine
right so this i mean what's actually kind of amazing about this you know people talk in sort of vague terms about like you know ethereum holders and miners different stakeholders and trade-offs between them but like actually in this family of designs there's actually this extremely explicit knob which you can turn to decide exactly how much you want to favor the holders and how much you want to favor the miners right which is just what fraction of the base free revenues get burned that favors the holders and what fraction gets paid forward that favors the miners and really you know i just view it as sort of the you know it's up to the community to decide you know what is the right value for that parameter i think it's something that you know is worth revisiting periodically in the future even assuming that the burned version is
what gets incorporated right now what are some uh alternatives to eip 1559 you know 1559 is probably one of the most popular like algorithmic fee policy systems but you know i know there's other ones as well i know the agoric team had uh has one called the escalator algorithm that i think was turned into an another eip and then i know the um goon from you know the avalanche team he has a paper which i think you mentioned actually you referenced in your paper as well have you like looked into some of these alternative algorithm systems and how do they compare to like 1559 and what are some of the trade-offs between them
yeah i've looked into i have looked into the two that you mentioned um there's certainly other ones that i have not really thought about but you know to your question so the escalator algorithm so just to explain what this is you know imagine you submit a transaction and it hangs and then you do sort of replace by free or use metamask to sort of speed it up or whatever and then imagine you keep doing that until finally it gets included right so you can imagine an actual person doing that right and so the escalator algorithm is really just sort of taking that strategy and implementing it programmatically in protocol so the idea there is so it can be implemented with 1559 or not or just by itself so let me describe how you do it by itself right so currently uh all you specify is
a gas price a single gas price and then if you want to modify it you have to kind of resubmit the transaction etc etc so the escalator algorithm you would submit more parameters and the suite of parameters would specify a whole schedule for how your transaction would bid in the coming blocks so you would say something like i want to get in somewhere in these 20 blocks you know i'm willing to pay as much as 50 for the first block and i'm willing to pay up to 100 kind of eventually and then it just and then you know hard-coded an escalator is it sort of linearly interpolates between the the beginning point and the end point and yeah so i mean that's definitely i mean that's a reasonable idea it's always a little
it can't i mean so there's a general question which is if you're gonna if you're gonna have a system which needs bidding sophistication like first price auctions how much of that sophistication should be in protocol versus out of protocol and basically the escalator algorithm is moving some of what had been complexity from by users and then sort of again making it programmatic and one one always tricky thing about doing that is is it's hard to know that i mean like from the user perspective right i mean it's not clear that this makes it easy for you to reason it easier you know any easier to reason about what gas price or schedule of gas prices you should submit right because like in a first price auction now okay i have to reason about what other people are bidding
right but then with escalator i have to reason actually about maybe i want to reason about not just what other people are bidding but how rapidly their bids are going to be increasing in the near future right which somehow makes my that's even greater cognitive burden on me so it can sort of go either way i'd say and then the way you would layer it on top of 1559 is you would use escalator just for the tips so the base fee would still be exactly as it is now but you could say oh rather than having users submit a tip they'd actually submit a tip schedule now if 1559 does what it's supposed to do tips will almost always be irrelevant and so the escalator shouldn't really be necessary i wouldn't think um with 1559 if it works if it works as it needed
so you know i think it's a i think in general it's a reasonable idea you know ask the protocol to do some of the strategizing on behalf of the users but if you care about the easy fee estimation i mean one should notice it it doesn't help or it certainly doesn't help as much as 1559 does because without 1559 you're still fundamentally in a first price auction right the fact that you've given me sort of you know a bigger vocabulary to articulate a bidding strategy fine but it's still a first price option now the other one so by goon along with david easley and i think maureen o'hara and um bazoo i think is the first author yeah so they had an interesting proposal also
which includes a sort of variance of the pay it forward idea so there's a bunch of aspects to their proposal but the part that's relevant for me now is that they were proposing that basically the fees for a given block would be split between the block of that minor and future minors so there was some parameter k then basically if you mine a block you're going to get a 1 over k fraction of your fees and then you'll get a 1 over k fraction of each of the previous k minus 1 blocks and a k minus 1 over k fraction of your block speeds will be paid forward to the next k minus one miners and the issue there which which they don't discuss and i do think is a significant issue is
again this off chain agreements off uh sort of attack vector right so because remember in this proposal like right so in other words like if i'm a minor right why would i want to give up a k minus 1 over k fraction of of my revenues like i'm happy to collect whatever i got from the past right i'll put that in my pocket no matter what but let's just focus on who showed up in my block right now i'm going to ask them to submit bids of zero on chain and submit their real bids off chain and just pay me directly and then i'm going to sort of deprive the next k minus 1 miners of this transaction fee revenue that they deserve so so there's definitely a bunch of ideas in there that i like but i do think that's a fairly serious flaw and maybe it can be
fixed but i haven't seen a proposed fix at least at this point yeah it seems this off-chain agreement really is uh you know pokes a hole in a lot of designs that like need to really be thought about and i have to say it's one of the things i mean you know coming like i've studied a lot of traditional auction design and mechanism design and it's one of the reasons like you cannot just look up in an auction theory book and sort of say oh you know it will not prescribe solutions you know in a blockchain setting because of all these idiosyncrasies right traditionally you think of sort of the person you know there's some trusted third party running the mechanism right or you think of the seller and sort of buyers is kind of competing not like colluding with each other to mess up the mechanism right so it's
just a totally different set of constraints which is really which scientifically is super interesting because just like these very basic problems have not been have not been solved before so one thing i was thinking about when you mentioned the escalator algorithm sort of like a ux thing i was thinking about earlier was uh can i just say okay so let's say you know the currently the base fee is at 50 gray and i want to go ahead and submit a thing at 50 gray uh but then you know in the very next block it happens that is like you know oh shoot the they basically just went up to 55 gray or something but maybe that's okay for me is it possible for me to just say you know what i'll accept any base fee that's in the next 10 blocks because you know
the protocol kind of guarantees me the base b is not going to spike to like a thousand gray in the next couple of blocks and so can i just say hey i don't want to put in a numerical value i just want to say i want to pay whatever the protocol minty base fee is that yeah good question i probably and i should this i'm glad you asked it because there's something i should have explained more clearly about how 1559 works actually so i talked about how you know you pay a base fee and then you pay a tip base fees burn the tip goes to the miner but i didn't actually talk about what the user submits with their transaction right so it's actually a little more complicated than now now you just submit the gas price but under 1559 you submit two parameters
there's the tip which we discussed that's the payment to the miner but then you also submit what's called a fee cap which is really just like the maximum amount you're willing to pay and that that really is i mean and so what's nice about so you could so in in your scenario you would just set a fee cap extremely large and then you wouldn't worry about it right and and so what's cool is and this is now starting to feel a little bit like a second price auction or sort of a posted price mechanism which what's nice is like you know even if you're willing to pay a lot and you can go ahead and tell the protocol you're willing to pay a lot but again sort of programmatically in the mechanism you will only pay what you need to pay namely the base fee plus the tip
if you set the tip really big you're going to pay a lot no matter what the tip you will always be paying but the a big fee cap will only hurt you when the base fee is really big kind of like slippage bounds on uniswap or something like that yeah roughly yeah it was super fascinating so if people want to find out more about you and your research we will link to the mammoth paper on eip 1559 that you did it's actually a super nice read it's very succinctly put so i can definitely recommend it but if people want to learn more about uh your research where should they follow you all right so there's a lot of information on my webpage timruffgarden.org there's also i am on twitter i'm not like a super frequent twitter user but
certainly you know whenever i come out with a new crypto paper i do post there about it you know dms are open i'm old so i i use email a lot still those are probably the best ways cool fantastic it's it's been a real pleasure and honor to have you on oh thanks so much for having me thank you for joining us on this week's episode we release new episodes every week you can find and subscribe to the show on itunes spotify youtube soundcloud or wherever you listen to podcasts and if you have a google home or alexa device you can tell it to listen to the latest episode of the epicenter podcast go to epicenter tv subscribe for a full list of places where you can watch and listen
and while you're there be sure to sign up for the newsletter so you get new episodes in your inbox as they're released if you want to interact with us guests or other podcast listeners you can follow us on twitter and please leave us a review on itunes it helps people find the show and we're always happy to read them so thanks so much and we look forward to being back next week [Music]