Latest / TFTC: A Bitcoin Podcast / The Difficulty Adjustment (and Target) | Pierre Rochard, Center of Hash E006
Transcript
- 0:00all right pierre thanks for doing this on short notice of course always happy to come chat feel
- 0:10like um as i was telling you before that feels like a hold my beer type episode but i'm also
- 0:16really excited for it we're going to talk about the difficulty target yep and the difficulty
- 0:21adjustment what it is its significance to the network and how it works and we're going to
- 0:28describe it like we're five so that everybody can understand um before we get into that though
- 0:33if you could share in your words how you think about the function of mining and the mining
- 0:44function relative to other network nodes that are non-mining yeah great question so um i think that
- 0:51the mining function is really dual purpose. So there's two functions to it. And I think that
- 0:58sometimes they get conflated a little bit. So first of all, the biggest from an economic perspective
- 1:05is about issuing new Bitcoin onto the ledger. So there's this issuance schedule with the halvings
- 1:13that looks at what block height are we at? And so how much new Bitcoin are we creating every 10
- 1:19minutes. Now, I use these words loosely. I know that our friend Phil would say that they're
- 1:24incorrect words because the issuance schedule was set on day zero back at end of 2008, beginning of
- 1:332009, whenever Satoshi coded it. He released it in January 2009. The issuance schedule hasn't
- 1:39changed since then. And so really from an accounting perspective, you could think of it as
- 1:44a transfer from this retaining pond,
- 1:51this set of 21 million Bitcoin
- 1:54onto spendable UTXOs.
- 1:59Yeah, so Phil has this idea that,
- 2:01and we recorded with Phil two episodes ago,
- 2:04this is episode six,
- 2:05he recorded episode four,
- 2:07that all 21 million Bitcoin already exists.
- 2:12I personally, it's like, I agree with that,
- 2:14But I also think it's easier to conceptualize that the Bitcoin are being issued like the term that you used or that they're entering circulation, however you want to describe it.
- 2:24I think entering circulation should be compatible with Phil's view.
- 2:28Yeah. Because so now the other part of it, too, is that the if we I think it is he's making a very important point, because when you hold one Bitcoin, you hold a maximum of one out of 21 million.
- 2:44So you own a fixed percentage of the supply and can't get diluted out of that.
- 2:48And so when people say they talk about like Bitcoin inflation, like I don't think that's the correct term to use.
- 2:55in fact, I would argue Bitcoin is neither inflationary nor deflationary. It just has a
- 3:00fixed supply of 21 million. And so then, you know, if we think about deflation more loosely of,
- 3:09okay, putting aside the monetary policy, what happens in practice? Yeah, some people lose
- 3:14Bitcoin. And so there's, you know, deflation in that sense, but that's unverifiable. We don't know
- 3:21how much Bitcoin has been lost exactly. There's heuristics of estimating that. But in any case,
- 3:26that's the first function of Bitcoin mining is, and doing it in a way that is competitive.
- 3:32Because if we look at the history of monetary economics, even if we look at gold, the way gold
- 3:38enters into circulation, historically, has generally been through a minting process. And so
- 3:43you take raw metal, and you put it through this minting function, and then it comes out as
- 3:50spendable coins. And that historically, what rulers do, what states and sovereigns do is they
- 3:57want to monopolize that. And so they take over the mints. And they decide when to mint. Yeah.
- 4:03And how much to mint. And whose face to put on it. Yeah. And yeah, how much and what the
- 4:08percentages should be of the coinage. And, you know, that's where we get into currency debasement.
- 4:13So it's really important to have, if we're going to have a decentralized system for the issuance
- 4:20of the asset to also be decentralized.
- 4:23And the only way to have that in practice
- 4:26would be to have it be competitive.
- 4:28You could also look at more modern alternatives,
- 4:30like, for example, what Ethereum did with their pre-sale.
- 4:33Competitive in the sense that anybody can participate.
- 4:36Correct, yeah, permissionless.
- 4:37Yeah.
- 4:38Not that everybody is participating,
- 4:41which would be more of an egalitarian spin on it,
- 4:43but really it's about equality of opportunity
- 4:45that from day zero,
- 4:48all the Bitcoin that have entered into the UTXO set
- 4:52have done it through a process
- 4:53that anyone could have participated in.
- 4:56And entering into the UTXO set
- 4:59also for more common parlance,
- 5:01entering into the circulating supply.
- 5:03Yeah.
- 5:04Yeah.
- 5:05And then beyond the issuance,
- 5:10go forward, say like when all 21 million Bitcoin
- 5:13are in circulation,
- 5:14what function are miners providing in that world but they're doing it today as well but then how
- 5:20does that also distinguish say from how a non-mining node secures to help secure the network
- 5:26so uh yeah to your point we don't really have to go i don't think that we have to go far in the
- 5:31future to to see this function because this has also been around since day zero which is about
- 5:35essentially providing a sequence function for transactions, meaning that how do we figure out
- 5:46if somebody tries to spend the same Bitcoin twice, which one is valid and which one is invalid?
- 5:52And so if you look at the today's banking system and you go and try to spend the same dollars twice,
- 5:59they will decline the second charge based on a clock that they have in their system.
- 6:05And so the bank is the one that's ordering the transactions to figure out, okay, which one are we going to decline and void?
- 6:13So obviously we can't do that in a decentralized system.
- 6:17So what the mining function is, is akin to a decentralized clock that is ticking every 10 minutes and creating batches of transactions such that if a transaction already spent an output in the past, going forward, if somebody tries to spend that same output, it would be marked as invalid.
- 6:39And that transaction would fail to be included in a block and fail to be broadcast out to the network.
- 6:47functionally, how do we coordinate all the activity that might be happening in the network
- 6:52at any point in time when people don't know each other and they're in different corners of the world
- 6:57but need to know which transactions happen first?
- 7:00Exactly right.
- 7:01And then within there, how do you think about the mining function specifically to final settlement?
- 7:09Because I think that they're related.
- 7:10Yeah, they are.
- 7:11So the way that miners get paid for including a transaction is through the transaction fee.
- 7:18So if you're sending Bitcoin, you have to send a little bit less than you are unlocking.
- 7:26And that little residual difference goes to whichever miner includes it in a block.
- 7:33And so the transaction fees are really the sum of all from all of the transactions included in a block get added to that new issuance, which if you go into the source code, it's called the subsidy.
- 7:47I don't like that terminology.
- 7:48I think that's one of the worst words Satoshi picked up, but because that has all sorts of connotations in economics.
- 7:56What would have been a better word?
- 7:56um you know i would have put new issuance or uh um yeah you know then then we could get to into
- 8:06maybe phil would have better uh terminology for not significant to this conversation but i'm just
- 8:10curious yeah um because uh you know subsidy implies like the government like subsidizing
- 8:15something but i do think that um if you look at the white paper the the reason why satoshi used
- 8:22that word subsidy is because in his mind, it was subsidizing people running Bitcoin nodes
- 8:30because at the time, those two functionalities of mining and operating a node were so intertwined
- 8:37that they were essentially a bundle in Satoshi's mind. And when you read the white paper,
- 8:44it seems like, you know, he is bundling those two functions together. Not completely though,
- 8:50because he does in the white paper talk about network nodes that are distinct from mining nodes.
- 8:55Already he was starting to draw a distinction between those two functionalities.
- 9:01But if we think about today, how is the software architected?
- 9:09You've got people will talk about a Bitcoin mining company that has lots of mining rings.
- 9:15And is that a miner?
- 9:17Well, in the parlance of Satoshi, it's interesting because for the most part, they don't even need to operate a Bitcoin node.
- 9:26Why? Because that mining rig is connecting to a third party mining pool and that mining pool can be operating a Bitcoin node.
- 9:38And that mining pool actually is under no obligation from a technical perspective to be operating a mining node.
- 9:44in fact if we go look at the history of bitcoin there was this thought of what was called spv
- 9:51mining where you're not running a full node and uh it was like headers first spv mining
- 9:57and the idea was to to make it so that you could um it be as efficient as possible in constructing
- 10:06your block template so that you're not having to to have the full verification um and then uh
- 10:13that got exploited uh and so how was it exploited this is something i don't i don't remember this
- 10:19or maybe it predated my time yeah um i i'd have to refer back to greg maxwell post on this because
- 10:25uh you know he's obviously og legend and in uh bitcoin history but um it to get into specifically
- 10:32how it was exploited but he was pointing out that like here's why you shouldn't do this is because of
- 10:39this happened in the past. But I think it proves an important point, which is that Bitcoin mining
- 10:47pools operate a Bitcoin node for the same practical reasons as anybody else, which is to verify that
- 10:56the history of the chain is valid and that they have valid transactions and that their reward is
- 11:04valid. And so, you know, every Bitcoin block has a transaction that is very special. It's
- 11:14called the Coinbase transaction. Brian Armstrong stole that name to, you know, benefit his company.
- 11:20But that guy actually confuses a lot of people. When you're explaining technically how Bitcoin
- 11:24works and you talk about the Coinbase transaction, they think that it's a transaction from Coinbase.
- 11:29Good name for a company, but, you know. Yeah, I still think it shows a lack of ethics.
- 11:34just clobbering the namespace.
- 11:38And that transaction is special because it doesn't have any inputs.
- 11:42So it's not unlocking any existing outputs, but it does have outputs.
- 11:48And so those outputs are, if you sum up the quantity of Bitcoin being locked up in those
- 11:55outputs, that's going to equal or be less than, which is interesting, to the sum of
- 12:02the transaction fees and the subsidy.
- 12:05It can actually be less than, and there's cases where miners have left Bitcoin on the
- 12:09table due to bugs in their software.
- 12:11And so that's where actually we're going to have less than 21 million Bitcoin because
- 12:16of that.
- 12:17Historically, some miners have accidentally not minted the correct amount of Bitcoin they
- 12:22were supposed to.
- 12:23The asymptotic top was always going to be slightly less.
- 12:26Is that correct?
- 12:27And then-
- 12:28For a number of reasons.
- 12:28And then this, what you mentioned specifically, lowers it slightly.
- 12:32Yeah.
- 12:32So one of the reasons is if you just model out the ideal issuance curve and you assume full supply, it is not 21 million. It's like 0.99999997, right below 21 million.
- 12:48Yeah. And then a lot of people, and I don't think that you agree, but I want to just ask the question. You don't think of that, what Satoshi called the subsidy as a security budget?
- 12:59or do you? Well, it depends because I've heard compelling arguments that it adds to the security
- 13:09budget and I've heard compelling arguments that it subtracts from the security budget.
- 13:13And I fall more into the latter camp. Now, when we think about security, first of all,
- 13:20that terminology is so broad because there is security of private keys, which has nothing to do
- 13:27with transaction fees and the subsidy, right?
- 13:31It has to do with, you know, what Unchained does,
- 13:33what lots of, you know, people self-custidating do
- 13:36and all this.
- 13:37So, you know, there's that.
- 13:39And then there's also the security of the network
- 13:42from DDoS, for example, from, you know, malicious actors
- 13:47where really the role of Bitcoin nodes is very important
- 13:52and the role of transaction fees
- 13:54and the subsidy are secondary.
- 14:00So really when people talk about the security budget,
- 14:03what they should be talking about is transaction finality.
- 14:06And they just use that terminology interchangeably
- 14:09when really I think that then it causes,
- 14:13it's basically like a source of FUD
- 14:14because now you're playing up transaction finality
- 14:17to be the security of the system,
- 14:19kind of broadening the scope of it
- 14:21where I'm like, that's not really appropriate.
- 14:23Right. And transaction finality is so important because in the example you were given before where it's important to know which transaction happens first, it's also important if I send you a Bitcoin and you give me your car, then I couldn't end up with my Bitcoin and your car.
- 14:40Right So like classic double spend would be that yeah I received I thought I received the Bitcoin And let say three blocks have gone by So I got three confirmations So it was included in a block three blocks ago I give you the car you drive away you drive to your mining facility you rewrite the ledger history to remove that transaction and ideally put in a different one that you know still goes to your wallet and then that means that when I look at my wallet that balance is now zero And so now you have the car and the Bitcoin
- 15:17And so I think that's called a Finney attack
- 15:19is kind of the word for that.
- 15:22So it's really important to not have that happen
- 15:27because then that would undermine people's ability
- 15:31to use this as a monetary system.
- 15:33um and the so when we think about the subsidy versus transaction fees really in the security
- 15:41budget we're asking the question of how do we prevent that from happening um there's other
- 15:46attacks so you could imagine uh there there's attacks where uh you just mine empty blocks and
- 15:53you don't include any transactions and so you're essentially preventing anybody from transacting
- 15:58on the network and that maybe that would cause the price to crash or something like that
- 16:02And then there's attacks where, and so that's really a denial of service type attack on transactions.
- 16:11There's also attacks where you're stealing revenue from other miners.
- 16:17And so you could have a minority of the hash rate that is selectively revealing their chain to take revenue away from miners.
- 16:27But all of these things, I think, are very much more theoretical than they are practical.
- 16:36And we can get into that.
- 16:38But just in terms of the security budget, the second point I want to make is that not only is the word security overblown, the word budget is also very misunderstood.
- 16:50Because people think of, they'll post a chart of transaction fees historically.
- 16:56and the transaction fees are going down
- 16:59and the subsidy is going down in Bitcoin terms.
- 17:02Yeah, in nominal terms.
- 17:04And then they'll say,
- 17:06well, look, Bitcoin's security budget is decreasing.
- 17:08Well, a budget, typically when you think about budgeting,
- 17:12you're thinking about the future.
- 17:13You're not looking at the past.
- 17:15And so one is that if we did have a budget back then
- 17:21and we said, okay, the budget is 50 Bitcoin every 10 minutes,
- 17:24right that's what it was in 2009 and so now we with the first halving in 2012 uh now we need
- 17:3225 bitcoin of subsidy and 25 bitcoin transaction fees we didn't get that right so even back first
- 17:39halving like there was no way the transaction fees were making up for the decrease in the subsidy
- 17:44um and so somebody could say oh well bitcoin is less secure at that point uh i would say you know
- 17:52if you come under budget, that's probably a good thing because that means that the transactors
- 17:59got what they needed, transaction finality, at a lower cost than they expected, whether it's in
- 18:04the form of dilution of issuance or in the form of transaction fees. And so I really see like
- 18:11mining from a Bitcoin user perspective is a cost center, right? Like we have to put up with the
- 18:19fact that we have to give miners money uh it's not like to get transaction finality yeah it's not
- 18:24something to be celebrated of oh we wasted a ton of money on mining to get the same amount of
- 18:30finality yeah i look at it as like an efficient network should be able to do the same function
- 18:34for less and less of the overall output over time and that and i'm curious here is that
- 18:41what it like because i i personally think the idea of security budget is um like in a in a
- 18:49nominal term or an absolute term is is a misnomer because it's like well what ensures transaction
- 18:56finality it's just a nominal amount of currency the value of that is dependent on how much people
- 19:01value it so it ultimately becomes how much and how many people value bitcoin that determines
- 19:08the value of what miners are being paid at any time,
- 19:12as well as the amount of transaction activity.
- 19:15But then it's what ensures transaction finality.
- 19:20And that, to me, it seems like that is a function of decentralization.
- 19:25I view it this way,
- 19:28is that the true security budget
- 19:31is how much would people be willing to pay
- 19:35to get into the next block?
- 19:37and so it really is about contention at the tip and it's about potential fees and you can't see
- 19:46that right so you can't see that unless you were to say all right i'm going to start mining empty
- 19:52blocks and i'm going to see what happens because the way transaction fees get set is in the mempools
- 19:57so each bitcoin node or you can actually run a bitcoin node without a mempool so you know but
- 20:03if you're running a mining pool, you're going to want to know what are the transactions competing
- 20:09to get into the next block in order to make your block template. And you're going to rank order them
- 20:15by what is their fee rate. And so if there's a lot of demand for block space, there's a lot of
- 20:21transactions and the network is getting, you know, quote unquote, congested, fee rates go up. And
- 20:28historically during times where, for example, end of 2017, during that bull market up to $20,000.
- 20:35That was the top. We thought we were euphoric at the time. Today, we'd be depressed at $20,000.
- 20:40We're depressed at $108,000. We'd be depressed at $20,000 for sure.
- 20:46Yeah. So at the time, transaction fee rates went sky high. And so it was just because of
- 20:54how much demand there was for block space. And that is kind of the revealed preference,
- 21:01but that preference is hidden in times where you don't have a lot of demand to get into the next
- 21:06block. And so the real security budget is actually unknown because it's really about what are people's
- 21:14subjective preferences about transaction finality in the extreme scenario of like, they're all
- 21:20bidding against each other. They're all bidding against each other. And then what prevents them
- 21:27from essentially redoing the work? Well, so then on the hasher side or on the mining
- 21:35side, they're looking at, okay, well, what maximizes my expected value? Assuming they're
- 21:42rational, right? And so if they're going to look at two different block templates,
- 21:47one has lots of transaction fees by including transactions the other is empty because uh you
- 21:56know that would be censorship right they're they're trying to exclude transactions the rational one
- 22:00would try to include as many transactions as possible um and so then if there is let's say
- 22:07there was like 60 of the hash rate that was mining empty blocks all of these transactions
- 22:14are accumulating in the mempool
- 22:16and causing transaction fees to increase
- 22:19until basically until you have either defectors
- 22:23from that 60% of hash rate being like,
- 22:26that's a lot of money to leave on the table.
- 22:28Like we're, you know,
- 22:29we're going to point our hash rate to an honest node
- 22:32or new hash rate comes online.
- 22:36And that's actually really important
- 22:38that the entry into the set of hash rate
- 22:42is permissionless.
- 22:44And so even if somebody has 99% of the hash rate, they can't stop new entrants from coming in.
- 22:52And so that's really a huge difference with proof of stake, for example, where they actually can stop stakers because staking itself is a transaction.
- 23:02Hashing is not a transaction.
- 23:04And so that's another huge difference when we think about proof of stake versus proof of work.
- 23:09um but uh the so the there's a huge cost attached to being an attacker i think is the the underlying
- 23:20premise of proof of work um and that uh that's really what then if you look at it from a game
- 23:27theory perspective if you as the attacker know that your attack can be undone by others you're
- 23:34just not even going to bother you're going to find other ways to attack and there's lots of
- 23:38other ways to attack Bitcoin than to just do the brute force method of 51% attack that are less
- 23:45expensive. In fact, like people talk about, oh, what's the cost of renting hash rate, right?
- 23:52Well, it would be less expensive to do like a cyber attack or to have like insiders at pools,
- 23:59you know, collude. See, but even there, like what ensures that the collusion,
- 24:05you know because like that's where i get to to decentralization necessarily being part of like
- 24:11what ensures the finality of like there there might be an an incentive to potentially attempt
- 24:17to collude but if each individual actor represents a smaller share their own expectation of what they
- 24:23could influence yeah diminishes and diminishes do you think that that so i i think bitcoin mining is
- 24:30is always decentralized.
- 24:32Let's take the reductio ad absurdum
- 24:35of there's one dude
- 24:36in his parents' basement
- 24:38in his underwear.
- 24:39He's mining on his laptop.
- 24:41He has 100% market share
- 24:43because the year is 2,200.
- 24:48All the subsidies gone
- 24:49and transaction fees
- 24:50are extremely low.
- 24:52And so economically,
- 24:54the only thing that's justified
- 24:55is one guy mining on his laptop.
- 24:58and he's clearing the whole world's economy on his laptop
- 25:04or providing final settlement services for it.
- 25:07And then he's like, okay, well,
- 25:09I'm going to start censoring some transactions.
- 25:11And so some transactions start getting left in the mempool
- 25:14and those transactors, rationally,
- 25:17they start bidding up their transaction fee using RBF,
- 25:20using Child Pays for Parent.
- 25:21And so they're starting to put chips on the table of,
- 25:27hey, whoever-
- 25:27Create an incentive for somebody else to come along.
- 25:29So somebody else whips out their laptop
- 25:31and there's nothing that that first person can do
- 25:36to stop the second person from coming in
- 25:38and taking that money and contributing hash rate.
- 25:41And so even though he had 100% market share
- 25:44and everybody on Twitter could be saying,
- 25:47hey, Bitcoin mining is centralized.
- 25:48This is a huge problem.
- 25:50Well, it's not really a problem
- 25:52until he effectuates and abuses that power.
- 25:55and then it's a self-resolving problem
- 25:58because there's a market mechanism
- 25:59and the transaction fees going up
- 26:01that will then cause somebody to enter the set of hashers.
- 26:07All right.
- 26:07So now I understand the framework that you have there.
- 26:16You mentioned before the second function
- 26:19being the ordering of transactions.
- 26:21Now I want to dive into the hold my beer
- 26:25discussion of trying to explain in a way that is digestible, but I do want to get into the
- 26:32technicals of how, of what the difficulty target is, what difficulty adjustment is,
- 26:40and how it plays into, because if we, if we start from the idea that if I send you a Bitcoin,
- 26:46I send somebody else, the network needs to know which one of those happens first.
- 26:50and one of them needs to be processed for transaction finality
- 26:56or for final settlement and another one invalidated.
- 27:03In this scenario you just described for just illustrative purposes
- 27:09of discussing the incentives, setting that one aside
- 27:13but going to this world of there's a lot of people out there
- 27:15running Bitcoin mines all over the world,
- 27:17practically speaking every state in the country every country in the world wherever there is
- 27:24excess power all of these miners and you mentioned they're all competing with each other
- 27:31in your words describe the before we get into the technical of how the difficulty adjustment works
- 27:39and the difficulty target what the significance what it is and its significance to the network
- 27:45in ordering blocks? So it's really a way of getting the... So I mean, first of all,
- 27:57on the subsidy is that you want to prevent seniorage. And so those monopoly profits from
- 28:04issuing new currency, you want there to be a cost associated with that. And the only way to have
- 28:11that is to have competition over it. And then what form that cost takes for Bitcoin mining is
- 28:18essentially the consumption of energy and of semiconductors. On the transaction side,
- 28:26you know, the importance there is to make sure that we don't need to have a proof of authority
- 28:33of some kind of centralized clock that is saying, OK, whose transactions come in first.
- 28:39you know wells fargo very recently they they entered into litigation over this because
- 28:44they were reordering people's transactions to maximize overdraft fees oh i remember this
- 28:50so whoever controls the clock actually has a lot of control over the user experience of the system
- 28:57right um and and that uh conceivably they they would also be in a position to to give themselves
- 29:04more Bitcoin. Now, the other part that we have to keep in mind is that when they mine a block,
- 29:17they're not imposing it on the network. They're actually proposing it to the network.
- 29:24And so all the Bitcoin nodes, when they receive that block, they make sure that not only is the
- 29:31proof of work part of it valid, which we'll get into soon, but they also make sure that all the
- 29:36transactions are valid and that there's a list of rules of the Bitcoin protocol that are being
- 29:41followed, including the new issuance, the block size limit. And this gets into the area where
- 29:54there's a lot of debate going on right now about, is Bitcoin just a database or is it money? Well,
- 30:01the rules that the Bitcoin nodes
- 30:03are filtering
- 30:05with,
- 30:07to use a lot of terms,
- 30:09they're really optimized to create
- 30:11a transactional monetary system.
- 30:13You know, they're really,
- 30:15that's what their intent
- 30:17is. It's not
- 30:18any other kind of intent And one that also and here where we enter into tension is censorship resistant So for example like the block size limit on one hand you got people
- 30:32like Roger Ver who will say, well, you're censoring transactions that could go into making that block
- 30:39bigger by having the block size limit. But the counter would be that the block size limit allows
- 30:45for one, low cost of operating a Bitcoin node, which you don't want to censor Bitcoin nodes,
- 30:53because if you censor Bitcoin nodes, then there's no way to verify the monetary supply. There's no
- 30:57way to be self-sovereign. And it also alleviates the problem of censorship of network traffic.
- 31:05So a smaller block can fit through the Tor network, for example, more easily than a large block.
- 31:11Uh, and so, uh, it's, there, there's always going to be competing claims of this person
- 31:18censoring me and the, the retort being, no, I'm trying to make it more censorship resistant.
- 31:24Uh, and so, you know, that's, hopefully that triggers everyone.
- 31:28Um, where were we?
- 31:29I feel like it should have triggered.
- 31:31We covered a lot of basis of like triggerable offenses.
- 31:34Yeah.
- 31:34So now bringing it to, yeah.
- 31:37And I think you made an important comment about the blocks being proposed and that the individual blocks have a number of rules that determine validity and that each node checks to see in a block that is proposed by a miner.
- 31:56Are all the transactions in it valid?
- 32:00Is the amount of Bitcoin being issued or entering circulation?
- 32:04Is it consistent with the fixed supply schedule of 21 million?
- 32:07but then there's the difficulty target.
- 32:10Does this block meet the difficulty target?
- 32:14So what is the difficulty target?
- 32:16Well, sorry, I wanted to make one additional historical note
- 32:19on the blocks being proposed
- 32:21because we actually have a case study
- 32:24of a block was proposed by a pool
- 32:27where they included the fees and the subsidy in the Coinbase,
- 32:32but they had a bug in their software
- 32:34such that they didn't include any transactions.
- 32:36and so for any node verifying it it seemed like they were trying to inflate the supply of bitcoin
- 32:42because they were adding the fees without there being transactions to you know to pay for those
- 32:48fees uh and the bitcoin nodes all rejected it as invalid okay i remember this block but i did not
- 32:54remember i didn't i did not realize that that was the uh that was the issue with it so so so the
- 33:00other nodes interpreted because the transactions weren't there but the fees were that all of those
- 33:05fees were the
- 33:06subsidy, basically. Because they
- 33:09weren't actually validating the
- 33:11transactions. They were in the block.
- 33:13Right. And so
- 33:14what it proves is that even though this
- 33:17block had the most work,
- 33:18and even though you could say,
- 33:21oh, you know, if the miners
- 33:23are in charge, that block
- 33:24would have gotten into the blockchain.
- 33:27But the
- 33:29reality is that the miners are not in charge.
- 33:31So even if they've got the most hash rate, the most
- 33:33work, if they have an invalid block,
- 33:35then it got discarded and that mining pool received zero revenue.
- 33:40Right.
- 33:40And part of that, there was that they're competing with each other
- 33:43and that they don't have an, because they're distributed
- 33:47and they don't know each other, in part,
- 33:48they don't have an incentive to let somebody else have
- 33:52or get a reward that doesn't have valid work.
- 33:56Right.
- 33:58Or invalid work.
- 33:59Well, it's a bit of a prisoner's dilemma.
- 34:01If you don't include a transaction in your block to collect that fee,
- 34:05you know, somebody else is going to.
- 34:07And so then you have the game theory incentive of including it.
- 34:11Right.
- 34:11But you made a comment that I think is getting to the heart of it,
- 34:15which is, so it's not enough to have the most work
- 34:20or the longest proof of work.
- 34:23Everything also has to be valid.
- 34:25Right.
- 34:26But explain the concepts of the most work.
- 34:29Right.
- 34:29So most work, you could, so let's talk about the difficulty
- 34:34because essentially when Satoshi launched Bitcoin,
- 34:41he was mining on his Pentium 4.
- 34:43And let's say the second person comes online
- 34:47and starts mining.
- 34:48So when he launched Bitcoin,
- 34:51let's say it's, there's,
- 34:53and the way that the nodes calibrate things,
- 34:57we want to block every 10 minutes.
- 34:59And so, let's see, where to start the explanation?
- 35:02It's kind of a chicken and egg thing.
- 35:03um let's start it with what is uh the the the difficulty it's a number that you're trying to
- 35:11get under as the miner because let's think about what mining is first of all hashing
- 35:18okay so a hash function you take a piece of data you pass it through a hash function and you
- 35:24essentially get a cryptographic fingerprint of that data that's specific to the data you put in
- 35:29So if you put the same data in through the same hash function, you will get the same output.
- 35:34It's deterministic.
- 35:35It could be like, for simplifying terms, so they know it's not this simple, but you put a string of information in and it outputs nine, and then you put a string of information in and it outputs eight.
- 35:47You know, it could be, you put a string of numbers in, it could be a hundred.
- 35:49Right.
- 35:50And in practical reality, it's...
- 35:54256 zeros and ones.
- 35:55Right.
- 35:56Yeah.
- 35:56SHA-256 is the hashing function that Bitcoin mining uses.
- 36:00So when you say getting under, it's that you're putting the information in and continuing to try to hit a number that's below a certain number.
- 36:08Yeah.
- 36:10You can think of it like at a Hawaiian luau party, right?
- 36:14You're like trying to get under the bar, right?
- 36:17I forget what that was.
- 36:18If it gets lower and lower, it gets harder and harder.
- 36:20Yeah, exactly.
- 36:20The difficulty increases.
- 36:23And it's probabilistic.
- 36:24So if you think about 256 zeros and ones, so a hash function is random.
- 36:30So if you put in different data, even if it's different by a tiny bit, then the output is completely randomly different.
- 36:38And so when we're doing this with Bitcoin mining, the input data is what's called the block header.
- 36:45So the block header is information about that block metadata that includes what's called the Merkle root, which is the sum of all of the transaction hashes.
- 37:00And describe that in a way that somebody could interpret.
- 37:04Basically, an easy way to summarize all the transactions in the block.
- 37:11That's right.
- 37:11And in a way that if you change one of the underlying transactions, well, now that hash is going to be completely different.
- 37:20And so this is when people talk about Bitcoin being immutable.
- 37:23The immutable nature of Bitcoin's blockchain is really enforced by the cryptography of the hash functions.
- 37:31When your wallet creates a Bitcoin transaction and broadcasts it out to the network, it'll give you a transaction ID.
- 37:38That transaction ID is a hash of the data in that transaction, which includes the inputs that are unlocking the Bitcoin that have your digital signature that you signed with your private key.
- 37:54And it has the outputs of where those Bitcoin are going and the addresses that those Bitcoin are going to.
- 38:03So we can start with thereof.
- 38:07You take that transaction ID, and then when the mining pool is choosing all of the highest fee-paying transactions, it combines all the transaction IDs into one hash.
- 38:22And it does this through a cryptographic process called a Merkle tree.
- 38:26and so that's why you know the terminology is is the root is because you're you're summarizing
- 38:33all of the transactions and you're fingerprinting all of them into a very compact format that way
- 38:40the train the the block header is very small relative to the whole block so a whole block
- 38:47could be as big as four megabytes the block header is a tiny fraction of that because the the the
- 38:54Merkle root is summarizing all the transactions. In that block header, you also have the previous
- 39:02block header. So that is where we get into the blockchain, because that's how you chain the
- 39:10blocks together is by embedding the previous block header into the next block header. And so that way,
- 39:16everything is interrelated, and you can't go back and change Bitcoin's past without also changing
- 39:23everything that follows it. And you know, the, and the significance of that is knowing the
- 39:30state of ownership at any point in time and how it changes. Yes. So now, you know, what,
- 39:37what are we building on top of with this block? We're not building on top of any other block
- 39:44header. We're building on top of a specific one, which actually is, is an interesting contrast with
- 39:51with proof of stake where you can actually build on top of an infinite number of previous
- 39:59blocks, if you want to call them. Anyway, this is going to turn into like a trashing proof of
- 40:06stake episode. But so the when, you know, okay, so if we go back to day zero, Satoshi created
- 40:16the genesis block um that's actually the only block that was not mined but i want to reassure
- 40:22our listeners the 50 bitcoin in the genesis block are unspendable right okay so let's not get into
- 40:31a conversation like yeah 19.9 some odd million 50 yeah first block not mined but can't be spent
- 40:40Can't be spent.
- 40:41Invalid.
- 40:41Invalid.
- 40:42All right, now, but coming back to, okay, so you got each block having a block header that points to the previous block header.
- 40:51It summarizes all the transactions, basically, and what the version of the longest, you know, kind of proof of work up at that point in time.
- 41:00But then coming back to, okay, we've got this difficulty target.
- 41:03You know, what, you know, what does it, what role does it play?
- 41:08Yeah.
- 41:08in basically coordinating the network function.
- 41:14So the block header has the difficulty target in it as well.
- 41:18It's called nbits.
- 41:20And this represents,
- 41:22and so this can be calculated by any node.
- 41:25You don't have to be a miner to calculate
- 41:27what the difficulty should be.
- 41:29What you do is you look at the past 2016 blocks.
- 41:35And so, okay, if we say there's a block every 10 minutes,
- 41:37That means there's 144 blocks per day and multiply 144 by 14 days.
- 41:45Then you get to that 2016 blocks.
- 41:48Okay.
- 41:48So that's something really important.
- 41:50Yeah.
- 41:51Because this would, and we're actually jumping ahead a little bit, but I, but I think there's
- 41:56no way to have a linear discussion about this, which is that this was the part in Mastering
- 42:02Bitcoin by Antonopoulos where, cause I had this question of like, okay, well, without
- 42:06relying on a single source of truth or an oracle to tell you what happens first, how does each
- 42:18miner arrive at what the difficulty target was? So you had mentioned difficulty target being a
- 42:24number. And when you put in a certain amount of data into this hash function, inputting that data
- 42:30set, and it generates a random output, and then you check to see if it's below. And if it's not,
- 42:36you keep going but then maybe like talk in a little bit more detail this idea that the miners
- 42:45are basically looking at all the blocks proposed seeing the rate at which they're seeing them and
- 42:53then how they actually get to the same target yeah so um the on day zero satoshi just picked
- 43:03an arbitrary difficulty of what did he reasonably think? Maybe he probably did some testing of like,
- 43:10how many hashes can I generate with my Pentium 4 in 10 minutes? And then using that to calibrate
- 43:17the initial difficulty level. Then fast forward two weeks later. Now, I say two weeks, let's say
- 43:25more hash rate came online. And so instead of 14 days, it was 12 days, still 2016 blocks.
- 43:32But because basically, if we think about, okay, what's the probability of finding a number below the threshold of the target?
- 43:44The more attempts you have at doing that, the greater the probability that you're going to find a winning hash.
- 43:52And the faster you would find it.
- 43:54A good metaphor is essentially asking you to flip a coin, heads or tails, and asking you to get heads five times in a row.
- 44:03And if you don't get it five times in a row, then you've got to start over, right?
- 44:07So if you get it two times in a row and then you do tails, you start over and you've got to get sequential five times in a row.
- 44:15If you're really flipping that coin very quickly, you're going to get to a result faster.
- 44:21if there's two people flipping a coin
- 44:23they're going to get to the
- 44:26one of them is going to win more quickly
- 44:28than if there's just one person flipping a coin
- 44:30and then if I want to
- 44:32slow you guys down I'd say alright
- 44:34get ahead six times in a row
- 44:35I've increased the difficulty
- 44:37if I want to speed things up then I'd say alright
- 44:40get it four times in a row
- 44:41and so it really is
- 44:43a question of statistical
- 44:46probability
- 44:46of how quickly are you going to
- 44:50find that winning combination. And that's the intuition behind creating a way to calibrate
- 44:58that decentralized clock that is decentralized. So when the nodes look back at the past 2016 blocks,
- 45:06they calculate, okay, what is the time at which I saw the most recent block? And what's the time
- 45:14that I saw the first block in that set of 2016.
- 45:20And so then let's get an average
- 45:22of the difference between those,
- 45:26and that should be 10 minutes.
- 45:28And if it's less than 10 minutes,
- 45:30then I going to increase the difficulty such that we get back to an average of 10 minutes And so deterministically now okay So now the both
- 45:42Okay.
- 45:43So that's really important.
- 45:47But explain the significance of the 10 minute going back to like, why, why, why not five
- 45:54minutes?
- 45:55Why not 15 minutes?
- 45:55You could talk about it either in relation to security and orphan blocks or just in terms of the pulling forward of all the issuance of Bitcoin.
- 46:06Yeah. So the way that Satoshi set to issue Bitcoin, I think there's two lenses to look at it through.
- 46:18One is that it's arbitrary. You've just got to have some kind of schedule that gets the Bitcoin out into circulation in a way that's competitive.
- 46:26And so he could have made it so that within the first two weeks, all the 21 million Bitcoin got mined.
- 46:33for whatever reason he wanted to spread it out over several decades now half of the bitcoin
- 46:42got mined you know in the first four years and so it definitely was front-loaded in terms of
- 46:51the issuance and and then it tails off until the year 2140 but really in by the 2030s 99%
- 47:01of the Bitcoin will be on the ledger. And so you can see that as like, okay, well, that's arbitrary.
- 47:09Maybe the environmentalists would say that he should have front loaded it more,
- 47:13because if he had done that, we would actually have less electricity consumption into Bitcoin
- 47:20mining today than we do have. And so like what Elizabeth Warren should be advocating for is a
- 47:29soft fork to remove the subsidy today.
- 47:33And that would actually be feasible.
- 47:36And I actually,
- 47:37I don't know if I,
- 47:39I don't know.
- 47:39Well,
- 47:40of course not socially feasible,
- 47:41changing the rules on all these guys who are running all this power to,
- 47:45to,
- 47:45to get that subsidy.
- 47:46But I don't know if I follow the,
- 47:48the idea that it would reduce because it just comes back to how much people
- 47:52value.
- 47:53No,
- 47:53because look like if Bitcoin's not under attack,
- 47:57then transaction fees are low
- 48:00and if there's no subsidy
- 48:03then the top line revenue
- 48:06for the mining industry is low
- 48:08and so it just justifies a low amount of power consumption
- 48:11Right, but then if the nominal amount declined
- 48:15and it was just transaction fees
- 48:17but 8 billion people started valuing it
- 48:20then wouldn't it
- 48:22Well, I'm just saying all else equal
- 48:24Yeah
- 48:25yeah yeah if we had mass adoption then yeah i agree that the transaction fees would go up
- 48:32unless you know some brilliant let's say tomorrow some big brilliant product bitcoin protocol
- 48:37developer comes up with some cryptographic magic that makes it so that the efficiency of using
- 48:45block space increases a million fold and and we get eight billion people on chain but we only need
- 48:53like 400 kilobytes per block
- 48:56and so transaction fees are
- 48:57de minimis, right?
- 48:59Like, and then we had no subsidy
- 49:02then the power
- 49:04consumption of Bitcoin's proof of work
- 49:06would fall to
- 49:07almost zero. And
- 49:10I would argue Bitcoin
- 49:12is just as secure
- 49:13as it was
- 49:15today.
- 49:19I'd have to think about that
- 49:21because
- 49:22ultimately
- 49:24like again
- 49:25in my framework
- 49:27you've got to
- 49:30you have to have currency that's valuable
- 49:33to
- 49:34pay a wide
- 49:37number of participants
- 49:38and that the more distributed
- 49:40and the more decentralized
- 49:41it is
- 49:43that the more decentralized it is
- 49:46the
- 49:48more reliable final settlement
- 49:50is and
- 49:52And the more you can pay people for power in more places, the more distributed it becomes.
- 49:59But setting that aside, because we don't want to give Senator Warren any ideas.
- 50:05I'm happy to give her lots of ideas.
- 50:06I know she has very little follow through.
- 50:09Yeah, honestly, it would be good for Bitcoin because it would make more people understand it.
- 50:13But coming back to the idea of the target and basically each miner, it's basically like if the blocks are being found faster, then each miner individually looks at the rate in which they saw the last 216 blocks and adjust back to say, I saw the last 2016 in nine minutes.
- 50:41I need to make it
- 50:4310 divided by 9
- 50:46harder to then have the next
- 50:48and the significance of that is
- 50:50it basically ensures that
- 50:52one, there's
- 50:54a period of time in which
- 50:58that subsidy is distributed
- 51:01those decades that you
- 51:02mentioned
- 51:02and then there also is a security
- 51:06component of
- 51:08the 10 minute, not in the sense of
- 51:10the security budget, but in terms of the ordering of like,
- 51:13what's the probability that a block is found at the exact same time
- 51:18probabilistically that could create a split in the network.
- 51:23Yeah. So there's that.
- 51:24And so you want to have enough time for blocks to propagate globally.
- 51:29So that also, you know, if you have lots of ad rate in North America,
- 51:33if you had a shorter block time,
- 51:36then there would be an incentive to co-locate.
- 51:40And hash rate would become geographically concentrated due to the block interval.
- 51:46But 10 minutes is long enough to get from Texas to Tokyo.
- 51:53You know, in fact, obviously, if you look at the speed of fiber optics, like it gives you lots of wiggle room.
- 52:00Right.
- 52:00But then at any, at any interval, if it was probabilistically 10 minutes, or if it was
- 52:05probabilistically nine minutes or 11 minutes, there's some medium where if, if it's probable
- 52:12that it's going to take 10 minutes, that, that it's also possible that two, two miners
- 52:18find it in very short period of time simultaneously.
- 52:20But that happens, right?
- 52:21Yeah, it does.
- 52:22But, but am I wrong in thinking that, or at least this has been my understanding that,
- 52:26that the difficulty, um, and it being set at that, um, it's not that it doesn't happen.
- 52:35It's going to happen, but with a certain frequency. And if it was every say two minutes,
- 52:41it might happen in greater frequency than if it was ever 10 minutes, just probabilistically.
- 52:45Yeah. Um, that's, that's right. Um, I don't, I think I, in my mind, it really is about,
- 52:52leveling the playing field from a global block propagation perspective.
- 53:00Yeah.
- 53:01The other part of it too is on a practical level, we've got hundreds of thousands of blocks.
- 53:09From a software perspective, if you had every one minute, you'd have 10 times more blocks.
- 53:16And that just, it just adds to the overhead of operating a Bitcoin node.
- 53:22If you've got, even if they had like, if you also cut the block size limit by 10, you're
- 53:29just increasing the amount of like metadata overhead that the node has to deal with.
- 53:36Smaller issue.
- 53:36But the only caveat I want to add is that the difficulty is really being set by the Bitcoin nodes.
- 53:48And so when a miner proposes a block, it's going to make sure that it's going to calculate the difficulty.
- 53:58Use a little bit more specific language where you say the nodes are setting it.
- 54:01Well, the nodes are looking at the past 2016 blocks, every 2016 blocks, and that if a miner proposes a block that has an incorrect end bits in it, that it would get rejected as invalid.
- 54:20Right. So you could be a non-mining node.
- 54:23You're calculating...
- 54:25Independently.
- 54:26Independently.
- 54:27The frequency with which you saw the last 2016 blocks.
- 54:31It's actually not what you saw because the timestamp is included in the block.
- 54:38I was going to get there.
- 54:39No, no, no, no.
- 54:40I was going to ask the question because I remember learning this, but then the question is, technically, each miner might see a block at a slightly different point in time.
- 54:54So describe how they're able to get to the actual right amount because it makes a difference.
- 54:58uh so you're you're um let's say you're you're mining and you you put a time stamp in your block
- 55:05header that's like two days in the future uh nodes would reject that as invalid you have to be but if
- 55:13you put it five minutes in the future it's fine there's so there's a there's a limit to how far
- 55:18into the future you can put your time stamp and so that helps keep things honest uh and then also
- 55:24So you can't...
- 55:25And so does that mean that...
- 55:30Is it five minutes or is it...
- 55:32I don't know what the exact threshold is.
- 55:34Okay, because I was wondering if someone's hashing
- 55:36if their template, if they haven't found a block
- 55:38in that interreligious update for the time.
- 55:41They have to eventually update the template.
- 55:44The other part is that you can't have it be
- 55:48so far in the past before the previous block.
- 55:52now my understanding is that it can be the timestamp of your block can be slightly before
- 56:02the timestamp of the previous block and so you've got negative time between some blocks
- 56:07where you know you would where you still like the
- 56:10if i my understanding of that is i times i timestamp something um i don't know what time
- 56:21it is but i i timestamping two o'clock you timestamp something 202 because you're just
- 56:27yeah uh estimating it it can it needs to be in this window you actually solve a block propagate
- 56:36it that's timestamp 202 i didn't get really lucky solve a block the next block within the window
- 56:43and it's uh it has a timestamp of two o'clock and then like technically my blocks after yours but
- 56:51your time still valid even though yeah things are okay but now get back to how if that's the case
- 56:58and you know the timestamps aren't precise people are are um ordering yeah 2016 blocks and looking
- 57:07backwards to see what was the well because there's limits on how imprecise they can be
- 57:12over an average of 2016 blocks that would not have an effect okay but but
- 57:20am I right to say that if everyone calculates their own difficulty target,
- 57:30do they actually get to the exactly precise same number?
- 57:37I'd have to double check that.
- 57:39I'd have to double check that.
- 57:40My understanding is that they do, but I'm now like trying to,
- 57:44that was one thing that was mind boggling.
- 57:47But because if you weren't at that exact same number, then a certain number of times somebody would think that they had a probabilistic block that met the target.
- 58:00So I want to more confidently say that the end bits is global and is the same for everyone.
- 58:08Because the timestamps, even if with the wiggle room we talked about, it's in the block header and it's hashed and it's global as well.
- 58:18So everybody's comparing the same timestamps.
- 58:20Yeah, so maybe then it might be there's a timestamp of the 2016 block and there's a timestamp of the first one.
- 58:28And they might use...
- 58:29And then they subtract those and then they divide by 2016 and then they see how many minutes.
- 58:36Yeah.
- 58:37Okay.
- 58:38So now I always try to now make it relatable because you can like start zeroing in.
- 58:46but the important thing is there's a mechanism
- 58:49to allow everyone within the network
- 58:56independently from each other to sequence blocks,
- 59:00but then readjust as more power comes online.
- 59:07Or less.
- 59:07Or less to adjust and synchronize the network
- 59:13such that on average, the blocks come through
- 59:16every 10 minutes and that it doesn't materially pull forward the issuance of the supply or
- 59:25materially slow right um if for a period of time hash rate comes off now
- 59:35part of you know in in a in a practical setting the bitcoin hash rate has increased significantly
- 59:42over the past, since inception.
- 59:46Yeah.
- 59:48And so as more work,
- 59:52as the difficulty target is going down,
- 59:55the amount of work to hit the target is going up.
- 1:00:01How do you think about contextualizing
- 1:00:04the significance of more work coming online,
- 1:00:09not translating to either faster time or more of the currency units?
- 1:00:16Yeah.
- 1:00:17So because of this exponential increase in hash rate, we're living in the future.
- 1:00:25So we've got blocks arriving that if you had just done, I don't even know what the block
- 1:00:32height, do we have a block clock in here?
- 1:00:33We do have a block clock, but is this working?
- 1:00:35It's not on current block height.
- 1:00:38It swaps.
- 1:00:39All right. Well, you know, we're we're we're
- 1:00:44I'm trying to see what this the this Moscow time
- 1:00:48right now.
- 1:00:52Logan, what block height are we at?
- 1:01:00Okay, 912 to 97.
- 1:01:02So if you look at,
- 1:01:04I think it was January 2nd, 2009
- 1:01:05was the first block.
- 1:01:07And if you multiplied 912 by 10 minutes,
- 1:01:12you know, it's probably several years,
- 1:01:14maybe in the,
- 1:01:16or at least months in the future.
- 1:01:18Um, but, uh, that's why you should not rely on Bitcoin's decentralized clock to, you know,
- 1:01:28get on time to your wedding, right?
- 1:01:30Like it's, it's, it's not a clock for that.
- 1:01:33It's only about making sure that we're not double spending Bitcoin.
- 1:01:38Um, and so the, the, when we think about like proof of work, I think that a really important
- 1:01:45intuition is that the work is being done by the Bitcoin miners. And so let's say, you know, we're
- 1:01:52at one zeta hash per second, right? And so we're generating this astronomical amount of hashes.
- 1:02:02Put that into context. Because most people, maybe, I mean, Bitcoin miners would understand maybe what
- 1:02:07exahash or zeta hash is
- 1:02:11are we at a zeta hash?
- 1:02:12But anyways
- 1:02:12Almost
- 1:02:13That's almost counter to the point
- 1:02:15Equate it in power
- 1:02:18or
- 1:02:19Well, okay
- 1:02:20So let's
- 1:02:21We can do metric system education
- 1:02:24on this podcast, right?
- 1:02:26Yeah
- 1:02:26So one kilo hash
- 1:02:28would be a thousand hashes per second
- 1:02:29Right?
- 1:02:31A mega hash is a million
- 1:02:32A giga hash is
- 1:02:35one billion
- 1:02:37A tera hash is one trillion
- 1:02:40So the latest generation of miners
- 1:02:43They might be in the ballpark of like
- 1:02:46A hundred to five hundred tera hash per second
- 1:02:48Of trillions of hashes per second
- 1:02:51Okay, so that would be five hundred trillion
- 1:02:54Yes
- 1:02:55Let's see, like trillions of the number of the people
- 1:02:57Yeah, already like we're talking about the federal budget deficit
- 1:03:01Yeah, which no one can conceive of how large that actually is
- 1:03:04Yeah, yeah
- 1:03:05It's phenomenal
- 1:03:07Now, then if we go to one petahash, so multiply that by a thousand, and then...
- 1:03:14Okay, so that's quadrillion.
- 1:03:17Yeah.
- 1:03:18And then you get to exahash, that's quintillion.
- 1:03:23And then zeta hash.
- 1:03:25So today we're probably at like 800 exahash.
- 1:03:27Yeah.
- 1:03:28Which means that...
- 1:03:29Higher, like 900.
- 1:03:29One way to think about it is that there's millions of Bitcoin mining rigs out there that are hashing to get to that.
- 1:03:38And each one of those is consuming or requires power to hash.
- 1:03:41Yeah. So then if we translate it into energy talk, we're probably around 22 gigawatt hours of like over an hour, 22 gigawatts.
- 1:03:53Right, and maybe a way to think about that is that to solve the next, assume that it was, for round numbers, let's assume it's 20 gigawatts, that it would require running, probabilistically, it would require running 20 gigawatts of power for 10 minutes to solve the next block.
- 1:04:23I wouldn't, you're right. You're right. You're right. For 10 minutes. Yeah. It doesn't matter. It would require 20 gigawatts to solve the next 10. And that if 10 more gigawatts of power came online for a period of time, the blocks would be found sooner, but then it would adjust to say, Hey, for the next, you know, probabilistically you need to run 30 gigawatts power for, to solve the next block.
- 1:04:47Yeah. And then part of that work, like, like, you know, this is a hard way to ask the question, but it's like, you're out there mining. You might know a friend that mines, but you don't know who's, you know, in terms of like identity solving these blocks and the, in each difficulty, the next block and, and the next 10 minutes and the next 10 for the 2016.
- 1:05:17but you need a way to know that others are actually doing the same work that
- 1:05:24you're doing or that,
- 1:05:25or that they're relational to each other.
- 1:05:28That basically if like you can't fake power,
- 1:05:33I'm trying to find some way to explain that where you might be slightly better
- 1:05:39to be able to produce power at a cheaper cost or set up your mind marginally
- 1:05:45better but we're all essentially
- 1:05:47competing against the same game
- 1:05:49that is competed on the margin
- 1:05:51such that if you're producing work
- 1:05:53I know that
- 1:05:55the work is
- 1:05:57comparable to the work that I'm doing
- 1:05:59but then explain that and the concept
- 1:06:01of this coordination
- 1:06:03function of we're all doing
- 1:06:05work and we're all validating
- 1:06:07each other's work to then
- 1:06:09sequence blocks
- 1:06:11which ultimately add up to
- 1:06:13the highest level idea that we're facilitating a currency system and needing to know who
- 1:06:19has the money at what time and that people can't spend it. But kind of like just maybe,
- 1:06:25you know, kind of going back up a level. We've been deep down in the weeds. We've kind of
- 1:06:29figured out how with no central coordination miners have this way to figure out how much work must be done to consider the block valid in addition to all the transactions being valid pointing at the right version of history but then
- 1:06:46you know like the connection between okay if you zoom in too close you're like but why are you
- 1:06:50consuming all of this power like fit that into um the functioning of the broader network so
- 1:07:01they're consuming all this electricity
- 1:07:04to generate all of this astronomical number
- 1:07:06of hashes and then every 10
- 1:07:08minutes they find one hash
- 1:07:10that actually has value.
- 1:07:12That one hash is what we call
- 1:07:14the proof.
- 1:07:16All of the work gets
- 1:07:18discarded because
- 1:07:19it's not valid hashes
- 1:07:22but they needed it
- 1:07:23to find that one valid hash
- 1:07:26the proof and then
- 1:07:28when they broadcast that
- 1:07:30valid hash, all the Bitcoin nodes can verify that that hash is valid using very little electricity.
- 1:07:40So there's this huge asymmetry between you're consuming all this electricity to propose a block
- 1:07:46and it takes a tiny minuscule fraction of that to verify that what you did actually is correct.
- 1:07:57um and then so that's for that applies everyone in the network can rely upon it as good right
- 1:08:03because if you're if you're mining this is and this is the real you know the reason you want to
- 1:08:09run a bitcoin node as as a mining pool is that if somebody sends you a block header and a hash
- 1:08:16and you don't verify it using your own node and you start building on top of it you could be
- 1:08:23building on sand right because it could be an invalid uh hash in which case when you find your
- 1:08:29valid hash and you broadcast it out to the network all the nodes are going to say no that's not valid
- 1:08:34because everything about it is fine except for the hash that you included in your block header
- 1:08:41because ultimately when you were basically looking at the past we're further in the future
- 1:08:48If you were building on an invalid block.
- 1:08:51Yes.
- 1:08:51Yeah.
- 1:08:52Yeah.
- 1:08:52And so there's a hole in the history that you're trying to build on.
- 1:08:58Right.
- 1:08:59Contrast that with XRP where they lost the first 30,000 blocks.
- 1:09:06That doesn't matter.
- 1:09:08It's gone.
- 1:09:08Do you know why?
- 1:09:09He's creating more of it.
- 1:09:11Yeah.
- 1:09:11Yeah.
- 1:09:12It's fine.
- 1:09:12There's no mining going on.
- 1:09:13And that comes into this idea that you can't produce Bitcoin without a massive amount of work.
- 1:09:20And that, you know, because you said it's basically like you do all this work to, you know, think about it.
- 1:09:26It's like 20 gigawatts of power running concurrently.
- 1:09:29You know, and obviously I'm using that number to give some order of magnitude, but it's constantly changing.
- 1:09:34Power is coming offline.
- 1:09:36Power is coming online.
- 1:09:37More power is coming.
- 1:09:38Machines are getting more efficient.
- 1:09:39So we don't actually know how much power.
- 1:09:41But let's also contextualize 20 gigawatts.
- 1:09:43That's approximately one third of Texas electricity grid.
- 1:09:49Yeah.
- 1:09:49At its peak.
- 1:09:50Yeah.
- 1:09:50At its peak.
- 1:09:51Yeah.
- 1:09:52Yeah.
- 1:09:52We're pushing it.
- 1:09:53But broadly speaking, on average.
- 1:09:56Peaking like the spring or something.
- 1:09:58So it's a lot of electricity, but at the same time, it's not like we're using all the electricity on the planet.
- 1:10:05No, no.
- 1:10:06I don't want to present that.
- 1:10:07But that it is a significant amount and that what it does to that process is it clears all of the value, a clearing from the perspective of everyone who sent money and bid enough to be in that next block, which you communicated the significance of that bidding process, that now we can get on to clearing the next financial transactions.
- 1:10:29I would argue more importantly, so if 95% of the Bitcoin revenue, mining revenue comes from the subsidy, then what that represents is that we have destroyed the value of the subsidy by consuming it instead of having that be a monopoly profit of seniorage.
- 1:10:53and so you know the fact that if we look at like a natural gas power plant they essentially we've
- 1:11:01burned natural gas in order to exhaust out the new issuance and not allow any single participant
- 1:11:10to you know profit off of that that from a monetary system perspective that's how we maintain
- 1:11:16the morality of the system because well now um i'm trying to i'm trying to wrap my head around
- 1:11:22it is that effectively,
- 1:11:25I'm trying to reconcile that idea.
- 1:11:30It's that you're putting some costs to it.
- 1:11:33So you're saying exhausting it,
- 1:11:34but it's like,
- 1:11:35it's ensuring that there's some cost to it
- 1:11:37versus there being no cost to it.
- 1:11:38Correct.
- 1:11:39Because there's one scenario
- 1:11:40where there's no cost to it,
- 1:11:42which is the senior age,
- 1:11:44the central bank,
- 1:11:45the trust that third party
- 1:11:46can just create the money.
- 1:11:47Yeah.
- 1:11:48And that we're maybe not destroying
- 1:11:52the value of the subsidy, we're unlocking, we're giving it to somebody, but we're ensuring
- 1:11:56that they put in work to get it.
- 1:11:59Their profit margin is approaching zero.
- 1:12:02But there is some profit motive to actually do the operation.
- 1:12:05Sure, and some are going to be better than others, right? Some are going to mine at a loss, some are going to
- 1:12:10mine at a huge profit. With it, on average, the average
- 1:12:14miner should be basically a break-even. The median miner, or well, the marginal
- 1:12:18miner really is going to be a break-even, right?
- 1:12:19Right.
- 1:12:20Yeah.
- 1:12:21And that it you know in one way you could create think about as race to bottom on the other side it is as it commoditizes it should become a very stable activity that has a very slim margin but reliable low return
- 1:12:37But in the greater context of
- 1:12:40how do you coordinate a monetary system
- 1:12:45that everyone can participate in permissionlessly
- 1:12:48and you need to reconcile
- 1:12:51that what transactions happen first,
- 1:12:54everyone has to propose that,
- 1:12:56but then everyone else has to validate it.
- 1:12:58And you need a way to order
- 1:13:02and you need a way for,
- 1:13:05imagine a thousand people that don't know each other
- 1:13:07to look at each other's work
- 1:13:09and know that they did something
- 1:13:11in relation to the amount of work that was required.
- 1:13:16And that's all, I mean, that at its core
- 1:13:18is this idea of the difficulty target
- 1:13:22and then the adjustment,
- 1:13:24the difficulty adjustment being
- 1:13:25how do we basically gate or synchronize
- 1:13:31as things speed up or slow down
- 1:13:34to ensure that we're kind of within a frequency.
- 1:13:38That's right.
- 1:13:38Without the difficulty adjustment,
- 1:13:40if we'd stayed at the initial difficulty,
- 1:13:43we'd be finding a block like every second, right?
- 1:13:46And more realistically,
- 1:13:47what would have happened is that we would have speed run all of the subsidy blocks and uh today
- 1:13:56you know the uh and if you and if you're finding a block every second it's more likely that people
- 1:14:03are finding blocks concurrently distributing them and the network can't reconcile which one of these
- 1:14:09actually did happen and you can't have a block size limit because in order to say we're only
- 1:14:16going to have this many megabytes per day you have to have two limits one you have to limit the number
- 1:14:22of blocks per day and two you have to limit the size of each block that's a very important point
- 1:14:27and so that's those two things go hand in hand as well because it ensures that there's
- 1:14:34scarcity of yeah after all of the bitcoin is issued or entered circulation that there's
- 1:14:41something to create prioritization or to require that people bid on the space.
- 1:14:50Well, so you would still have that in the sense that you'd still have people
- 1:14:56using like child pays for parent to keep their order correct.
- 1:15:02I know, but if it was like every second, it's like if time wasn't a limiting factor,
- 1:15:08then it's functionally infinite.
- 1:15:10Right. And so to me, the bigger problem would be that only Google, Amazon and Apple could run a Bitcoin node because of the resource usage.
- 1:15:20Yeah. Because you'd just be adding more data.
- 1:15:22Right. Yeah.
- 1:15:23With greater frequency at which you're changing the state of the network, the faster it is, the more you're compounding.
- 1:15:32Yeah. And they'd be the only ones that'd be able to mine too. And then they would decide on the monetary policy.
- 1:15:39Okay. And so now last question, and this is going to bring it back up to a high level. A lot of people think about, will describe the difficulty adjustment and, or the difficulty, because like all the times people say difficulty adjustment, but it's like, if you don't have a concept of what the difficulty target is, then how can you have a concept of adjusting it?
- 1:16:03so those two things
- 1:16:06difficult to target and difficult to adjustment
- 1:16:07as being one of the most profound
- 1:16:09pieces of the puzzle
- 1:16:12that Satoshi
- 1:16:14put forward in taking
- 1:16:16other puzzle pieces that have pre-existed
- 1:16:18over those
- 1:16:1930 some odd years where
- 1:16:21cryptographers and cypherpunks were trying to figure out
- 1:16:24how to make a
- 1:16:25digital money system
- 1:16:28work
- 1:16:28Drew Bonsal
- 1:16:31friend,
- 1:16:33co-founder of Unchain,
- 1:16:35before an idea,
- 1:16:37and it's interesting coming from him, because he was
- 1:16:39someone that I think has come around to the
- 1:16:41monetary side, but
- 1:16:43started from the technology side,
- 1:16:46has a physics background.
- 1:16:49When he did
- 1:16:50his deep dive on the history
- 1:16:53of Bitcoin and what Satoshi,
- 1:16:55what he theorized
- 1:16:56Satoshi must have been thinking,
- 1:16:58that in Drew's mind,
- 1:17:01he thinks that Satoshi must have figured out that he needed a fixed monetary policy
- 1:17:07to make all the incentives of the network work.
- 1:17:10And then once he would have figured that out,
- 1:17:14then he would have needed a way to meter the distribution
- 1:17:19and that the difficulty adjustment and target would have logically followed that.
- 1:17:24What do you think?
- 1:17:25Do you think that...
- 1:17:26Well, you could
- 1:17:29I think the incentives would still work
- 1:17:32even if there was not a limited supply
- 1:17:35in the sense that if there was no halvings
- 1:17:37I think the incentives would still work
- 1:17:39Well
- 1:17:41if there were no halvings
- 1:17:44you think the incentives would still work?
- 1:17:46Yes
- 1:17:46It's so
- 1:17:50Wait, are you saying if there was no fixed supply
- 1:17:52that there would
- 1:17:53It's still a
- 1:17:55There's no ceiling, but obviously they couldn't create more than 50 Bitcoin per 10 minutes.
- 1:18:02No, no.
- 1:18:02What I'm saying is like, even if there weren't halvings, but you still had the difficulty adjustment,
- 1:18:09you'd still need a way to meter to ensure that it all just didn't...
- 1:18:13Yeah you still have a difficulty adjustment But do you think that the fixed supply came first in terms of
- 1:18:23in order to make this whole thing where I need to fix supply,
- 1:18:26and now I'm just talking about how I distribute it?
- 1:18:28Because you could still have the difficulty adjustment.
- 1:18:30You could say 50 every minute and adjust difficulty,
- 1:18:34or until we get to 21 million.
- 1:18:37Yeah.
- 1:18:38I would argue that if we look at the white paper,
- 1:18:41that he started with,
- 1:18:45okay, we've got a centralized time stamping server.
- 1:18:48How do we make it decentralized?
- 1:18:52Centralized in the sense of like,
- 1:18:54this is the way the central bank works.
- 1:18:55Yeah, we've got a server, yeah.
- 1:18:56You know, how do we get this guy out of here?
- 1:18:59He's got the proof of work part from Adam back, right?
- 1:19:03And then he's adding in the difficulty adjustment.
- 1:19:08And that the issuance...
- 1:19:11is he's thinking, okay, well, how do I get the Bitcoin onto the ledger?
- 1:19:15He thinks of this clever hack of, oh, I'll add it to the transaction fees.
- 1:19:22So that's the way I read the white paper.
- 1:19:25And that's where he says, oh, well, the issuance, it can work like gold mining.
- 1:19:31And he was the first person to call it mining.
- 1:19:36but in that context
- 1:19:40in that paragraph
- 1:19:40when he talks about
- 1:19:41it's like gold mining
- 1:19:42he's specifically talking
- 1:19:44about the new issuance
- 1:19:45he's not talking about
- 1:19:46the transaction ordering
- 1:19:48but like the white paper
- 1:19:49doesn't say anything
- 1:19:50about 21 million
- 1:19:51doesn't say anything about
- 1:19:53I don't think he even
- 1:19:54says anything about
- 1:19:55the having
- 1:19:55so it was only in the code
- 1:19:56it's in the code yeah
- 1:19:57and then the white paper
- 1:19:59like his intent
- 1:20:00is to prove that
- 1:20:02he solved the double
- 1:20:02spending problem
- 1:20:03on the transaction side
- 1:20:05not that solving the double spending problem was necessary in order to secure a fixed supply
- 1:20:14monetary policy one of life's great mysteries i i don't think it's such a mystery he wrote the
- 1:20:20white paper right i mean but he but he wrote the code first true but and he didn't he's communicating
- 1:20:25to the world of like what has he accomplished to him the value of what he and look i think
- 1:20:31we can,
- 1:20:33today we can debate whether it was the most important thing or not.
- 1:20:35Right.
- 1:20:36Because what I was put before was actually,
- 1:20:38yeah,
- 1:20:39not what we think is the most important,
- 1:20:41but what,
- 1:20:41you know,
- 1:20:42what he thought or,
- 1:20:43or the sequence with it,
- 1:20:45which he put these things together and that drew,
- 1:20:47you know,
- 1:20:48in his mind thought that he must've put the,
- 1:20:50the 21 million together.
- 1:20:52And in an interesting point,
- 1:20:54I think Rob Warren put out a thread about this.
- 1:20:56So that,
- 1:20:56um,
- 1:20:57both way die.
- 1:20:58And,
- 1:21:00um,
- 1:21:00I think Nick Szabo, both initially when they saw the 21 million fixed supply, they thought that that was what was going to cause it to never work.
- 1:21:12So there could be an idea that he realized that, but also realized that people would discount it.
- 1:21:21So maybe he just didn't emphasize that it was critical to the whole thing working in the white paper.
- 1:21:26But yeah, I think it's, you know, Bitcoin's working and that's the most important thing.
- 1:21:31But I do think it's interesting to think about them in relation to each other of you have the monetary policy and then you have the difficulty target and adjustment that, you know, helps distribute it.
- 1:21:42I think that Satoshi's intent was to incentivize early adopters with this bait of the subsidy.
- 1:21:52and then he saw a necessity of phasing it out
- 1:21:57because at some point either it's taken off or it hasn't.
- 1:22:01And so that is really, I think, his thought process
- 1:22:05on what he writes in the white paper.
- 1:22:08Yeah, and what I think Dhruv would say there is that
- 1:22:11the only way to value it, people needed to have some way
- 1:22:19to know how many there would be.
- 1:22:21And then if you come to that conclusion, then the most logical thing is that...
- 1:22:29Hey, people value dollars.
- 1:22:30We don't know how many there are.
- 1:22:32Yeah, but if he started with the idea that it would always be infinite, then it would be that much harder.
- 1:22:38Look, so, I mean, as I mentioned, like on one hand, like we can say, oh, you know, the issuance schedule, it's all arbitrary.
- 1:22:44He could have done anything.
- 1:22:45I would argue that there's a tremendous amount of wisdom in what he ended up doing.
- 1:22:51And so the four years between the halvings, the halvings, the 21 million, that number, I think that the mimetic value of it is tremendous.
- 1:23:07yeah well
- 1:23:08people might need to listen to this one
- 1:23:12a few times like understanding the difficulty
- 1:23:14adjustment is not easy
- 1:23:15but it is critical to understanding
- 1:23:18really how
- 1:23:20the network works
- 1:23:21and how the miners
- 1:23:24are able to work all in unison
- 1:23:26and reach a consensus
- 1:23:28and so
- 1:23:30I appreciate you coming
- 1:23:32downtown. Next time we'll talk about the doom spiral
- 1:23:34oh yeah we can do an episode on that
- 1:23:36Yeah, for sure.
- 1:23:38There's always going to be a death spiral.
- 1:23:41Yeah.
- 1:23:41Every time the rate of issuance gets cut in half.
- 1:23:44So if you're willing to do that, yeah, we'll look at the calendar because we should definitely
- 1:23:49talk about how we know that there won't be death spirals every four years.
- 1:23:55Every four years.
- 1:23:56All right.
- 1:23:57Peter, thank you.
- 1:23:58Thank you.
- 1:23:59All right.
- 1:24:06Thank you.