# ELI5: Cryptoeconomics by Julian Ma | Devcon Bogotá

- Speakers: [Julian Ma](https://streameth.org/speakers/julian-ma)
- Channel: [Devcon](https://streameth.org/devcon)
- Date: 2023-10-07
- Duration: 29:17
- Watch: https://streameth.org/watch/yt-gMiykGwPDSI
- YouTube: https://www.youtube.com/watch?v=gMiykGwPDSI

## Description

Visit the https://archive.devcon.org/ to gain access to the entire library of Devcon talks with the ease of filtering, playlists, personalized suggestions, decentralized access on Swarm, IPFS and more.
https://archive.devcon.org/archive/watch/6/eli5-cryptoeconomics/

.

Speaker(s): Julian Ma
Skill level: Beginner
Track: Developer Infrastructure
Keywords: engineering

Follow us: https://twitter.com/efdevcon, https://twitter.com/ethereum
Learn more about devcon: https://www.devcon.org/
Learn more about ethereum: https://ethereum.org/ 

Devcon is the Ethereum conference for developers, researchers, thinkers, and makers. 
Devcon 6 was held in Bogotá, Colombia on Oct 11 - 14, 2022.
Devcon is organized and presented by the Ethereum Foundation, with the support of our sponsors. To find out more, please visit https://ethereum.foundation/

## Transcript

foreign [Music] from just regular old economics well it's the environment we live in a very different environment with the decentralization and touchlessness that makes economics a lot more difficult we channeled rely on the outside law enforcement that makes people follow what we do instead it's a very adversarial environment where where we only assume that people are rational meaning that people maximize their own payoffs and do what's best for them this also what makes it very exciting in my opinion where crypto economics really started was with the game theory of the Bitcoin protocol uh so James theory is the study of strategic Behavior or how you would respond to situations in which other people also make decisions about how they behave um importantly in this in for Bitcoin protocol is that you have a decision in which chain to mine you could I remain mind on the longest chain or on the note of work and this decision is something that every Miner actually has to make and you're incentivized to mine on the longest chain because you'll get some issuance rewards and fees and if you mine on another chain and it's not included in the tunnel chain you only waste your energy spending on this meaning you're incentivized to do the right thing now in Game Theory we usually put these kind of games into tables to make it easier for ourselves to see what's happening what other players are doing and how we can determine our own strategy so as you can see here assume that you're a Bitcoin miner uh doubting to minor the longest chain what you're supposed to do or on another chain for the next plot and all the other miners we've added dated into one group as well and they're simultaneously deciding on their strategy as well so in this table the first Emoji corresponds to the utility or payoff of the person in the First Column so that's you as minor and the second Emoji corresponds to what all the other players are doing and we can see that since all the other players are in this situation uh mining on the same chain they'll always be happy as that chain will be the canonical chain however for you deciding on which chains mine on um it's important to think about whether you're going to on the longest chain or on the other chain and then how you could determine your strategy is to see given that other people are mining on the launch chain what maximize my payoff well in this case mining on the launch chain as well and given that other player players are mining on another chain what much much more payoff well mining on the other chain so since every player in this situation has the same strategy we actually end up in a point where there's a steady state everyone Minds on the same chain hopefully and this is the steady state is what we call a Nash equilibrium because no one has a strict incentive to deviate from this from this situation so if you're mining on launch chain if you mind on another chain it means that your payoff will be less meaning that you're um meaning that you don't have an incentive to deviate so this is the game free reports of crypto economics small instruction and now we'll introduce a bit more Theory called mechanism design so mechanism design is really the study of Designing strategic situations with game theory in mind so how can we make games so that's the payoff or the the outcome is how we want it to be an example could be when we're designing an auction we want people to have have an easy way to bid so for example bit their true evaluation of something um and we want that to be incentive compatible with the protocol so incentive compatibility means that the the designers have a door in mind and the strategy that users are going to deploy reaches that goal um so in that case we could use Game Theory to see what's the strategy and how can we design about this and it's always very important to take into accounts what you're actually designing for so there have been some famous mistakes for example um some game uh some Olympic games where the the pools weren't made correctly and some teams actually try both try to lose which is very weird setting okay so then if we turn back to our example of the miners in Bitcoin Bitcoin enforces that everyone mines on bonus chain which is what the pro skill wants them to do by issuing rewards only for those in mind on the longest chain so this was a section about uh Game Theory and mechanism design and bit more theoretical setting days will have more into apply settings but if anyone has any suggestions questions or anything please just raise your hand if not we'll just continue to how the gas market works so many of you have probably heard the college speech this morning he talked a bit about the dash market and I'll try to elaborate a bit on that so Dash markets is basically for any transaction that you send to ethereum you pay cash and how this gas system starts it um is dependent on the amount of operations and the type of operations that you do in its transaction so each operation of opcode has a fixed amount of Dash units that are associated with it so for example multiplying two numbers just five units of gas and adding two numbers plus three units of cash and this and this ratio is relatively defined so five three ratio and this doesn't change but this may be weird because as you may have noticed the amount that you pay for your transactions isn't actually fixed this is because the amount of if that you pay per gas units so these are two separate markets um is determined by supply and demand it's important to have this distinction between the amount of gas units and the amounts of if that you pay per gas unit we have a dash limit to preserve decentralization which of course a drove of the protocol and this is done because if we could make the trader for a higher Dash limit so more Dash units per block and this means lower fees more transactions but it means less decentralization because less people would be able to participate in the protocol less people would be able to validate um meaning that we miss one of the doors of decentralization and how blots are in principle made um is that they a minor sees all of the transactions that come into the mempool and they choose the transactions that are paid the highest fee per Dash units and they basically just fill the fill them and fill their blood with the high Space instructions at the end the rationality assumption that we talked about before important to note here as well is that this is the pre-erp 1559 gas market I talked a bit about this Erp later um but this is the simplest setting how it was before uh some time ago in ethereum um then this actually this auction for blotch space so an auction in which we sell a scarce resource which is blood space which is what the ethereum protocol sells is actually a first price auction so players bid for the transaction to be included and if they win the bid uh win the auction they they just pay their bid and they're included however this is not an ideal setting because it's very difficult as a user to know what to bid exactly If you bid your true evaluation you get your transaction in but you also pay everything in gas fee so you're not really better off so you're going to shade the bits and going to bit a bit lower lower but you don't really know how much speed and it's also difficult for the protocol because in some cases people that actually have more valuable transactions that we're willing to bid more are notes included while people that have lower value transactions are included because it's difficult to determine your bidding strategy how could we design an option mechanism for ethereum in which block space is sold in an incentive to possible manner so that people can just bid their true evaluation and do not have to worry about shading we have second price options in principle these are very simple we are auctioning of the scarce resource again block space and if you win an auction and you pay the second highest bid so for example if I bid 10 10 if you bit 14 even to other people bit five one if you win the auction with your 14th bid but you only pay my bid of 10 if which is the second highest bid and the nice thing about this property is that we can mathematically prove that in this case it's dominant strategy incentive compatible this means that it and every person has a strategy independence of what other players are doing to Simply bid their true valuation this match is their utility maximize to pay off and because every user is going to do this we end up in the National equilibrium we talked about before and this is actually great because now uh we have a National Credit Union that we as opposed to want and so why wouldn't we just Implement um the second price origin this is an open question so if anyone has a suggestion why we can't Implement detection price option in ethereum so you mean that you know that what everyone bids um so you can't Implement a second price option because because then you can just pick yourself yeah exactly so because of the adversarial setting miners will maximize their payoff so let's say that you have a block in which there are four transactions one paying 10 fees eight fees seven fees and two fees and we'll assume here that the second price version works in the case where you just pay the lowest transaction that's included in the blood then every user will have to pay two fees if the if the miner uses the real transactions however the miner can in the adversarial setting maximize their payoff by using by stuffing the block with a known transaction so they switch out the transaction paying two fees insert one of Stitch and now three people pay section fees instead of four people paying eight meaning that they maximize their payoff and this is something that can be easily done by a minor it's very difficult to detect um therefore we can't Implement these kind of mechanisms um which is unfortunate because as we have seen there are quite a few negative consequences of first-price auctions for example the priority gas origin or PGA for shorts this means that if there is a very valuable block space you may want to have your transaction included before other players so for example if there is an nft minting and there's only one nft you want to be the first one to mintage NFC but other players might may also want to mince it so let's say this nft is worth 100 if you're willing to pay up to 100 even gas fees but of course you want to shade your bid as much as possible and pay as little as possible and that's what we see here on the y-axis we see gas bids in Kuwait and in the what oh sorry and on the x-axis we see time and the the orange triangles are bits by one uh bolt who is searching through ethereum seeing if there are valuable transactions they want to bid for and the blue uh is a similar book but just a different one on the green star we see where um they're both at one and the red uh botches the boat that lost and you see that the bids are increasing over time um outbitting each other it's it's relatively by small amounts to maximize their payoff I know why this is exactly bad for the protocol is because um it spansom mempool um it made sure that even transaction stats don't win so transactions that aren't the green one are also included in blood because they pay a lot of cash fee so mine is our incentivized to include them in the blood meaning that the block is filled up with transactions that revert they do nothing and they're basically only waste blood space and since blood space is now more scarce base fees or Dash fees go up uh which is bad for everyone of course so an elegant solution that was forced for this is erp1559 as I spoke about before and basically what this does is it transforms the fee markets into something that resembles more of a setting price option so now up until erp1559 you just pay the dash fees and those go to the the block Builder and they um they can put all of their profits in the pockets but now there's a base fee that's determined by the protocol and an amount that you give to the blood Builder and the space fees Burns so there's no incentive for people to try and make off-chain agreements give new parts of the base sheet um and this this makes the bidding for bloat space very different because now bloods in general aren't full so miners are just incentivized to include whichever transaction pays them enough tip to be included and so bidding is a lot has performed a lot easier you basically just paid a base fee you add a very small amount of trade that's uh constant over time and this means that your strategy of bidding is basically incentive compatible with how to post your one should to do so it resembles kind of a second price origin um and you can just fit their true value and also um it's a common misconception that's erp1559 decreases uh total fees or gas fees at users pay and this is not the case because it's only a mechanism of how users bid for their transactions to be included the blood space in the long run is not is not increased meaning that attachments don't decrease because the supply and demand are still the same so that was Parts about desk fees um if anyone has a question Erp 159 is Right interesting so um I'd be happy to take anything but otherwise will just continue with maximum attractable value which is also a very interesting subject um it's subject which has a lot of applications and there there are many Papers written about this so it's definitely worth checking out but it will give a brief introduction to it so maximum retractable value means that you attract as much value as you can from the ethereum network so how this is done is we'll start by looking at how transactions come into the blood as we talked about before users submit their transactions and they're included in the mempool at first in which all block Builders Searchers search for people extract mov can can look and they try to maximize their own payoff um so for example if you submit a transaction to the mempool trading uh token a for token B and it's a very large trade the price of this pair is going to switch so as someone searching through the mempool you could think that um this this is going to happen you know it's going to happen so in that case I'll bid um place in transaction just before this in the blood so that's um I I can buy token B before it increases in price meaning that I have an Arbitrage a risk-free profit and this is what happens a lot and why this is possible is because um the ordering in a block is not fixed it's not the case that if you submit your transaction it's included in the block on a Time basis anyone can can shift the order or actually build or shift the order or if someone is willing to pay for it they can shift the order as well meaning that they could extract any value from users in ethereum network so interestingly about this and this is very similar in in some sense to high efficiency trading in traditional Finance then blockchain the difference is that you can actually execute these strategies atomically meaning that if you have one transaction in in the mempool that you would like to do some Mev on you can include your transactions only if they're profitable so in this case there's really no way to lose money so this cell sounds very bad users are being value attracted uh it makes execution worse for users why wouldn't we just forbid Mev well it's not as simple Mev is quite powerful for us so we'll have a look at why some people think mov is good and why I mean some people think MVP is bad so on the one hand people argue that Mev is bad because Searchers searches find almost all transactions in the in the mempool that they can do Mev on and they make sure that your execution is as bad as possible which is of course not something that you like um also interestingly Mev incentivizes centralization this is uh again if we walk back to the comparison with high frequency trading in traditional Finance you should Judiciary corporations with multi-billion dollar budgets they have very big infrastructure operations and some similar arguments can be made for Mev um you need you need to stand the mental there are multiple strategies that require High Investments meaning that there is autonomous skill and which is centralizing for us which of course not something which you want and it's actually been quoted as one of the threats to ethereum and searches waste blood space this is what we saw before uh in the priority gas auctions um where transactions that are reverted or do nothing are included um pushing up Dash prices and Mev searches are generally very smart so they could put their time and efforts into building other great projects that contribute to the ecosystem um but some people argue that this is very bad on the other hand there's an argument to make be made that Mev is good or maybe distributes a nuanced Mev might not be extremely good but it's worth extracting or the way to deal with me is not to just ignore it um there's an argument that some searches provide very valuable um very valuable um services to the the network for example if there are two liquidity pools and in the one pool um certain A and B are trading for um well you can get five token B for one token a and then the other pool you can attend token B for one token a this is of course a mismatch and Searchers and they can do an Arbitrage transaction here making the prices again equal so that's um users in general have better execution if they trade in one of these pools randomly um also liquidations for Lending platforms if there's bad debts Searchers liquidate and the the people that lend out the money are protected and these are generally recognized as quite good um parts of MEP uh Mev can be redistributed so this is an interesting line of research where um the idea is that you extract all the Mev but then the Mev is redistributed to users for example as a user if you submit a large transaction that's going to shift prices you could make an agreements with someone that's going to extract from you let's say they make one even profit by attracting from you you could get an agreement saying that okay you have to pay me back at least 90 or something of this extraction and then then it's fine so in this case Mev wouldn't be as tortic as it would be normally and another big argument is that Mev needs to be attractive to ensure political safety there are quite some proposals to ensure personal safety by other means um but the extraction and redistribution seems like an argument which is very holistic meaning that users are don't fall through the trash and there are no incentives to be very critical or not okay so it's very difficult to say where the Mev is actually very good or if it's particularly really bad it's easy to say that Mev cannot be ignored why it's not why it's not really settled is because there are lots of nuances as well for example some backgrounds that we talked about before that made sure that prices in liquidity pools are equal are seen as bad for example if you have lots of transactions trading e for bitter and a Bitcoin for if and the other way around you can first align all of the transactions trading e for Bitcoin and then back run by base basically first having all the users pay up the price and then taking free Arbitrage profits which would be seen as a bad background and so a notable Mev can be detected and also I mean if you can be easily classified into good or bad meaning that's not that easy to say that we should do particular things with it however there are things to be done so some responsibility lawyers with app developers and you could design your dabs with for example mechanism design and Game Theory in mind such that your users aren't extracted from too much um this is something that's very important and there's an increasing line of research and um we can't say that all of the responsibility lies with that developers because um some Mev cannot be mitigated by only one dab it's a contribution of multiple factors multiple transactions that may be unrelated meaning that there's also a role for the protocol um to make sure that users aren't extracted too much from and I will be joining bits into ongoing research that we do at the EF at the robust and centers group so I would also like to invite point of bay for this um and if you have any questions do let us know otherwise we'll be happy to talk about what we do we do basically crypto economic research on the foundation of the assumptions that we talked about earlier um so are there any questions about what we've talked about up till now I think maybe it's it's also irrespective of um shutting in some sense so there are for example uh close the main Mev opportunities that don't simply disappear because of charting um so no I don't think it would disappear I guess it could be mitigated somehow if most of the user transactions move to like Roll-Ups and Roll-Ups are the ones who use the data sharding facilities that we're now building at protocol level in that case most of the Mev may be accumulates at Proto at the roll up level and you might not see so much of it at the base layer of ethereum but yeah as Julian said because Roll-Ups don't just live in their single world for instance you have designs for pulled liquidity where different Roll-Ups could use the same liquidity that resides at the base layer or at some settlement layer you could see that some of the Mev sort of percolates down to where the liquidity is so many people I think are trying to build models including us so role of Economics is something that we're trying to think about to to see how the value flows from the users to the protocols to protocols which are on top of ethereum and Mev is a part of it yeah so maybe I'll explain what the standard status in general um so um if there's a is there a transaction moving prices you can put your transaction in front and the transaction at the batch so back running um and processing at both sides and in this case you have a transaction in between two of your transactions which makes it a sandwich which is seen in general I think has a tortured form of Mev um yeah also in traditional Finance it's a difficult argument I think it's not as Nuance that um or Market making is in yeah it's it's not um as atomic Arbitrage as it's here like you have a 100 chance of making money and if it's not profitable you simply let your transactionals execute um but then there are quite some parallels we made between Mev and high frequency trading and traditional Finance yeah traditional Finance when you see high frequency trading a lot of value goes to I don't know putting your computer next to the New York Stock Exchange or billions of dollars to shave of nanoseconds to to your strategies this is economic value that just leaves the market and goes towards people who build all this infrastructure maybe one of the opportunities that we have with a protocol with respect to Mev is if it can be captured and if it can be captured efficiently but this value could serve to strengthen protocol security rather than hamper it so of course it doesn't mean that yeah let's get user sandwich because that gives us more value for protocol safety I think of course like we should design dabs such that these bad outcomes don't happen so for sandwiches specifically there's many different proposals that I would say realize different trade-offs that users might have so just mentioning some over the top of my head one is encryption so your transaction could go encrypted be committed to and then executed so people can spend with you because you don't know what happens the trade of here of course is that the execution latency is a bit higher but maybe as a user you're fine with this another ID is receive time ordering consensus so there's this idea that you know with transaction a is seen by most of the network before transaction B then transaction a should be included in the block before transaction B it's in theory I think a property that is really nice but again because we're in a decentralized system there's no one that reports oh I've seen a before B so a must be before B and again you can have these games of collocation so again trade-offs here as well another thing that I would say is a relatively new idea is the idea of offering your order flow so getting paid for your transaction saying well if my transaction is so valuable to you you should pay for it that's what Julian also introduced earlier I hope that we'll see more protocols in that direction because these are the ones in my opinion that make the users whole and also allow the protocol to to capture some of that Mev I I don't want to comment on flashbulbs specifically because I'm not working for flashbots but I would say flashbots other people in this ecosystem are trying to understand Mev from first principle where it comes from the view of course is to to use it as a Force for good so trying to ensure that it doesn't destabilize a protocol that it doesn't hurt the users um yeah so part of that comes from mitigating it if it's bad part of it comes from containing it and maybe capturing it if it's good yeah I would say these are broad Strokes of the ecosystem but yeah yeah sure um so multi-dimensional gas fees is very different from Mev uh it's not related it means that and now we pay cash for any kind of operation that you do whether you store something on the blockchain or whether you do um just simple operations right multiplying um we all tram this costs of computation tools of storage into one unit which we call Dash but we could split this up into multiple units and so that you pay for pay more directly for what you use so if you're if you're trying to store things you pay for that you store and you don't congest blockchain with um so in this case the dash limit is set so that's um people aren't their computers aren't overwhelmed but for example if you have a lot of transactions only using one particular thing like if there are only transactions using storage there's a lot of operations that could still be executed by people and so in this case multi-dimensional Dash would mean that um these computers are used more efficiently basically and the more a transaction could be executed yeah adding to this if you've heard about prolapse so the idea of Roll-Ups is where chains that exist outside of the ethereum base layer These Chains to secure themselves with ethereum they have to post data to the ethereum base layer basically the kind of summary of what happened on the Chain so this data is not executed so it doesn't add execution to or execution cost to the base layer but it needs to be made available and stones for instance these are two separate types of resources probably if you've heard of eap4844 the idea of providing a much greater data capacity at the ethereum base layer is separating the market between the ethereum execution and the market for data that Roll-Ups are posting in that case you would have something like two base fees or you would have the way to differentiate between two markets okay so what we are personally working on is for example I mean the multi-dimensional tasks proposal Separation by David thought about and I've already based upon block space derivatives so ensuring that people can hedge against gas fees rising in the future um yeah if you'd like to talk about that please find us yeah and I would say crypto economics is relatively new as a field uh there's a lot of people who don't have traditional economics background or even Computer Science Background who get interested in it so yeah the directory entry feels a little lower mostly because there's a lot of resources now that are available if you go into the Defcon video archive there's lots of talks on crypto economics that are interesting and yeah if you find if you think it's fun I think both Julian and me would be also happy to answer questions offline talking about resources we compile the list and so in the table there are some collectives or groups that's published research research on crypto economics and in the bottom there are some links to some personal uh blogs from people during part of bay about some crypto economic research the slide should also be made available later um yeah so that was it that was it uh we ended a bit early so if anyone has any questions please feel free but thank you very much very much for attending and you can always also ask your questions later if you'd like thank you I want to give special thanks to Julian because he didn't know he was going to do his talk three days ago and I think he did a really wonderful job so if you can upload him again
