Category Archives: Uncategorized

What Bitcoin Shows Us About How Money Works

There seems to be some longstanding confusion about Bitcoin. Not about how it works; there are plenty of articles which explain that quite lucidly— it is confusion about what Bitcoin represents, and what its role could be. I regularly hear these ideas repeated in seriousness:

  • Bitcoin could one day supplant ordinary currency
  • The decentralized / algorithmic nature of Bitcoin makes it safer than “normal” currency
  • Bitcoin is like gold, and gold is good for counting wealth, therefore Bitcoin is good for counting wealth.

I originally penned this article nearly two years ago (before setting it aside). At that time, it seemed like Bitcoin was a passing fad— I believed then, as I believe now, that Bitcoin’s merit (or lack thereof) doesn’t stem from its popularity (or lack thereof), though the mood around Bitcoin has since entirely reversed.

Bitcoin advocates back then would have dismissed Bitcoin’s slide in popularity as proof of its invalidity, though today they’d probably be just as likely to point to its popularity as evidence of its success. I want to cast aside whether Bitcoin is Hot Right Now, as well as questions about implementation details (like the size and existence of transaction fees, the scalability of the blockchain, or transaction delays), and ask whether the fundamental idea is sound. In particular, I think the assertions listed above reveal some really interesting things about the way money actually functions, and what kind of value Bitcoin actually offers. So let’s dive in.

How Bitcoin works

You don’t need to know a whole lot about Bitcoin to understand its basic premise: You have an artificially scarce resource, which in this case happens to be very large numbers with a special mathematical property. That property is what makes the numbers rare, and thus computationally time-intensive to find. As time progresses, the property is designed to become more and more stringent, so new Bitcoin numbers become increasingly difficult to create. The total number of bitcoins in circulation is fixed ahead of time by the algorithm, regardless of how many people are using Bitcoin; and eventually no more bitcoins will be found. Bitcoins cannot be faked, because anyone can verify whether the mathematical property actually holds or not.

Ownership of bitcoins (or parts of them) can be transferred easily, because a large network of computers keeps track of who gave what to whom. There are more technical details which ensure the security of the whole system, but they’re not important to this discussion. What is important is that it is commonly said that this scarcity is what gives Bitcoin its value. And there are some problems with that.

Is Bitcoin like gold?

People often say Bitcoin is like gold and highlight the fact that, like gold, it’s valuable because it’s scarce, and because other people believe it’s valuable.

I’d like to get a small point out of the way: Mere belief isn’t the sole reason for gold’s value. If everyone suddenly stopped caring about how pretty and shiny gold is, it would still have some utility which could be cashed in on. Gold actually has some very useful properties: It’s conductive, it’s extremely malleable, and it’s chemically inert (making it very resistant to corrosion). Assuming its scarcity remains roughly the same, the value of gold can therefore only drop so far, because if the price went down far enough, it would suddenly become profitable to make all sorts of nifty electronics and corrosion-resistant gadgets out of gold, and demand would stop falling somewhere above zero. (1)We can try to get a crude, first-order estimate of the industrial value of gold by comparing it to copper, which has similar properties. If we assume the practical utility— and thus the demand— of gold and copper are similar, then we can estimate the price by comparing the supply. Extracted copper is roughly 6,000 times more abundant than extracted gold, so assuming similar demand, we’d expect the scarcity of the latter to drive its price to about 6,000 times that of copper’s (current) 20 cents per troy ounce. That puts gold’s “utilitarian” price at right around $1200— which is almost exactly its actual current price. Since gold has some additional utility due to its “wealth density”, one of these might be somewhat mis-priced. Gold’s utility beyond a material yardstick of wealth is one thing that lends some credibility to its value.

This is not true for Bitcoin. A bitcoin is a number, and that number has no utility outside of its ability to be accepted by someone else. Unlike gold, the the minimum value of a bitcoin is zero— its value if everyone stops believing it works. This is one reason why a bitcoin is a risky way to hold assets.

This is a common argument against Bitcoin, and I know what many of you are going to say next:

Well, the dollar is the same way, isn’t it?

Yes, just like Bitcoin, the minimum value of a dollar(2)I am going to use “dollar” for the rest of this article to stand in for an arbitrary unit of traditional fiat money. Obviously everything works pretty much the same way for any other currency; feel free to mentally substitute with yours. is also zero, and a dollar has no value outside of its ability to be “accepted by someone else” in exchange for something valuable. So could we imagine a society where BTC is on the same footing as the dollar? Is popularity the only thing distinguishing the two? If both have no inherent value, what’s the difference?

Let’s talk about where the value of currency comes from

Some people still (surprisingly) believe the value of the dollar is backed by gold. This has not been true since 1971, and that is not going to change, either. The dollar is fiat money, which Continue reading

Footnotes   [ + ]

1. We can try to get a crude, first-order estimate of the industrial value of gold by comparing it to copper, which has similar properties. If we assume the practical utility— and thus the demand— of gold and copper are similar, then we can estimate the price by comparing the supply. Extracted copper is roughly 6,000 times more abundant than extracted gold, so assuming similar demand, we’d expect the scarcity of the latter to drive its price to about 6,000 times that of copper’s (current) 20 cents per troy ounce. That puts gold’s “utilitarian” price at right around $1200— which is almost exactly its actual current price. Since gold has some additional utility due to its “wealth density”, one of these might be somewhat mis-priced.
2. I am going to use “dollar” for the rest of this article to stand in for an arbitrary unit of traditional fiat money. Obviously everything works pretty much the same way for any other currency; feel free to mentally substitute with yours.

12 trail runs under 10 miles in SF and the East Bay

I can’t overemphasize the rewards of starting a running club. About a year ago, I started one nearly by accident— a routine of solo running morphed into a weekly social event. Every Saturday or Sunday five or six of us gather in the mid morning, run five to ten miles, and then have brunch together afterwards. The way I see it, this is a quadruple refill for the soul; a combination of four things that have immense positive impact on your mood:

  • You’re getting exercise
  • You’re being social
  • You’re outside getting sunshine and nature
  • You’re accomplishing something

The delicious food (and, frequently, drinks) at the end of it don’t hurt either.

With that plug out of the way, I offer below a catalog of twelve routes we’ve found over the last year. Continue reading

How to pronounce hexadecimal

This bit from HBO’s Silicon Valley cracked me up:

Some kid is pitching his revolutionary startup idea to entrepreneur Elrich Bachman:

Kid: Here it is: Bit… soup. It’s like alphabet soup, BUT… it’s ones and zeros instead of letters.
Bachman: {silence}
Kid: ‘Cause it’s binary? You know, binary’s just ones and zeroes.
Bachman: Yeah, I know what binary is. Jesus Christ, I memorized the hexadecimal times tables when I was fourteen writing machine code. Okay? Ask me what nine times F is. It’s fleventy-five. I don’t need you to tell me what binary is.

We infer that “fleventy-five” is a hexadecimal number, commonly used in coding; presumably it’s 0xF5 (which is not 0x9 times 0xF, as it happens). But instead of saying “eff-five” for the byte 0xF5, Bachman has come up with some kind of novel system for the English-ification of hex digits.

He’s on to something. We have ordinary English words for decimal numbers, with names based on the digits and their place-value. “Seventy” is the word for two-digit chunks starting with the digit seven, for example. It might appear in the number “seventy-three”, or “five hundred seventy-one thousand”; both numbers with a 7 digit in an appropriate place. “Fleventy”, then, would be the number for two-digit chunks starting with F.

Hex only adds more kinds of digits (the symbols A through F). Could we follow Bachman’s lead and add more number-names for the extra digit symbols, and pronounce hex just like a decimal number? Could we have a system that attains the unwieldiness and syllable count of spoken English numbers, with all the respectable seriousness of saying the word “fleventy”?

I’m glad you asked. This has never been done before(1)probably, but fear not; here are the official new number-words for hexadecimal. You may start using them immediately:

Hex Place value  Word
0xA0 “Atta”
0xB0 “Bibbity”
0xC0 “City”
0xD0 “Dickety”
0xE0 “Ebbity”
0xF0 “Fleventy”

I think it would help to solidify this with some examples:

0xB3 “bibbity-three”
0xF5 “fleventy-five”
0xE4 “ebbity-four”
0xA7 “atta-seven”
0xC5 “city-five”
0xDB “dickety-bee”

Higher place values

But really, we must go further. What about numbers larger than a byte? We have the words “hundred” and “thousand” for decimal place values higher than ten, so why not something for hex place values higher than 0x10? Say, for multiples of 0x100?

For this, I propose “bitey”.

Resulting in:

0xDAF1 “dickety-A bitey fleventy-one”
0xE137 “ebbity-one bitey thirty-seven”
0xA0C9 “atta-bitey city-nine”
0xBBBB “bibbity-bee bitey bibbity-bee”

Naturally, we could make yet larger numbers by devising some names for larger place values, and combine them with intermediate values, in the same way that we compose decimal numbers like “thirty thousand” or “six hundred fifty one million”. As in English, place value names could be dropped if you’re feeling brief. We’ll also need hex-digit words for the “teens”.

Try it

I’ll leave you to explore the new naming system with this toy:

Say place values

How we’ve conversed about hex without a system like this is beyond me. You’re welcome.

Footnotes   [ + ]

1. probably

Improving IMU attitude estimates with velocity data

This was last week’s project: Building a Kalman filter-based IMU.

IMUs (inertial measurement units) are clever little devices which try to estimate an object’s absolute orientation (and sometimes its position) by examining the forces on the object.

Hobby drone and computer input IMUs generally look at acceleration data (which informs where “down” is), compass data (which points toward north in 3D space), and rate gyro data (which tells the axis and speed of spin). “Down” and “north” in combination can give a pretty accurate constraint on orientation, but unfortunately if there are any lateral forces (wind; turning), they will get mixed in with “down” and distort the estimate. Kalman filters use matrix math to make good use of the gyro data to correct for this. However, a constantly-accelerating drone could still be fooled about where down is.

I’ve tried here to find out whether we can try to model the drone’s translation and take this into account when estimating the orientation. It turns out that even relatively poor and infrequent data about velocity can constrain acceleration— and thus “down”— quite well. The difference in the quality of the estimate is plainly visible.

This is all done by mathematically simulating a 3D moving object using ordinary dynamics and battering it with Gaussian random forces, and then predicting what data a noisy sensor might return. A predictor algorithm using a Kalman filter (which has no knowledge about the original state) attempts to recover the true state to the best of its ability. The truth is rendered white here, and the estimate in red.

At the end you can see the same algorithm running on actual sensors. The real thing doesn’t use GPS yet, but the prediction is still pretty decent! (There is not that much sustained acceleration to throw it off in this video).

I’ve done some other cool things with the code which perhaps I’ll write up in the future: Among them are a process noise model based on Gaussian random walks, and a nice extension of it to quaternions (which has dramatic impact on the quality of the estimate!) I also make use of automatic differentiation, which makes a linearized extended Kalman filter (EKF) particularly easy and robust to implement.