Showing posts with label bitcoin. Show all posts
Showing posts with label bitcoin. Show all posts

2026/01/27

Feynman Diagrams of Currencies

Feynman diagrams are a way of understanding state interactions and changes in subatomic particles. In this post, I use simple diagrams to understate state interactions between different types of money.  The title of  is inspired by Michael Crichton's explanation of how he coined the phrase "Gell-Mann Amnesia" as I wrote about before: Name dropping a famous physicist bestows gravitas.  So now that I have your attention (if not respect), let's draw some diagrams.

Current era

The picture that is worth a thousand words. If you understand this picture no need to read this post.


Gold Standard: pre-1930s

But to put into historical context, here's what the picture looked like in the late 19th and early 20th centuries.


Post-Bretton Woods

And here's the world that evolved in the mid 20th century. Under the Bretton Woods agreement, from 1945-1971, the major currencies continued to be theoretically pegged to gold reserves, even though ordinary users of the currency did not have automatic convertibility, having lost that in the 1930s. Eventually, the pegs were abandoned completely in 1971. And this was the picture from 1971-2009, until the current digital currency era began with Bitcoin.


Legend
In each of these diagrams, 
  • Solid lines represents easily exchangeable value. 
  • Dashed lines represents flows with barriers e.g. currency controls.  
  • The direction of the arrows represents where value "wants" to flow
What determines the directions? Two principles
  1. Inflation:  people prefer strong money to weak money. Strong in the basic sense of future purchasing power for real goods and services. Of course all else is not equal, so sometimes a weaker currency is required as a means of exchange.  
  2. Permission: all else being equal, people prefer money that they can use without permission. Of course all else is not equal, for example physical cash is great for permissionlessness. But it's not the best for long distance exchange or storage. 

Hard/soft and strong/weak currencies

"Hard currency" traditionally meant the money is made of, or directly convertible to, gold, silver, or some other hard to produce commodity.  The natural scarcity provides inflation resistance. This link faded in the 20th century, but it still persists in for example central banks gold reserves, which help "back" the value of their currencies.  But there is no guaranteed convertibility. It is money by fiat.

The US Dollar for example is no longer a hard currency in the traditional sense. The scarcity is not given by nature, but rather by  monetary policy (i.e. politics), which in practice is almost always inflationary. In the last 80 years, there have only been 2 years in which  the US CPI change was negative. 2% inflation used to be  the target. Now the target is creeping up to 3%.  Everyone expects one dollar will buy less stuff on average in the future than it does today. We are now so deep into the post-hard currency world that nobody even expects to keep savings in dollars.  The very idea seems quaint. Bury dollar bills in your backyard? Your mattress? It is accepted that to store money for the future, you have to invest it. And of course investing is work.  As Bitcoiners like to say, with fiat you have to work twice for your money, once to earn it and again continuously to keep it.

But the USD is strong compared to the many weak fiat currencies at the bottom. Everyone expects these units will lose value faster than dollars.  Instead of 2-4%  being normal, it's more like 15-30%. Most people at the bottom would rather hold USD than their local weak currency.    This all sounds strange if you are part of the 1B people currently living in the rich countries. But for the other 7 billion people in the world this is a very familiar story.

The arrows show the direction in which money "wants" to flow to store value.  But of course, local fiat is required as a means of exchange, either by convenience or by law.  And you have currency controls, bans, sanctions, and many other kinds of friction, all represented by the dashed lines. 

Stablecoins

The key feature of stablecoins is allowing people currently locked-in to weak currencies to access the strongest fiat currencies with relatively low friction. 

Reminds me of the situation with long distance phone calls in the early 2000s. An international phone call could cost 10x more from poor countries to rich countries than vice-versa. This gave rise to "call-back" services, using VOIP/SIP and the web to bridge the call via two separate calls originating in the rich country, allowing people in poor countries to make international calls at the same low price as people in rich countries. (I was actually a partner in a project called africalling.com that did that circa 2005).  Then eventually, bandwidth became so cheap that voice calls just became another type of data on the internet, and now everyone uses Internet-native voice in messaging apps like Whatsapp, Telegram or Signal, etc. No one even thinks about long distance phone calls per minute.


Stablecoins and CBDCs

Stablecoins are like the call-back services. They allow people in poor countries to use rich country money. Local currencies are like the old third world phone monopolies  A lot of sweat and tears will be spilled trying to stop international stablecoins. CBDCs ("central bank digital currencies") will be touted as the national alternatives.  But once users have access to the stronger money with low friction, why would they prefer the weaker money? So it's just the same old game as with current fiat, but the playing field is now slightly more tilted in favor of the individual users.   As people around the world gain access to USD stablecoins, they will experience the ability to buy from suppliers and sell to customers in other countries. The ability to travel and use their money in  other countries.  If you are part of the 1B people in rich countries, this is something you take for granted. But for the other 7B people this is a huge deal. Like being in Africa and being able to make a voice call to someone in another country in 2005!


USD Stablecoins demand

Now if there are many equally accessible stablecoins tied to different fiat units, there is no reason to use the second strongest units. Everyone will just use the USD stablecoins. Which means not just the weak, but also the other "strong" currencies, like the Euro or Yen etc will become less relevant.  Even the Chinese Yuan, which you would think would have strong demand since everyone imports from China, is going to be less desirable because the Chinese recipient will gladly accept USD knowing that everyone else does. In a friction-less fiat world, USD is the Schelling point.


Stablecoins as USD turbo-supply

On the supply side, the mechanism is self-reinforcing. USD stable coins are backed by US government debt. When they issue $1 of a stablecoin, the issuer takes $1 from the buyer and uses it to buy $1 of treasuries. The coin then circulates indefinitely with the value remaining pegged based on the belief that it can always be redeemed for a real $1. 

And that peg is solid. Because 
  • the US government will never do a hard default where it simply refuses to pay back that $1 of debt.  Why? Because it can always do a soft default: print another $1 out of thin air and pay the debt with it. It is fiat money, remember?  Of course you can only do this if the debt is denominated in the currency that you print, so this is more true of the dollar than other currencies, because of it's unique historical position (world reserve currency, petro-dollar, euro-dollar,  etc.).  And from a stablecoin perspective, a soft default is a no-op. As long as they keep short duration treasuries, the stablecoin issuer can legitimaely maintain the peg at $1 per coin. 
  • the stablecoin issuer meanwhile happily buys $1 of treasuries, issues $1 of tokens, maintains the peg, and gets to keep the interest on the debt. At 4% per year, and $200B of USDT issued, Tether could make $8B a year while maintaining a 1:1 peg. Of course they could also be fraudulent and not maintain the peg, but that would be irrational. Why jeopardize a legit $8B profit by stealing from your customers?
This makes stablecoin issuers large buyers of US government debt. Which is convenient for the US government as additional demand for treasuries makes it easier to continue running a deficit. And stablecoins also make the USD more dominant internationally at the expense of all the other fiat currencies. It reinforces the "dollar milkshake theory". The US was already in a position to suck up a lot of international demand for safe debt, now stablecoins provide more straws for it to drink the milkshake. So the US government has very good reasons to support USD stablecoins.  

If the US government is like an engine pushing the dollar out into the world, the stablecoin acts like a turbo which takes the exhaust and pumps it back in to increase power.

Don't get me wrong a soft default is still bad as it implies high inflation. But "nothing stops this train", to quote Lyn Alden. All fiat currencies are heading for higher inflation. However, in the short to medium term, the dollar, via stablecoins, will dominate even more than it does currently.


Bitcoin

But just like in our long distance phone call story, there's a final twist. Back to our basic principles of inflation and permission.

First, as those 7B people use the ladder of stablecoins to climb up from the flooded basement of weak fiat to the ground floor of strong fiat, they will start thinking what the 1B already on the ground floor are thinking. The ground floor is sinking too! I have escaped double digit inflation but now I have savings with 0% interest rate in dollars which, adjusted for inflation, is minus 3% per year. Can I do better?

Second, stablecoins are not entirely permissionless. They have lower friction than traditional fiat rails but at the end of the day, a USD stablecoin issuer will still obey the US government, since their main asset is US treasury bills.  (The Iranian government recently bought $500M of USDT. Grab your popcorn).  Can you use something that has even less risk of confiscation?

The answer to both of these is Bitcoin. Fiat will continue to exist for a long time of course, but Bitcoin will play an increasing role as the global neutral hard money.

Update: I gave private talk about this topic: here are the slides

2025/04/02

Why the Ethiopian government shouldn't mine Bitcoin

This is more of a draft of talking points or notes rather than a properly written article. So apologies to my regular readers. 

I've been asked to participate in a Twitter spaces discussion on this topic. Here's a very quick post to list my main arguments, in case I'm unable to articulate them clearly enough live. I've said all this in my talk at the Africa Bitcoin Conference 2024  

I recommend the whole talk. The part discussed in this post starts at around 16 minute mark. Here's a summary.

Mis-allocation of resources 

Government should be investing on infrastructure that has a multiplier effect on the rest of society. For example, water and sewage, which Ethiopia desperately needs, and any number of things that the private sector can't do but are vital. In particular, the return on investment in directly building electrical infrastructure is far greater than almost anything else. Even within the Bitcoin mining sector, it is much better to be upstream selling energy to miners than to be buying energy to mine. In the case of Ethiopia, the marginal profit of EEP from each kWh sold to miners is bigger than the margin of the miner per kWh. This is because as the seller, you have the option of selling to higher value uses at a higher price, and selling the leftover (stranded energy) to miners. 

The misunderstanding here is that casual observers think mining is easy and cheap. But the numbers they throw about are based on silly premises, like assuming the machines and data center infrastructure cost is zero. 

For example, I've estimated that the cost of mining 1GW requires $500M of investment. If you do the math, you can earn much higher returns if you put $500M into more generation and transmission. 

So why am I investing in mining? Well I, like many miners, would happily move upstream into generation if I could! But restaurants exist downstream from farmers. Vertical integration is not always possible so specialization makes sense, if you want to actually accomplish things and have an impact.

Danger of missing the opportunity cost

Those who push for government mining often say the government has free electricity, so why not? But that would be a tragic mistake. If you take some energy that could be sold for $0.06 and use it for an activity that is worth $0.03, then you are basically losing 50%. But the danger is if you own both sides, you don't see the loss from this opportunity cost, you just think you made $0.03. So while it looks like you are making cash from free energy, what you are actually doing is taking energy from the people. You are generating cash for the government while incurring a hidden loss to the people.

The biggest opportunity cost of course is that, by doing this, you are losing the chance to finance further growth. The net effect is slowing down electrification. Instead if you sell the power to the people who need it most and sell the excess to the miners, you are accelerating electrification. Not understanding the opportunity cost is like the proverbial eating of the seeds instead of planting them.

A bad way to build a strategic Bitcoin reserve

A confusing argument is that mining allows the government to build up a reserve in Bitcoin. I am actually in favor of the state owning some Bitcoin as I've advocated for many years. It does make sense, just like gold or foreign currencies, except better.  But you don't need to mine to do that. You can just buy it.  The counter argument I've heard on this is: "well they will never get their act together to buy some. They are not competent enough". Besides the fact that insulting the people you are trying to convince is never a good strategy, there is a more basic flaw in this reasoning. Mining is harder in every way than buying. So to say they are too incompetent to buy but they should mine, is ridiculous. 

Some may say I am making a self serving argument because I want to protect my own investment in mining. But anyone who has studied the dynamics of Bitcoin mining understands that it is a global competition and location doesn't matter. Whether someone mines right next door to you or on another continent they are all equal competitors. In fact the closer ones are positive because they create a cluster that can help each other. No, my reason is that I think it risks derailing what could be a very positive trajectory of accelerating electrification.

If you want to dig deeper, here are a couple of previous posts on the real cost of Bitcoin mining and the good, the bad and the ugly of Bitcoin mining in Ethiopia.

P.S. My opponent in the "debate" I suppose will be someone from Project Mano. First let me get the main issue I have with their post that started the debate. They used a grossly incorrect fact as the basis for the entire thing. That it costs less than $2000 of energy for a miner to produce one Bitcoin. The real number is close to $40,000. With the real number, and then adding on capital expenses and other operating expenses, their entire argument falls apart. When I asked them, they privately admitted they knew it was wrong but persisted in spreading this dangerous lie. When a discussion is *knowingly * based on falsehood, nothing else matters. No logic or reason can work. Just politics in it's ugliest basest form. So I don't expect to convince them, but I do want to help give a realistic perspective to well meaning but less informed people who can be misled.

2025/02/28

On the real costs of Bitcoin mining

Someone is wrong on the Internet! A recent article on a website called NFT Evening has been circulating, claiming that it costs $1,986.20 to mine 1 Bitcoin in Ethiopia. This information is outrageously wrong,  by more than 2000%.  Normally I would just ignore such nonsense.  But unfortunately, it is spreading, and many people are getting misled. The misinformation is potentially harmful, so I feel compelled to respond. 


Disclosure:  My company QRB Labs is the first Bitcoin mining company in Ethiopia, and to date the only Ethiopian company. I believe this business is very good for the country, as explained before here and here. 

First misconception: price of energy

So here are the facts (see the footnote at the end of this post for details on the units).
  • The global hashrate, i.e. total computing power of all Bitcoin miners in the world, is currently around 800EH/s. 
  • All together miners earn about 3.2 BTC total every ten minutes. This is the sum of the block subsidy and transaction fees.
  • Thus to get 1BTC , it takes about 800x10^18*600/3.2 = 1.48 x 10^23 Hashes. 
  • Mining is done by ASIC computers which use from about 17 J/TH for the most efficient machines to 35 J/TH for the less efficient ones.  Let's take the mid-point of 26 J/TH.
  • Therefore to get 1BTC it takes about 1.48 x 10^23  x 26 / 10^12 Joules of energy. Converting to kWh,  1.48 x 10^23  x 26/10^12/ 3,600,000 = 1.07 Million kWh. 
  • The price of energy from Ethiopian Electric Power for Bitcoin miners is US$0.0314 per kWh. With Value Added Tax, the total cost of energy is a bit over $0.036 per kWh
  • Multiplying the last two, the answer is $38,480 dollars of electric energy per BTC.
Note that the global hashrate and the transaction fees change continuously but this snapshot gives you an idea of the situation for the last few months. For a more in-depth explanation of how it evolves, see the paper entitled "Dynamics of Bitcoin Mining". 

Hopefully now you understand just how ridiculously incorrect $1,986.20 is. The real number is around $38,000 -- about 2000% more.

Second: energy is not the only cost

A lot of people who have never mined  think energy is the whole cost. This is very incorrect. The price of electric energy is indeed a big variable for miners,  but it's only half of the total cost. You need to add infrastructure and the machines and the operating costs. To take some nice round numbers, let's assume we have 1GW of mining.  
  • First you need to put in transformers, electrical distribution switchboards, breakers, cables, routers, switches, shelves, containers or buildings, air or water cooling systems, etc. This will be about $200M to $300M in capital expense.  Depending on your power supply and demand in your area, and the overall environment, this investment may last 5 years, so as an amortized  expense it would be about $5M per month.
  • Second you have to buy the ASIC computers. At today's price, for 1GW that will be about  $400M to $500M of capex on the computers. These machines will typically have a lifespan of about 4 years. So, amortized, an expense of about  $10M/month
  • Third you have to actually run the facility, including internet access, employees salaries etc. For 1GW, you can assume about $1M-$2M/month.
Put it all together, throw in taxes, repairs, spare parts, logistics costs etc, and you get that 1GW of mining incurs costs about $26M per month in energy and $20M per month in other expenses. With revenues of about $50M to $55M per month. That makes the profit margin 10% to 20%. 

Of course, if the price of Bitcoin drops by 20%, as it just did in the last week,  the mining margin can quickly turn  negative. Conversely, if the price shoots up, then profits go up, but eventually the global competition increases and profits shrink right back. For a more technical explanation, I refer you again to "Dynamics of Bitcoin Mining". Bottom line: mining is a ruthlessly competitive, risky, low margin global commodity business.

These numbers give you a range of what might be the total of the industry in Ethiopia. Bitcoin mining in the country involves a couple of dozen companies, and it reached ~600MW in October 2024, just 9 months after it started. So 1GW gives a rough order of magnitude for the near future. It may sound like easy money. But what it really is: invest $600M-$800M of capital into a country which is risky and difficult to work in, even by African standards. And then pray that you can survive risks. If you do, after a couple of years, you will recoup  your initial investment, and then for another 2-3 years you will maybe achieve a low double digits return on investment per year. It's a pretty tough proposition. The average tech startup is low risk by comparison. Most Western investors can generate that rate of return at much lower risk in traditional areas. To go for it you have to have a very strong dedication to a mission, or an extraordinary level of risk tolerance. 

For comparison, Core Scientific, a publicly traded American miner put out their earnings report just a few days ago. Their electricity cost is $0.024 per kWh and operating costs are $0.009 per kWh. So Ethiopia is actually more expensive than the best places in the US. Considering all the other handicaps of Ethiopia (like extreme import difficulties and high taxes as discussed here), mining in Ethiopia is no walk in the park.

So it's a bit annoying to have ill-informed people with no skin in the game calling for bans, confiscations, price increases or whatnot. If they succeed, not only will our investment be burned, setting a very negative precedent for future investment, but also the country would lose its fastest growing major source of foreign currency. Most importantly, the opportunity to accelerate the electrification of the country could be squandered. This is why it's important to fight this bad information, as stupid as it seems.

Enshittificafion


As Bitcoin miners, turning waste into useful things is kind of our ethos.  So besides correcting the facts as we have just done, it's worth taking a moment to examine how we got here. This is a good case study of enshittification, the gradual degradation of quality in online content.

Consider the timeline
  • On February 3, 2025, a website called NFT Evening posted a typical content-farm article. Full of incorrect data, nonsensical comparisons and flashy tasteless infographics. Some red flags that should alert the reader immediately. Half way down the article it says the current price of Bitcoin is $57,909.16. First of all, that week, the price of Bitcoin was in the mid ninety thousands range, briefly spiking above $100k. The price hasn't been anywhere near $57k in months. Second, why use 7 digits of precision on the price when it changes continuously? Unless you are talking about the real time price at a specific moment in time, like citing a transaction, that makes no sense.  One reason could be that the author is, or thinks the reader is, impressed by the false precision of more meaningless digits. Another explanation is that the article was generated by an AI language model which accidentally regurgitated six month old data. Even the electricity prices are pretty random. They cite a petroleum website as the source. But for all we know, they were harvested from local prices published long ago, multiplied by exchange rates from a different time frame; confusing rates which vary by quantity and industry; or maybe just made up. Another red flag is the author's bio: full of the most cliché keywords like crypto, NFT, DeFi, Web3, AI... Ugh.  That string is not a sign of high quality to put it mildly.
  • On February 20, 2025, BitCluster (a foreign company mining in Ethiopia) posted the story highlighting the number $1,986.20 for Ethiopia. Why? This is a mystery. First of all, again going down to the cent is ridiculous as the precise number would be changing continuously. Second, more importantly, anyone even remotely connected to the real business operations would know the number is ridiculously wrong. Third, to the extent that this number is believed, it could lead to calls for massive increases in electricity price, suspicion from the tax authorities looking for hidden profits, and outright ban. Fourth, if this was true, it would mean BitCluster is gouging their own hosting customers. All things that presumably BitCluster doesn't want. I have reached out to the CEO of BitCluster for an explanation but haven't heard yet. For now, I'm going to assume a drunk marketing intern is in charge of the BitCluster X/Twitter account.
  • On February 24, 2025, the X/Twitter account called Project Mano reposted the BitCluster tweet and went on an unhinged rant about how foreigners are bad for Ethiopia, how this is a national humiliation etc. When we QRB Labs corrected their number publicly, they reached out privately with long justifications for their attack. I asked the person simply if they believe the number $1,986.20. They said of course not. Literally the only data point which underpins the entire rant is false, and they know it!  This was actually a shock.  Honest disagreement is no problem.  Ignorance and innocent mistakes are forgivable. Holding strong opinions without having skin in the game is not great but understandable. But deliberate falsehood, I did not expect. Of course it's normal in politics people lie and convince themselves the ends justify unethical means. But in this context, it may sound naive or strange to outsiders who only hear about "cryptocurrency" and "blockchain" nonsense, but there's a certain idealistic ethos among Bitcoiners. Things like honest money, proof of work, low time preference etc. are taken seriously.  So to see Project Mano engage in pure falsehood and propaganda was a deep disappointment. 
  • On February 27, 2025, the website Addis Insight posted the same article. They literally copy-pasted the entire article from NFT Evening without attribution.  I guess there's no honor among content farms. No research, no credit, no attribution,  just a mindless relentless race to the bottom. It's almost a perfect case study of enshittification. The only thing missing is 2010-style "listicles" about "Ten easy steps for you to profit from this today!" 
  • Shortly after that it started circulating on Whatsapp. The blast radius is expanding. More and more innocent people are being fooled.
It's an amazing example of how bad information can start on one website trying to make money in a quick and lazy way, and then quickly flow downhill from there. As the saying goes, a lie can travel halfway around the world before the truth puts on its shoes.



Notes

1. Units used in calculation:
  • H stands for hash, the calculation miners do.
  • E stands for Exa, which means a quintillion, 1 followed by 18 zeros.  
  • T stands for Tera, a trillion, 1 followed by 12 zeros. 
  •  J is a Joule, the standard unit of energy. Power is in Watts. 1W = 1J/s. And 1kWh = 3,600,000J.
  •  Power is energy divided by time.
2. A quick note on the related topic of asking the Ethiopian government to mine Bitcoin itself. I think it's a bad idea. My reasons are explained in this talk https://youtu.be/sHiN0yTz4BE?si=zMBa7-fL4JteiNYp&t=998 starting at the 16:30 mark. But that is a longer topic which I will maybe cover separately.

3. EEP pricing is not quite optimal in my opinion. To fully align the incentives of the industry and the energy provider with the benefit to the country, it should be dynamic, with strong differentiation based on supply and demand at different locations and times. But that's another larger  topic to address separately.

4. Shout out to Gridless for the Bitcoin dung beetle metaphor and image.

5. In case they get deleted, here are the achive links for
Addis Insight article: https://archive.is/1dLTW
Project Mano tweet: https://archive.is/bMROv
NFT Evening article: https://archive.is/2HDMC

2025/01/23

Datacenter potential in Ethiopia

Where is Africa in this picture?  It's a fraction of the "rest of world" slice.  

A bit of history:  Until the late 2000s, data centers tended to be where the telecom cables were i.e. near big population centers with lots of Internet users. The important internet data center locations were NYC, Northern Virginia, SF bay area, Amsterdam, London, Hong Kong, etc. But as we approached the second decade of this century, energy gradually became a bigger cost than bandwidth so they started developing near power sources. Nowadays, Google and Facebook's datacenters are in places like Iowa and Oregon, far from cities and near abundant supplies of energy. 

This is an opportunity for Ethiopia.  (And it's what my company QRB Labs is focused on).

But two caveats: 
a) latency still matters so they can't be too far from the consumer for some applications like communications and live media. So in the short term, for content hosting, the focus will likely be regional rather than international.
b) for some applications, privacy, data security and intellectual property considerations are complicated, so the data centers need predictable and favorable legal environments. So Ethiopia has some catching up to do before it can really compete in hosting AI and other cloud computing services. But it remains an interesting potential area, especially for the model training portion of AI which is not latency sensitive.

There is one immediate application which is energy intensive, not very latency sensitive and completely location agnostic: Bitcoin mining.  I've written about it at length here, but let's put it in the context of data centers in general. The legal requirements are pretty simple as all the data involved is public and the algorithms are open source. And contrary to common misconceptions,  mining is purely infrastructure serving global users, it doesn't depend on local adoption of Bitcoin or the local financial regulations. So it can be anywhere in the world. The catch is, because it is location agnostic, miners are constantly seeking the cheapest power worldwide. Mining is globally hyper-competitive,  any miner that pays more than the other miners on average will immediately go out of business. So to attract miners power prices have to be very low. In the US, while AI data centers can pay up to $0.10/kWh, and households average around $0.15/kWh, and other industries such as manufacturing tend to be somewhere in between those two, big Bitcoin miners pay $0.02/kWh or less (total cost around $0.04 with half being energy). Of course, power providers will prioritize customers who can pay the higher prices. Thus, the natural equilibrium is that Bitcoin miners tend to buy power that no one else can use, also known as stranded power, and thus average lower price than any other users.

So with the right strategy, Ethiopia has a chance to benefit from the data center boom, selling stranded power to Bitcoin miners while working to develop the higher paying demand.  The highest priority should be for the power company to make electricity pricing be supply and demand-based, with aggressive location-based differentiation.

The second priority should be for the government  to radically reform the equipment import process. Currently this is a huge handicap. Importing data center equipment is a 9 step bureaucratic process. It takes on average more than 6 weeks to process each shipment, not including transportation time. 
  • Security clearance. Each piece of equipment goes through lengthy "pre-import" approval and post-arrival "import release" approval processes. But everyone involved knows that computer hardware doesn't pose any cyber-security threat. Cyber threats are generally software and network based. In fact it's difficult to think of a single example in the world of a national security problem which can be solved by controlling which computers are allowed into the country. To be blunt, it is a gigantic waste of time. The national security interest should be focused on the energy security of the country.  Is the power company planning  the supply and demand correctly? The current approach makes no more sense that limiting the number of light bulbs that enter the country. 
  • Import duty and investment incentives. Capital investments are charged lower import duties. This is an understandable objective. However, the process of qualifying is extremely onerous and often arbitrary. It requires an investment license which creates enormous complexity as I've written about before. Once you start operations you have to switch from an investment license to an expansion license, which has a new set of requirements like minimum payroll etc. Each shipment has to be gruelingly reviewed and approved by the investment commission, by the ministry of finance, as well as customs commission. Besides the inefficiency, the uncertainty is huge. Imagine importing equipment not knowing if the import duty will be 3% or 40% until after it arrives. Any misstep carries the risk of huge penalties, and at worst, the equipment can in theory be confiscated. For a data center, capex efficiency is a life or death matter, so the import risks are high enough to scare away most rational investors. It makes it very hard for a company to grow investment progressively. It would be much better to simply have a constant low import duty, say 5%,  for all equipment and get rid of the investment license. The businesses would be happier, and the government would likely make more revenue from the boom.
  • Customs. Besides security and investment approvals, you have to go through customs. These offices are notoriously inefficient and unfair. To make matters worse, the more they delay, the more revenue they generate. Conversely, if they clear stuff too fast and at a low price, the individual customs agent can be suspected of corruption. This creates a cruel incentive for them to become ever more inefficient. A crucial reform would be to a) introduce the following key performance indicator: total customs revenue divided by average time to clear shipments. Tie it to salaries and promotions of the customs officers and their managers. Those who get the most revenue in the least time would be rewarded. And b) create a public database of assessed value and duties paid for all shipments. (The public database shouldn't have the name of the importer, just the numbers). This combination would help eliminate unreasonable delays and  corruption, as both the importer and the customs agent would be incentivized to quickly agree on the correct value. 
For once, Ethiopia has something that the whole world really needs. It can be the Saudi Arabia of electricity.  (Ok the second time, if you count coffee. But as I've written about before a long time ago, it's tough for a producer to capture its fair share of the coffee value chain). Let's not mess it up! We need the best possible energy pricing and the best import process.

2024/04/25

Bitcoin mining in Ethiopia: the good, the bad and the ugly


In the last few months, media have been buzzing about Bitcoin mining in Ethiopia. For Bitcoiners, it is part of the story of Africa as the new frontier in the much desired geographic diversification of Bitcoin mining - a perspective I agree with. In mainstream Western media, it's sometimes framed as yet another example of China in Africa. That framing, while not inaccurate, I think casts a geopolitical shadow that obscures the national perspective. Others portray it as a desperate attempt by Africans for a "quick fix" to foreign currency shortages -- not false but a bit condescending and missing the bigger picture.  So, let's shine a bit more light on it from the Ethiopian point of view (Shadow, light... sorry I couldn't muster some "dark clouds" to complete the trifecta of clichés!) 

Full disclosure: I'm a co-founder of  QRB Labs, the first company to introduce Bitcoin mining to the country.  We've been quietly working since 2021 to do this the "right way" against tremendous odds.  But this post is not our company's story.  It's a skin-in-the-game opinion about how this industry should evolve for the benefit of the country. To highlight the good it can do. But also the risk of bad, and ugly.

The Good

First let's talk about the positive. Energy in Ethiopia and Bitcoin mining are a match made in heaven. 

In Ethiopia, electricity generation capacity is growing very rapidly. From 2GW in 2020 to over 10GW in the next couple of years. The Grand Ethiopian Renaissance Dam (which I've written about before) is the biggest and most famous step in that growth, but there are many projects contributing to it. All of course phenomenally good. Indeed, practically nothing is better for economic growth and broadly improving lives than electrification.  For comparison, the average Ethiopian has 1/50th the electricity of an American. So, until we get to 100GW at least, another 1000% growth, increasing generation is unquestionably necessary. 

But there's a catch. It is extremely difficult and expensive to deliver that energy to users. In the case of Ethiopia, some estimate that  $10B of investment and years of hard work are needed for transmission and distribution to catch up to generation. In the meantime, up to half of the generated energy remains unused. Which means the investment in generation takes longer to pay for itself. Meanwhile how do you finance the transmission and distribution? It's a huge chicken and egg problem, and it's unavoidable when there is rapid growth.  

In more developed countries, capacity may not be doubling or quadrupling but a similar problem exists with solar and wind power. Huge investments in supply are needed, but the demand may not match up with the supply, since consumption peaks don't line up perfectly with the times when the sun shines or the wind blows.  Whether caused by the difference between the time of generation and consumption, or by the distance, this is the problem of "stranded energy".

Now what if there was a way to make money from stranded energy? In Ethiopia, this revenue could help accelerate electrification! That's where Bitcoin comes in:   

"the competitive dynamics of Bitcoin mining are such that it shifts in time and space to the lowest available cost of electricity. This occurs not just by deploying hardware to various locations, but also by turning miners on or off instantly. This flexible demand-side support makes mining the ideal customer to balance variable supply...."  from "The Dynamics of Bitcoin Mining" by yours truly.

Thus the energy demand profile of data centers that host high energy computations makes them the perfect customer for Ethiopia's stranded energy. Bitcoin even more so than other data applications because: 

  • Bitcoin mining is location agnostic. It doesn't matter if it runs in Antarctica or the Sahara as long as it's connected to the Internet. 
  • It's also time agnostic.  Each hash computation is independent of the previous one. You can mine 24 hours a day, 12 hours a day, at random times. Of course miners, in order to be profitable, must be very good at making the complex trade offs between between energy cost and hardware utilization. But they don't inherently need 24x7 power. 
  • Further, contrary to common perception, it doesn't actually need very much bandwidth. The entire blockchain is still barely more than half a terabyte! 
  • And equally importantly, it's all public data. The entire world can see all the inputs to the miners. So there's no data sovereignty, legal information jurisdiction or cyber security issue.
  • Mining is purely infrastructure for running computers. There's no link between the locations of the miners and the users of Bitcoin. So Bitcoin mining doesn't depend on local regulations about money and financial services, legality of "cryptocurrencies" etc. 
For traditional data centers hosting say streaming video, social media or corporate IT,  cheap electricity is nice to have, but they also require some combination of high bandwidth, low latency, and a compatible legal system for privacy, copyright, finance etc. These are all areas where it is presently tough for Ethiopia to compete globally -- to put it mildly. But Bitcoin mining has in principle no disadvantage running in Ethiopia. 

Further, Ethiopia's electricity generation mix is over 98% renewable. And the other 2% is largely off-grid. So for a data center in Ethiopia, the energy is pretty much 100% "green" hydroelectricity. This is very desirable for the Bitcoin community. Bitcoin arguably doesn't have to be green, any more than ice cream or football. In fact proof of work is one of the most noble uses of energy in the world. But Bitcoin has a lot of enemies who, as I have written about before on this blog. hypocritically or ignorantly use energy as an attack vector.  So "greening" mining is good for Bitcoin globally, and Ethiopia is perfect for that.

So there you have it.  The good is amazing.  Accelerating electrification for economic development of Africa. Geographic diversification and greening of Bitcoin mining.  That is literally the mission statement of QRB Labs. And also why Ethiopia and Bitcoin mining are truly a match made in heaven.

The Bad

But an electricity grid is a very complex beast. You can have too much energy in one place and too little in another at the same time.  When you have too much, it's  a waste. And where there's too little, consumers suffer outages which have negative economic and other consequences. In addition, both excess and shortage can cause costly damage to infrastructure. The best way to balance that is to manage the demand, through price and quantity allocation.

In the case of Ethiopia, while the people at the power company are dedicated to doing the right thing, historically it has not had the independence to manage pricing and demand as it needs to. By contrast, the airline, even though it is also state owned, has a long history of independence, allowing it to mange routes, schedules and prices on a purely commercial basis. This allows it to succeed in an extremely competitive and complex international industry.  But electricity prices have historically been dictated by politics.  Thus, when it comes to the relationship between the energy producer and Bitcoin miners, they don't have the full flexibility to achieve true win-win pricing.  Consumer utility pricing is understandably more difficult to change. But at the wholesale level, the producer should be allowed to make stranded energy cheap, and conversely to charge higher prices where there's lots of demand, whether it is from data centers, factories or households.  

Without modernized pricing from the supplier, the risk is that Bitcoin miners who don't particularly care about the long term of the country can rush in  with demand in the wrong places, and destabilize the grid. Not because they are particularly evil or greedy. But just like water flows to the bottom of a valley, Bitcoin miners will go to where they can get energy at a good price. In this almost perfectly competitive industry, the purest embodiment of survival of the fittest, the typical buyer can't afford to think for the seller.

The only solution is incentive compatible pricing. Rational, non-political, and based on supply and demand. Further, it is crucial that the pricing not be based on the industry, or what the energy is being used for. Electricity is fungible. So price discrimination by type of application never works well. If one industry  gets lower rates than another, it creates perverse incentives, where one will disguise itself as the other, and cause complexity in enforcement. This is also true for Bitcoin mining. Instead, energy should be commercially  negotiated based on quantity, location and time. Let the buyers find their niche. In a fair rational environment, Bitcoin demand will naturally stabilize and benefit the grid, and  monetize excess capacity to help long term electrification. And when the country's transmission and distribution infrastructure is fully developed, when industrial and consumer demand can use all of the electricity being generated, then Bitcoin miners will not be able to pay the same price as factories or households. We should be happy to declare mission accomplished and look for cheap power somewhere else.

Another potential Bad is that Bitcoin mining can easily get politicized in Ethiopia. People who don't understand the subtle win-win dynamics may complain that Bitcoin is taking power from the people. Or based on superficial nonsense about "cryptocurrencies", especially in a bull market, assume Bitcoin miners are rich and should pay high prices. Such interference risks killing the goose that lays the golden egg. If handled correctly, mining is a tough global competition for miners but an easy win for local energy producers. But mishandling could very quickly kill a historic source of revenue.

Initially, the government made the mistake of temporarily blocking Bitcoin mining equipment imports in 2022 while it tried to come up with new regulations. Then in 2023, it implemented rules about Bitcoin mining as "cryptography" rather than "energy". But in fact, mining involves no encryption in the conventional sense of trying to keep information secret. The computation is basically just a hash function with public inputs and public outputs. It's just a race between miners to get the output faster.  (Even transaction validation, which usually is not even on the miner but in the pool, only involves checking signatures which anyone can do -- no secrets). At one point we were even told that only foreign companies could participate in this industry, which is unconstitutional! Fortunately, over the last couple of months, these errors are getting understood and things are moving in the right direction.

The Ugly

An unfortunate side effect of taking the wrong regulatory approach is potential for corruption.  Bitcoin miners are not all idealistic. Even when they are so inclined, competition is so fierce there's always a temptation to look for legal short cuts. On top of that, many foreigners come with a "this is Africa" attitude. Translation: corruption is a natural feature of the landscape. So they try bulldoze their way in with bribery. If it doesn't work, they try the next place. If it works, they exploit it as fast as possible, and when it inevitably blows up, just pack up and move to the next hunting grounds.

For many countries, oil wealth turned into the infamous "resource curse", undermining governance and even being negative for economic development. In the worst cases, it goes beyond bribery to outright theft: taking the energy and not paying for it. This is a danger with Bitcoin for electricity-rich countries too. Kazakhstan, Angola, and some other countries have experienced this ugly side. Fortunately, there's no evidence of this occurring in Ethiopia yet, but it is perhaps the greatest theoretical danger.

The best way to avoid this is for the government to eschew regulatory micromanagement. Rather than trying to control it through hardware imports, or make it political, or treat it as cryptography, or have too many stakeholders at the table, it should allow this industry to naturally find a win-win buyer-seller relationship with energy. This means allowing flexible electricity capacity allocation and pricing.  

The government's focus should be on monitoring the bigger picture: that the energy security of the country is not compromised. So rather than trying to regulate the details of what miners do, the government should require the power company to regularly report on overall high and medium voltage demand by region, generation and transmission capacity, and provide assurances that supply and demand are sustainably managed across all industries and regions.

Conclusion

So there are a few ways things could go wrong. It's important to understand them. But part of me fears that I have given ammunition to the haters. I hope I've struck the right balance.  Reviewing this post, I see I've devoted a lot more words to the good than to the bad and ugly. And that is as it should be.  We face a historic opportunity for two things I care deeply about: Ethiopia and Bitcoin. May both live long and prosper!

P.S. This post is months overdue! And it's too long. To quote Mark Twain: “I didn't have time to write a short letter, so I wrote a long one instead.”

2022/06/03

The 4th wave of Bitcoin FUD

I just came across Why This Computer Scientist Says All Cryptocurrency Should “Die in a Fire”. I can't find any point in there that hasn't already been refuted many times. But it's relatively rare to find so many of them in one place, and it has been going around, so I thought I should make a little effort to rebut it. 

Security

Though not the most important aspect of the article, the "computer scientist" in the title is a not-too-subtle argument from authority, so it behooves us to take a look. The computer scientist in question is Nicholas Weaver, who I haven't heard of before, though from a brief look at his publications, I recognize some of his co-authors. It seems like his expertise is network security. So his most important contribution as an expert would be if he could find an actual technical security problem in Bitcoin. But of course he hasn't, in fact no one has successfully exploited Bitcoin. This is a rarely appreciated aspect of the network. Even though it's the world's largest honey pot, with literally several hundred billion dollars there for the taking, the entire codebase is open source, and all the data is on the public blockchain, no one has actually technically been able to "crack" Bitcoin. There is plenty of theft of Bitcoin of course, because people make mistakes with their keys etc. A scary bug was luckily fixed in the early days. Still no one has exploited the system itself. For any computer scientist, or anyone who has ever written software, this is very remarkable. As a network security expert,  you'd think Weaver would at least mention it. 

Maybe he has motivation for not saying anything positive? Indeed, apparently he's been declaring the death of Bitcoin so many times since 2013 that Weaver has earned a place in the Bitcoin Skeptic Hall of Fame.  It seems like he has dug himself into an anti-Bitcoin emotional trap which is hard to climb out of.

Bubbles

Credentialism aside, his actual criticism consists of economic arguments. He points to the price of Bitcoin in USD and "bubbles" where it rose from $10 to $100 then "crashed". Then to $1000 and crashed. Then to $20,000 and crashed. Then to $60,000 and crashed. And confidently asserts that there won't be a fifth bubble, that this time it's really dead.  But this only inadvertently points to the fact that he's been wrong so many times. Without any coherent explanation of why his previous predictions have failed, it's hard to believe him this time. A more honest view is to zoom out and look at it on a log scale, and notice that each "crash" bottoms out much higher than the previous one. So if one is going to reason purely from historical prices, then a reasonable observer would not confidently say that the last peak happens to be the final one before it goes to zero forever. That's like looking at a toddler learning how to walk and after the fourth time he falls down saying the kid will never walk. A more reasonable take is that if the Bitcoin price chart tells us anything, it's more likely the story of an emergent store of value.   Of course, chart analysis to predict future prices is generally a fool's errand, and even more so with this unique phenomenon. There are not many analogues in history -- we don't have exchange rates of gold from 2500 years ago. It's better to think about Bitcoin from first principles and think about long term adoption while avoiding short term price predictions.   

Adjacent crypto: altcoins, blockchains etc.

To make matters more confusing, most critics (and Weaver is no exception) put Bitcoin in a bucket with all the other cryptocurrencies, ICOs, NFTs etc. But almost all of the other stuff around "crypto" is junk, much of it unethical or even fraudulent.

Leaving aside the many outright frauds, the whole "altcoin" space reminds me a bit of the history of the Internet.  In the 1980s and 90s, TCP/IP had alternatives like ATM (Asynchronous Transfer Mode). A lot argued that the IP network wouldn't scale, or wouldn't offer good enough QoS, etc. They argued that the net would never be used for serious things like the phone network or television. It's true that there are various trade-offs in the design of TCP and IP, even some arbitrary choices. You can argue for different ones in hindsight. And things do evolve, albeit slowly. Witness IPv6 getting deployed in a backward compatible way over more than 2 decades, while IPv4 continues to chug along. Even ATM was absorbed as a short-lived layer 2 protocol under IP. But there's only one Internet. That's the so-called network effect. If the protocol is good enough, early enough, it becomes the standard.  

And that is where proponents and critics of "altcoins" are causing confusion and driving unjustified hostility to Bitcoin. Viewing Bitcoin as one of many "cryptocurrencies" masks a basic reality: Bitcoin is like the Internet of money and it is here to stay.

That said, I'm not against all other cryptocurrencies. For example a broader smart contract platform makes sense long term, and Ethereum may be the one for the ages. But there are significant technical hurdles remaining. And it's already so bloated very few people actually run a full Ethereum node. And that's all before the much delayed eth 2.0 migration, which if it succeeds may introduce a potentially fatal governance change called proof-of-stake. Building a "world computer" as it needs to be is much harder than what has been achieved to date. 

"Blockchain not Bitcoin" is another common theme among "crypto" hopefuls. But without a real reason for decentralization, a blockchain is just an expensive and slow database. Most of the envisioned applications for blockchains can be more easily achieved with traditional databases.

Bitcoin's proof-of-work ledger for sound commodity money is to date the only real world blockchain use case.

Energy and Proof-of-Work

Speaking of proof of work, energy use is the most common and dangerous vector of FUD against Bitcoin, and Weaver recycles the usual points. He claims that Bitcoin miners are "wasting tons of electricity". This topic is deep and generally misunderstood. Here's my attempt to distill it in my paper entitled "Dynamics of Bitcoin mining":

Does mining use too much energy?

This question assumes the system requires some amount of computation to be done and that it ”wants” to minimize the energy to achieve it. That is indeed how most systems work. But not Bitcoin. Proof-of-work does the reverse of that. The system ”wants” a certain value to be spent on energy, and the amount of computation adjusts to achieve it. Of course individual miners compete by being as efficient as possible, but the resulting collective behavior is to achieve a certain cost of energy with variable amounts of computation, not to perform a specific amount of computation with variable amounts of energy. 

This unusual combination – individual participants being efficiency-seeking but their collective behavior being efficiency-neutral – is very counter-intuitive and probably the root cause of much misguided hostility. It’s also worth emphasizing that the amount of energy doesn’t matter, only the cost. If the price of electricity relative to everything else in the world doubles, but nothing else changes, then Bitcoin would simply use half the amount of energy to achieve the same relative cost[...] The cost of energy is a feature not a bug, and ”waste” is impossible by design. All of the energy is ”work”. 

And where there’s no ”waste”, the question of energy use boils down to a moral judgement. Can you argue that heating in the winter, even if perfectly efficient, is not justified and people should move to warmer climates? What about air conditioning, or electric clothes dryers, or ice cream? When is any purposeful energy use justified? Morally, as long as access to and the price of energy is fair, what it’s used for should be accepted as a subjective choice. Bitcoin offers the possibility of inflation-resistant savings, low-cost long-distance value transfer, and censorship-resistant money. For its users, these are important benefits which are no less justified than most other uses of energy.

In the same interview, Weaver attacks the notion that Bitcoin "incentivizes green power", and goes on to misrepresent the incentives, and the supply and demand dynamics of electric power. I covered this too in the same paper:

Many sources of renewable energy are highly variable: solar and wind power depend on time of day and weather, hydroelectric power is seasonal, etc. In general, these ups and downs on the supply side do not line up perfectly with the demand for electricity. Further, even with the largest possible batteries, water reservoirs, etc., electric energy remains extremely difficult to store for later use at a large scale. Thus there is often a lot of ”stranded” energy when using renewable sources. Just like off-peak bandwidth in telecommunication networks, or empty seats on scheduled airline flights, the cost of production is already sunk, and so for the supplier, selling stranded power at any price is better than letting it go unused. [...] The competitive dynamics of Bitcoin mining are such that it shifts in time and space to the lowest available cost of electricity. This occurs not just by deploying hardware to various locations, but also by turning miners on or off instantly. This flexible demand-side support makes mining the ideal customer to balance variable supply, and as variability tends to affect renewable much more than fossil fuel sources, in effect, Bitcoin subsidizes the development of ”green” electricity.

Adoption

Finally, Weaver claims that Bitcoin will permanently fall apart Real Soon Now™, when it runs out of suckers. But there's really no basis for his claim. He doesn't give any reason why the number of suckers is a particular fraction of the world's population and why that limit has been reached now. Why didn't it run out after 1M people? Or 100M? Why not 8 billion people?  

Of course, the success of Bitcoin depends on widespread adoption. Why is gold used as money? You can try to explain it based on some key properties: it's impossible to synthesize, the supply is limited, it's fungible and can be shaped easily, it doesn't degrade... Those are useful, but we don't know if they are sufficient.  The emergence of a monetary good is a fascinating topic, one that most people don't understand and don't even realize that they don't know. ("The Origins of Money", an article which predates Bitcoin, is a good read). Ultimately, Bitcoin is just a Schelling point whose emergence is highly path dependent.That's just a fancy way of saying "we'll see", but every day that passes makes the ultimate success more likely, and it's been almost 5000 days already.