shazow / shazow.net

https://shazow.net
27 stars 0 forks source link

bitcoin-transaction-costs #35

Open shazow opened 3 years ago

shazow commented 3 years ago

What do transactions cost in Proof of Work blockchains?

When talking about Proof of Work blockchains like Bitcoin and Ethereum (pre-2.0), there is an important concern around the energy costs of operating these blockchains. In the grand scheme of things, they process so few transactions yet the miners utilize enough power to serve a small country. Does that mean each transaction requires that much energy to operate?

It's tempting to take two numbers and divide them. X energy is burned, Y transactions are made, so required energy cost per transaction is X/Y?

A Metaphor

Imagine a bank. Customers walk in, do some transactions with the teller, walk out.

Outside of the bank is a group of security guards. They're here to make sure that people don't break into the bank and cheat the customers.

This is a new bank, there are only a few customers, but they pay security guards quite well and there is no limit to the number they're willing to hire. Soon, there are hundreds of security guards crowding outside of the bank, but still only a few customers. Why does it take so much security to guard so few customers?

Imagine the bank is a public company, and the corporate charter states that security guards are paid with equity. Speculators are very bullish about this new kind of bank, so they drive up the price of the stock on the public market. The security guards' paychecks are worth even more now, more and more are joining and crowding the entrance. Every four years, the bank halves the number of stocks it's issuing per pay period, but the price of the stock is growing so fast that it's still attracting more security guards.

Still, people go into the bank, do some transactions inside. Maybe they move more money, maybe they move less. Maybe there are fewer customers, maybe there are more. Either way, it doesn't change how many guards are outside. The only thing that is drawing more guards is the security hiring policy and the speculative price of the bank's stock.

Can we divide the number of guards by the number of customers and say that each customer requires this many guards?

Energy as Security

Proof of work is a form of security applied to the consensus process of a blockchain.

The claim that proof of work makes is "this is how much energy an attacker would need to get equal odds at controlling the content of the next block." The security does not relate to the content of the block itself--the block could have millions of transactions encoded in it, or a thousand, or even zero. In any case, the same amount of energy would be required to mine the next block.

While it is true that X amount of energy was consumed while only Y number of transactions were executed, these two units are unrelated to each other.

Saving the Environment

Bitcoin's Proof of Work was an important advancement in computer science, it was the first practical solution to the Byzanite Generals Problem in a public environment where none of the participants can be trusted. Since then, there have been thousands of different cryptocurrencies trying many different mechanics with varying degrees of success.

What are our options for reducing the energy use of Proof of Work: (Ordered by my preference)

1. Switch to something better: The most advanced recent attempt is the migration of Ethereum to Ethereum 2.0, a plan that has been dutifully pursued for several years and has finally entered the first phase of deployment (Phase 0) on December 1, 2020. In comparison to Bitcoin's original Proof of Work implementation, which was just a few hundred lines of code, Ethereum 2.0's Proof of Stake construction is more complicated with several moving pieces but it does not rely on burning energy as a proxy for security. Instead, it relies on locking liquidity and validating transactions as a form of voting to provide security.

2. Regulate energy better: The way we generate energy, it is difficult to adjust it to exactly fit society's demand at any given time. Most types power plants have a long ramp-up period, so they remain active and the excess energy is discarded if not utilized. Clean energy is similar: The sun is there whether we use it or not, same with the wind and water and geothermal. Batteries for storage are expensive and rarely practical in a centralized grid. Local power plants often sell their excess energy at a massive discount, because it's going to waste anyway. What we need to do as a society is to properly price the externalities on power production: Tax "dirty" energy much higher than clean energy, subsidize the migration to clean energy, and charge commercial businesses (such as miners) appropriately for the energy they utilize.

3. Reduce the fees for miners: Every time a block is mined, miners get a fixed fee plus transaction fees. These fees pay for the miner's costs to operate. If we reduce the miner fees, we can reduce the number of miners who are able to economically participate in mining. This would reduce the total security of the network, but we are likely over-secured right now as it is.

4. Reduce the incentive value for miners: Even if miners get high fees, we can attempt to reduce the speculative value of the coin they're paid in. When Bitcoin's price drops dramatically, the number of miners who are able to participate also drops, so the difficulty level drops to support fewer miners. Remember, the miners are also speculators in the future value of the coin, so they will often resume operating even at a mild loss if they believe the price is going to recover. On a public cryptocurrency market, it is very difficult to control the sentiment of speculative traders. Perhaps boycotting the platform as consumers can be used as a signal to diminish the value? But I am skeptical it would be effective.

shazow commented 3 years ago

Since I drafted this, better posts have been written on the topic. I don't feel compelled to publish it anymore.