start	end	text
0	9980	Okay, everyone, welcome back to the Monero village. We are starting our next talk with Francisco Cabañas from the Monero core team. He goes by ArcticMine.
9980	19800	He'll be talking about the block reward in Monero and what happens in a few years. So please, let's quiet down in the back and let's give our attention to Francisco. Thanks.
19800	48510	But also how it relates to a lot of the other coins. And I'm talking specifically about Bitcoin-like coins and also coins such as other crypto coins.
48530	53030	And what happens when this thing goes to zero and what are the risks?
54470	61410	So this is kind of an overview. I will do a review of fee and block weight scaling in Monero now.
61410	67210	This is quite unique to Monero and it's very different from what people are used to.
67210	71910	For example, you're used to fees in Bitcoin and it's also quite subtle.
73510	80130	And for this reason, I will spend some time in it and how it relates to the penalty, etc.
80410	88370	My next topic will be the rational miner. What is a rational miner in Monero and how does a fee market in Monero actually work?
88370	92210	What if the block reward goes to zero?
92890	100230	I mean, this is a very interesting question overall and also what kind of limits do we have?
102270	111830	Implications for Monero, Monero-like adapter block weights and also implications for Bitcoin and Bitcoin-like small and large block weights and the Satoshi fee market.
113390	120070	So this is an overview of fees and scaling review in Monero.
120510	130630	There are some significant changes from the last time I spoke on this here at DEF CON in 2018.
130630	137530	There has been some changes, so I'm going to cover those for the sake of completeness and understanding how this process works.
138770	145390	Monero uses what's called a crypto note. It used to be the crypto note, now I'm going to refer to it as the Monero penalty.
146050	153430	And what essentially the Monero penalty does is it actually takes the...
154310	156950	Let me see if I can show you this here.
156950	168710	It takes the base reward and it penalizes essentially the percentage increase in the block size over the median squared.
168710	183270	So when you mine a block that is larger than the medium over the last 100 blocks, you will pay a penalty, essentially forfeiting part of your block reward if you're a miner.
183270	192070	And this is the driving force for how fees work in Monero. This is the driving force for how scaling works in Monero.
192770	200310	Now a couple of the changes is the median is actually capped temporarily, so there's actually two medians.
200310	204170	One is over 100 blocks and one is over 100,000 blocks.
204450	211010	And this is primarily to ensure that certain types of attacks cannot work in Monero.
211010	217250	Those changes were put in place this year in the last hard fork, so it's actually very recent.
218070	223070	And this is where I will spend a bit more time covering this, because it has been some changes.
225930	230210	So what do we have here? We've got the base reward, which is basically your block reward.
230650	237210	And then we have the reward that's paid to the miner, and essentially what you're doing is you're taking out this penalty.
238010	246150	And then you say maximum allowed total block weight is twice, and essentially when you give up the entire block reward.
246150	261110	So what happens is if you make MB, which is the... MB is twice MN, then you basically end up with ONU equals zero.
261110	265910	And you've given up your entire block reward as a penalty.
265910	270970	And what you've done if you mined a block that's twice the size of the median.
271830	282570	The penalties only apply when you mine a larger block, and you do not get a rebate for mining a smaller block.
282570	284210	This is very important.
284210	299590	And so the change that was introduced this year, in the spring of this year, was that we're capping the median as 50 times the long-term median, which is 100,000 blocks.
301490	309330	And then it has to scale at a much lower rate in order to prevent sort of out-of-control, out-of-bounds scaling.
309330	320950	So for simplicity, I will define B as this ratio, which is essentially a percentage increase in the block that you mine.
320950	330710	And the penalty becomes RB times B squared, so basically the square of B times R is your penalty.
330950	334390	And you can think of it as the percentage increase in the block weight.
335470	341010	Okay, so now we have what happens when we add a transaction.
341130	349630	So let's say that we already have a series of transactions, and we add an additional transaction, and we're somewhere in the penalty.
350770	356110	And we look at what is the incremental penalty from adding that transaction.
356270	363450	Well, it's a fairly straightforward quadratic equation, you just expand it out, and what you get is 2BBT.
363450	372130	You know, B is the increased block size percentage before adding the transaction, BT is the transaction size.
373170	378610	So that is the key parameter that a miner has to deal with when she's looking at adding a transaction.
378610	381950	Okay, if I'm going to add this transaction, how much is it going to cost me?
382070	387550	And then the question becomes, how much fee do I get from the transaction in return?
388330	392930	And that is the essence of what a miner has to deal with in this situation.
393850	396430	So there's a couple of things that are done.
396570	401850	One of them actually is that we have to define certain fee structures.
401850	407650	And one of them is that we have to look at, okay, do we have enough space in the fees?
407650	418230	So if you take a typical transaction at the minimum block weight of 300,000 bytes, can we actually scale it?
418230	423490	So is there enough there in fees for a miner to actually be able to add this transaction on?
423810	428610	And that effectively is what sets the normal fee in Monero.
429390	435370	Now, going back a minute to Reha's talk, this is a question of sort of, why don't you just take a higher fee?
435370	436810	And the answer is people don't.
436810	442070	And in fact, at one point in the past, people weren't doing that, and the blocks were just getting stuck.
442070	449190	Because nobody was clicking on an interface and simply adding the next level fee that would have solved the problem.
449930	454570	So this is part of the simplicity of design from the backend element.
454570	457950	So this is why we have to set the normal fee at this point.
458190	463090	Essentially, we're sending at the optimal level to add one transaction just at the penalty.
464330	467410	Okay, so and then there's a low fee and high fee that are set.
467410	474670	The key difference also from last year is that we're basing the fees now on the long-term medium as opposed to the short-term medium.
476630	480110	So basically, here's the interest in the highest fee per byte.
480110	485310	The maximum, if you max the whole thing out, is actually twice the entire reward.
486690	490010	And then, so it's very high for B2 or twice our beta or ML.
490050	493210	And then you get all the other fees that we pay.
494690	499110	Okay, so the changes were the introduction of the long-term medium,
499110	503130	capping the growth of the short-term medium at 50 times X.
503130	508190	The long-term medium only grows at 1.4 times, so it's restricted.
508190	510530	It's equivalent to keeping it restricted.
510590	517710	Effectively, it controls the rate of growth of the block size over time to prevent certain types of attacks.
518370	519690	So this is kind of my review.
519690	526370	The implication is basically that we are limiting this to prevent attacks.
526510	528910	So now we're taking a close look at the rational miner.
529350	530790	So what is a rational miner?
530790	538030	The rational miner is neither altruistic nor malicious and acts in her enlightened self-interest.
538570	544570	She's also dealing with rational users who wish to pay the lowest fee to get their transactions mined.
544570	547890	This is the basic dynamic of a fee market in Monero.
547890	553290	You have the miner, you have the users, and you have the penalty.
554290	561350	And essentially, the users are competing against the penalty in order to get their transactions mined.
562570	564710	So the problem, you're the rational miner.
564710	568770	The problem is, given a finite number, I've got all these transactions in the transaction pool.
568790	570890	I have a distribution of weights and fees.
570890	577690	What is the optimal set of transactions in a block in order to maximize the return to the miner?
577690	583950	And this is essentially what's called a discrete optimization problem.
584030	586370	You can actually solve it exactly.
587070	591810	But there's also a relatively simple approximation that is pretty close to where you want to be,
591810	594070	but not 100%, which I'm going to go over.
594070	596410	It kind of explains it a lot more efficiently.
598070	599490	So you make an approximation.
599490	604430	And the approximation that we make is that the transactions are small compared to the block size.
605250	608370	So you order the transactions in fee per byte.
610130	613990	You add them to the block starting with the highest transaction first.
614450	618970	And the idea there is you take the highest paying transactions and you give them priority,
618970	620730	the most profitable one.
620730	623430	Then you test each transaction for profit.
623890	626590	And then you test once you get into the penalty.
626830	627970	Then you look at it.
627970	629850	Okay, I add an extra transaction.
630570	632610	Do I get a fee?
632610	635010	Does it attract more penalty than that fee?
635010	638170	If the answer is yes, then you stop.
638410	641310	If the answer is no, then you keep adding transactions.
641310	645530	And of course, if you run out of transactions with or without penalty, then that's fine also.
645910	650470	So what a rational miner does is takes the best highest paying transactions, gives them priority,
650470	656170	and then works her way right up until they get a point where it's no longer profitable to add more transactions.
657810	666310	So basically, the penalty level is determined by the lowest paying fee transaction.
666310	668010	And this is a critical point.
669210	673090	All the transactions that are below are actually paying a higher fee per byte.
673190	675550	Because the miner's already given priority.
676270	682510	So this effectively creates, every time the penalty is triggered, a profit for the miner.
682510	687150	The miner makes a profit on the transactions because they need to get ahead of the penalty.
687150	690150	So they have to pay this so that the miner will include them.
690210	693510	But the miner gives priority to the highest paying transaction.
695030	699510	So the rational user is basically going to figure out where in the penalty do I want to be.
700970	705710	And then ask the question, okay, this is how much I'm willing to pay.
706210	709890	And this is how much I'm willing to push the penalty to get my transaction mined.
710930	714370	That's the decision the rational user does.
714370	717190	And then it offers that penalty as a fee.
719250	722710	Now, here's a key element of all this.
722730	728170	The total fees that are collected are proportional to the block reward.
728170	736470	Because what's driving it is the penalty, which is a portion of the block reward.
736470	742370	That is what's constraining the size and growth of the block size.
742690	745550	So here's the interesting fun part.
745550	749950	What happens when the block reward goes to zero?
750310	752870	And the answer is really quite simple.
752870	755650	So do the fees.
758280	760320	Because the penalty is zero.
760780	768080	So now if you drive the block reward to zero, you get no fees.
769180	771940	And how do you incentivize the miner?
772740	774980	Okay, we may have a problem here.
775000	776880	Essentially there are two scenarios.
776940	780540	One of them is that the miners try to form a cartel to protect themselves.
781140	784560	And they go ahead and they try to protect fees.
784560	789720	Cartels have historically been found to fail because people cheat.
791460	793960	And so that is not a particularly stable.
793960	797440	The more likely overall scenario is simply the whole thing collapses.
797440	799320	The base goes to zero.
799320	800880	The total fees goes to zero.
800880	805120	You have a tragedy of the commons because of competition among miners.
806280	808840	And here's a really interesting part.
808840	811300	You have no incentive to secure the network.
814210	818950	And that's scary because you have no security. None.
821070	824230	Okay, so how does Monero deal with this?
824230	829130	Well, what Monero actually does is it sidesteps the whole thing.
829870	832750	It simply says, we're not going to allow the block reward to go to zero.
835010	837170	And then that makes it...
837170	839770	Actually, the point of this talk is not a particularly interesting point.
839770	842910	Because actually Monero solved the problem by simply sidestepping it.
843430	848130	And this is why it's so critical to have this minimum tail emission of block reward.
849110	852190	Because without it, you will not have the scaling in Monero.
852190	857630	And in fact, as I will discuss later, we have serious problems with some of the other scaling ideas that have been put in place.
858530	863510	So I'm going to deal first with one coin which is a bit interesting in the history of Monero.
863510	864430	And that's Bitcoin.
864990	870270	People might have known Bitcoin as a heavily pre-mined scam.
870630	874790	Because over 83% was either a pre-mine or an instamine.
874790	877730	It was launched just about the same time, just before Monero.
878010	880710	And actually, Monero was forked from Bitcoin.
881590	883930	And it was a crypto no reference.
884070	888710	One of the key differences that Bitcoin did that Monero didn't have,
889270	892470	is that Bitcoin doesn't have a tail emission.
892770	897030	It followed the Bitcoin model of allowing it to smoothly go to zero.
897910	901910	And because it tried to set up this pre-mine, ninja mine thing,
901910	906630	and make it look like a ninja mine over two years, so it was 2012 to 2014,
906630	913150	and they wanted 83%, so they had to decay the total block by 83% in two years.
913150	917930	You have this really, really fast-falling reward curve,
917930	922390	which makes it the perfect canary in the gold mine to look at this problem of fees.
922770	925330	And so you look at it, and you say,
925330	933570	okay, the block reward went to about 808 BCN.
933570	936970	Now, if you actually look at the code,
936970	940710	there's a 10,000 factor between Bitcoin and Monero,
940710	945210	which is sort of rough comparable to 0.08 XMR per block.
945350	948350	So that's roughly the comparison.
949010	955930	And this, then, is about 12% of Monero's tail emission.
955930	959450	They still have a falling block reward, because there's a really fast block reward.
959450	961890	They panic, they had to do something,
961890	963470	otherwise they're going to become insecure.
963470	968870	So they said, okay, fine, let's have the miners vote on the medium,
968870	972950	effectively trying to set up what is going to look like a miner cartel.
973050	977130	A little more interesting history in Bitcoin is that there was an ASIC,
977330	980050	a bunch of ASICs that were mining Monero, that were forked off the network,
982750	987410	last year, actually, and these ASICs ended up in Bitcoin,
987410	989250	under primarily the control of Bitme.
989250	993890	So, essentially, what we have is a miner cartel in Bitcoin,
993890	998350	and then what we're likely going to have is,
998350	999950	sooner or later, the ASICs are going to run out,
999950	1001890	the block reward is still going down fast to zero,
1001890	1005130	there are hardly any transactions, and nobody's going to bother building new ones,
1005130	1007610	and the thing might just go into tragedy or the commons.
1009550	1011510	So now we're talking about the big boys.
1012170	1012870	Bitcoin.
1012870	1019790	Now, Bitcoin originally introduced the one megabyte block size in 2010.
1020050	1024150	And this is one criticism that I do have of the Satoshi paper.
1024270	1027950	It says, incentive can also be funded with transaction fees.
1027950	1031770	Fine. If the original value of a transaction is less than the input value,
1031770	1035710	the difference is a transaction fee that is added to the incentive of the block
1035710	1037110	containing the transaction.
1037490	1041210	Once a predetermined number of coins has entered circulation,
1041210	1046190	the incentive can transition entirely to transaction fees
1046190	1047990	and be completely inflation-free.
1047990	1052470	This is a straight quote from Satoshi, Nakamoto, Bitcoin, etc.
1052470	1054890	My opinion on this is very simple.
1054890	1059830	The fact that you include a statement in what is otherwise a work of genius
1059830	1063830	does not make the statement true.
1063870	1068870	There is no justification whatsoever for this statement,
1068870	1071770	no theory, no references.
1071770	1075310	What is the game theory? How is this supposed to work?
1075630	1076550	None.
1076550	1083490	What happened is, about 20 months later, 2010,
1083490	1087450	the one megabyte block size was introduced in a hard fork in Bitcoin.
1087850	1089430	That's what actually happened.
1089430	1091330	And it was actually introduced by Satoshi.
1092590	1096970	And then the birth of a block size debate in Bitcoin started.
1097450	1098790	Very interesting.
1100710	1102370	So, what has happened?
1102370	1106050	Well, you have this maximum number of this limitation.
1107210	1110890	And one of the interesting results from Monero is,
1110890	1113670	well, okay, so if we're going to have the Satoshi fee market,
1113670	1117490	whatever penalty we're going to have, whatever price to increase the block size,
1117490	1119110	it better be stiffer than what Monero has,
1119110	1121670	because we've already shown that Monero goes to zero,
1121670	1124470	so without a block reward, so we need something that's harder.
1124470	1125990	We need something that's stiffer.
1126610	1129330	And, well, what better than just a fixed block size,
1129330	1131370	which is essentially what Bitcoin has done.
1131410	1135610	But this, of course, creates a problem that you can't scale the coin.
1136170	1140610	And Bitcoin essentially failed as a transactional currency, mostly failed.
1140650	1142170	I mean, you can still use it for large amounts.
1142170	1143790	It's still cost effective to do that.
1143830	1147370	In fact, I've done it, and I do it regularly, on a very regular basis.
1147370	1150770	But it is not particularly effective for small transactions,
1150770	1151890	because the fees are too high.
1152410	1154790	And so it's been transitioned as a store of value,
1154790	1155790	which has been a major...
1156510	1159470	I mean, I consider that a major success of the Bitcoin community,
1159470	1161450	because they managed to save the value of Bitcoin.
1162070	1164650	So there's great response in that regard.
1165830	1169570	But basically, because of this security issue,
1169570	1172230	the only prudent response from Bitcoin Coaching
1172230	1176090	is basically to leave the one megabyte thing in place,
1176090	1180090	at least until you can show that you can actually generate the Satoshi fee market.
1181070	1183990	Having said that, there are still potential attacks,
1184790	1186970	which I consider is what happens on Christmas Day.
1186970	1190050	On Christmas Day, you have all the high shopping,
1190050	1193490	and all of a sudden, nobody's shopping, nobody's transacting,
1193490	1194970	nothing's happening in the network.
1194970	1197510	So if you have a fee-based solution,
1197510	1200770	if you want to attack the coin, then that is when I want to do it.
1201110	1204950	So I looked at, if you're going to attack a coin that's just based on fees,
1204950	1206690	the day to do it is Christmas Day.
1207010	1208430	So you get to play Scrooge.
1208810	1210830	So I call it the Scrooge attack.
1211730	1213230	So that's interesting in Bitcoin.
1213230	1215010	Now, if you look at Bitcoin SV,
1215010	1217030	they just took off the limits entirely.
1217030	1220150	So now what they did is, they have an effectively infinite site.
1220710	1223010	But wait a minute, you have an infinite block size.
1223550	1225410	How are we restricting this?
1225410	1226250	Nothing.
1227010	1231030	And then they go and say, well, okay, there's no limit on the size.
1231030	1234570	Well, he has to question how this fee market is going to develop.
1235090	1239550	I did a rough estimate, and it'd be roughly about
1240550	1246190	8.8% of the block reward in 2043,
1246190	1254170	which is basically the 200th anniversary of Charles Dick and the Christmas Carol.
1254170	1256950	It was published in 1843.
1256950	1259770	And we're not talking 2143.
1259850	1264070	So we're talking something within our lifetime.
1264650	1267490	And they're already very, very low.
1267490	1270190	So that begs the question, how?
1271570	1277690	And what you end up getting is there's a lot of questions and very few answers.
1277690	1279030	And some people might say minimum fees.
1279030	1281690	And I should backtrack on that in one of the previous slides.
1281950	1286790	Minimum fees do not prevent the miners from giving out-of-bound rebates.
1287830	1289550	So that's not a solution.
1289930	1294490	Because the miner can basically say, okay, I'm going to rebate you back
1294490	1296930	if you submit the transaction directly to my site.
1297490	1298430	That's not really the answer.
1298430	1302390	So what you end up with is lots of questions and very few answers.
1303710	1310170	So my conclusion, the Monero tail emission is absolutely vital.
1311810	1313930	It actually makes Monero work.
1314850	1319490	And it may be very close to optimal because of the amount versus the fact that it's less than the
1321570	1323970	inflation rate of gold, which is considered hard money.
1323970	1326350	So you have the hard money argument sort of handled.
1327490	1330210	The Satoshi fee market is totally unproven.
1330410	1331730	It may not even work at all.
1331730	1332650	We don't know.
1332890	1337850	I mean, the best chance is in Bitcoin, if they manage by keeping the block size small,
1337850	1339210	that they may be able to make it work.
1339210	1340190	We don't know the answer.
1340190	1341830	There's no evidence for this.
1341830	1345110	There's a lot of evidence for a cryptocurrency working with a block reward.
1345110	1347230	We have 10 years of evidence in Bitcoin for that.
1347530	1350330	But we don't have evidence for the Satoshi fee market.
1351090	1353570	And basically what you get, if you have maximum number of coins
1353570	1357630	and hard block rewards, you've got more questions than real answers.
1358530	1362910	So at this point in time, I'm ready to take some questions,
1362910	1365050	if anybody has questions or discussion.
1371860	1373320	Any questions?
1375040	1376080	Yes.
1382390	1386850	Well, I mean, the price that you pay is that you have a linear inflation,
1386850	1391390	which is less than the historical inflation rate of gold.
1392650	1394130	And that's the argument.
1394130	1395350	That's a hard money argument.
1395350	1398270	I mean, that is what scares people,
1398270	1400830	because a lot of people love the idea of the finite number of coins.
1400830	1401890	It's very saleable.
1402870	1406430	But what you end up with is you're still harder than gold.
1406430	1409310	And if you're going to go for the gold standard of hard money or Austrian money,
1409310	1411230	which is essentially what we're trying to say here,
1411230	1414510	the implication is, well, if you can beat gold, you're OK.
1415350	1419370	The other thing is, because it's linear and it's not exponential,
1419370	1424210	you actually might get a situation where you get a stability between
1424210	1428610	the total number of coins, lost coins, and the inflation rate.
1428610	1432090	So what you end up actually, very likely, is some kind of equilibrium
1432090	1435550	between price, lost coins, and the inflation rate.
1435550	1438330	You'll actually end up with exactly a flat amount of coins.
1438470	1444770	But you still have that bound by the inflation rate of gold.
1444770	1447550	So as long as you're ahead of gold, you're harder money than gold,
1447550	1448130	then you're OK.
1449910	1452730	This is kind of the argument that one can make.
1455400	1457140	Any more questions?
1459240	1460340	Yes?
1464060	1464960	Yes.
1467700	1473940	Well, unless you have a penalty or a cost of increasing the block size
1473940	1476420	that is stiffer than Monero.
1476880	1479660	Because if you show in Monero that this is what happened,
1479660	1483480	you need a stiffer penalty, a stiffer cost of increasing the block size
1483480	1485160	for the fees to go to zero.
1485260	1487080	So, for example, if Bitcoin Core is done,
1487080	1489560	it says, well, we're going to keep the block size at one megabyte.
1490020	1492560	Well, that is definitely an infinite penalty.
1493060	1494740	So it could work there.
1494820	1497000	But then you get someone like, say, Bitcoin Satoshi Vision,
1497000	1498640	we're going to let this thing grow to infinity.
1498640	1501280	They just mined a 210 megabyte block.
1502260	1505120	Well, that is way weaker than what Monero has.
1505460	1506900	So you have a bound.
1506900	1510640	You have a bound saying, if it's stronger,
1510640	1514040	if the penalty is weaker than what's in Monero,
1514480	1516220	then the fees are going to go to zero.
1517660	1519880	That's essentially the thesis.
1519880	1523680	There is nothing to restrain that block size.
1523680	1525700	There is nothing to create scarcity.
1526920	1529420	So either you go back to the Bitcoin scenario,
1529420	1531820	either you have a mining cartel,
1531820	1533600	or you get a tragedy in the commons,
1533600	1535840	or what could probably happen, you first get a mining cartel,
1535840	1537580	and then you get a tragedy in the commons.
1540690	1541990	Any more questions?
1547420	1549580	Many more questions.
1550000	1551900	Still got about two minutes left.
1559460	1561820	Okay, well, thank you.
