Tuesday, June 16, 2015

Do colored coins make 51%-attacks inevitable?

UPDATE: I have updated the post by adding some points from Peter Todd at the bottom. The rest of the post remains as originally written.

I have enough posts on Bitcoin that it should be obvious that I am "pro" Bitcoin. But I am also a skeptic, and I seek out evidence of my beliefs being wrong. It's the only way to minimize mistakes in life. Unfortunately for my Bitcoin fandom, most of Bitcoin's critics either don't understand how Bitcoin works or they don't understand the current banking system well. Or both! But I have just read what I think is the most cogent and convincing critique of Bitcoin's limitations from the Clearmatics blog.

Now, Clearmatics is in the distributed ledger space, and they have a product that competes with Bitcoin. So some might dismiss their arguments as motivated reasoning. But that would be foolish. The argument, evaluated on its own merits, is quite sound.

The core insight of Clearmatic's argument is that colored coins are technically possible but it would be a disaster to implement them at significant scale. The reason is that Bitcoin's ledger is not protected by cryptography. Bitcoin is protected by game theory, and colored coins change the rules of the game.

The Bitcoin network is maintained and verified by its miners. The miners compete against each other to verify blocks of transactions and add them to Bitcoin's block chain. Anyone can set up a miner and start broadcasting blocks though, including fraudulent blocks. To defend against this sort of fraud, Bitcoin's nodes and wallets follow the rule that whichever block chain is longer is deemed authoritative, and to ignore all other block chains. It is merely assumed that miners are too diverse to coordinate a conspiracy against the network, and thus non-conspirators always have more aggregate computing power than any one fraudster, and thus the non-conspirators' blockchain is always longest. Fraud is thus ignored.

This breaks down though if a fraudster ever amasses computing power equal to all other miners globally, plus 1%. If the fraudster's computing power is equal to 51% of more of the global network as a whole, then the fraudster's miners will produce blocks faster than the "honest" miners, and the rest of the bitcoin ecosystem (the nodes and wallets) will switch from the honest blockchain to the fraudulent blockchain. This is called a 51% attack.

51% attacks don't happen though, because the expense of doing so outweighs any benefit. The most recent figure I saw was that the cost of a 51% attack would be about $110 million. Since a 51% attack would destroy the value of Bitcoin itself (the only asset currently on the Bitcoin network), there really isn't a way to extract $110 million from the Bitcoin network before the fraud is discovered and the fraudulent blockchain abandoned by the nodes. Thus a 51% attack is always a money-losing proposition.

There are two scenarios where this game theory breaks down, one of which I have been aware of for some time. One fear I've had for a while is that a government will attack Bitcoin if it's ever deemed to be a threat to their national interest. A lot of Bitcoin's miners are already in China, for instance. If the government there deemed Bitcoin to be a material threat to their capital controls or financial system, it could seize the miners there and coordinate their efforts to assemble a 51% attack against the network. This is a theoretical threat though, and I'm not sure it would ever happen.

Clearmatics' point though is that as soon as you start using colored coins in any serious way, the payoffs of a 51% attack change. For instance, there's roughly 5.8 billion shares of APPL outstanding, so if you assigned one share per Satoshi, you'd only need 58 BTC to list the entire APPL market cap on bitcoin. And that's just one company. Global debt and equity markets have many trillions in value. You could even color Satoshis to represent large blocks of currency (say 10 million USD or EUR each) to handle daily settlements between banks.

At those prices, a $110M investment in taking control of the settlement network becomes profitable. Anyone who can track down the various miners operating the mining pools today can coordinate them into a 51% attack, transfer several billion dollars into various accounts, and then de-coordinate the miners so that the new blockchain continues forward as the "real" one.

Boom. Bitcoin is done for colored coins. The fact that this risk exists at all means no one should adopt it for this use case.

I'm still a fan of Bitcoin for what it is, but as long as this risk exists I don't think colored coins (at least for financial market use) are in its future. Perhaps they're still useful for things like door locks and rental cars, but only because those items are also too small (or too hard to aggregate a theft of) to make a 51% attack profitable. Nakamoto's design-goal of censorship resistance was achieved, but at the price of not being trustworthy with assets of significant value.

UPDATE: I reached out to Peter Todd via Twitter, and he was kind enough to respond to my queries. I think the strongest point he made is that if there is ever $trillions of value on the Bitcoin network in the form of colored coins, that would make higher mining fees possible. Users would still be paying a small percentage of their overall assets for the secure transfer, so that's bearable, and, as Peter put it, 1% of several trillion would pay for a lot of mining security.

On the other hand, in order to get higher fees, the maximum block size has to remain small. Users compete for access to block confirmations by paying fees to the miners. If blocks are too large though, there's no competition to get into them, and users can get away with paying a small fee or no fee at all. In the future as the mining reward of new Bitcoins becomes smaller over time, only miner fees would pay for mining operations. Those fees would have to be pretty high to pay for a secure network. Thus getting to trillions in value exchange is a more-or-less necessity for Bitcoin to be a viable and secure network over the long term.

I don't envy the careful balancing act the core developers must navigate to get there.

Monday, June 8, 2015

Colored Coins are here

Last November I wrote an "explainer" for Coin Center on the topic of colored coins. The basic gist of the article is that Bitcoins are a digital commodity which can be traded themselves and have a market value, but they're also a bit like blank piecea of paper. Any other financial instrument (cash, equity, debt, REIT, etc.) can be printed on them, and then traded via the blockchain. Back when I wrote the article this was more theoretical than practical, but technology and business have advanced in the last seven months. A few items-

NASDAQ has announced an experiment with private company stock on the blockchain. This means that private companies, when they issue shares to employers or early stage investors, will do so by sending the shares to a Bitcoin wallet that is colored coin compliant. The employees can also redeem their shares, or trade them on authorized secondary markets, using the same technology.

Overstock has issued their first debt instrument on the blockchain. The debt issuance this time around is limited to accredited investors, but that's a restriction of the US securities laws, not the technology. If this proves successful as a means of debt issuance, a very large market could be captured by bitcoin.

LHV Bank in Estonia has issued Euros on the blockchain. These bank obligations are supposed to be a cash substitute for local payments, to directly compete with the credit and debit card networks. Although technically not cash (because only the European Central Bank can issue Euros, and they haven't issued any to the blockchain) this instrument is probably most usefully thought of a money market fund share that trades at par. It's 1 Euro. According to the lead developer of this project, this is currently in a test phase with only 100,000 EUR in liquidity.

These are significant developments for the Bitcoin network, and address one of the key issues with widespread adoption. Among the issues that currently put Bitcoin at a disadvantage relative to the card networks or bank payments, are the volatility of the bitcoin price and the need to trade out of the bitcoin network after each transaction in order to have a currency that's commonly accepted in your local economy. With colored coins, both of those objections go away. Colored coins use only a de minimus amount of Bitcoin (fractions of a penny) to mark their value on the blockchain, so their market value is always equal to whatever financial instrument they represent (1 Euro, a $1000 bond, etc.). When you receive 53 Euro via colored coins, you have 53 Euro, and that doesn't fluctuate in your local currency (Euros).

Volatility - gone.

Need to trade off of Bitcoin to get a useful local asset - gone.

Further, colored coins keep the primary benefit of bitcoin transactions, which is irreversibility. When a merchant accepts bitcoins, it's just as much his as if he accepted cash. The customer may seek a refund for some reason, but that refund will be decided by the merchant or a Court of law, not the credit card processor. This produces a great deal of certainty which will be very attractive to merchants. "As final as cash" is a good marketing slogan for merchant adoption.

The two remaining stumbling blocks, as I see it, are privacy and fast transaction time. Let's deal with the second of those issues first.

Credit and debit card networks confirm their transactions fairly quickly, usually on the order of a few seconds (ignoring the chargeback issue). Bitcoin blocks are only confirmed on average every 10 minutes, and you want at least three confirmations to be fairly certain the transaction is accepted. This is probably fine for selling your privately held equity back to your employer, as in the NASDAQ example above, but it's obviously unacceptable for everyday shopping at the grocery store or pub.

Thankfully I think this issue will be solved thanks to the Lightning network. I'm not sure how long it will take the Lightning network to become active, but a lot of the core devs support the initiative and Cuber (the company behind LHV's Euro coins) plans to support it as soon as it's up and running. I consider this "fairly certain".

As for privacy, I'm not sure how to get there. The current network of banks and credit card companies isn't private from the banks or the government; they can see what you're doing. But at least your friends and neighbors can't. On Bitcoin, anyone can explore the blockchain. Here's the transaction for the first Overstock debt issuance, to their CEO. There are Bitcoin tumblers which provide some level of anonymity, but I'm not sure how they'd work with colored coins. You'd at least need a very liquid market in the instrument you're trading for it to work, which I guess is feasible for cash but I'm not sure about the other less liquid instruments. Those may just be a public record.

But be that as it may, I'm quite fascinated by the developments here. Essentially since the invention of banking in Venice, over-the-counter trading has been limited to bearer instruments (rare) or between banks. The idea of regular folks exchanging cash and other assets directly, over the Internet, without any institutional intermediary, and for only a nominal fee (fraction of a cent), is truly revolutionary. Not to be excessively hyperbolic, but this really will "change everything" about finance. It's a very exciting time to be alive.

Thursday, June 4, 2015

Buddy, can you spare a hand?

I was surprised this morning to see breathless headlines that a rat limb had been grown in a lab. I have been following the progress of synthetic organ generation, and to date the most advanced techniques I was aware of could only grow very thin organs like skin or bladder sacs or very small organ tissue samples, such as a small patch of liver cells suitable for drug testing but not transplant. I thought we were at least a decade away from growing full, complex organs such as a heart or kidney, and didn't even have an estimate for when we could grow something as complex as a limb (with all its various tissue types that need to connect to each other in just the right places). The ability to grow a limb would represent a quantum leap in technology.

Thus I was not surprised to learn, upon reading the paper, that they had in fact not grown a limb in the lab. Not entirely.

The chief challenge with growing artificial organs today is organizing the stem cells into the correct 3D shape. After all, an organ isn't an undifferentiated mass of cells. It has veins and arteries and functional systems that all need to be in the right place and aligned properly in respect of each other, or the thing doesn't work and quickly dies.

Currently there are three solutions for the above problem. The first one is to use a 3D-printer to "print" the cells into the correct place. This works okay for small tissue samples, but we haven't figured out how to print anything bigger than a couple millimeters. The second solution is to take a donor organ and wash away all its cells, leaving only the scaffolding (or "intercellular matrix") behind. This scaffolding can then be seeded with stem cells from the donee, and the cells (if cared for properly) will grow into the scaffolding like a vine growing up a trellis, forming a new organ. The third solution is a combination of the first two: 3D-print just the scaffolding, and then seed it with stem cells to grow in place.

This second method is how this rat limb was created. A donor limb was necessary, and then the seeded with cells. The advance (and it is a real advance) is that they were able to get all the different necessary tissues to grow nicely - bones, nerves, muscles, skin, etc. This is a good technological advance, but it doesn't free us from the need for organ donors. Alas.

The good news is that the 3D-printing of scaffolding, followed by seeding with stem cells, is coming along nicely. The most recent advance I could find quickly is the growth of this synthetic larynx. It's a promising technology that one day soon should free us from the need for organ donors entirely. But for now, limbs are still at least a decade away I'd guess.

Wednesday, June 3, 2015

Quantum Phenotype

This post continues a conversation I started on Twitter and Facebook regarding the biological basis of homosexual attraction. I have decided to respond here as long-form writing is really a better medium for discussing complex arguments. My primary interlocutor is JN, and this post will be addressed largely to him, but perhaps others will find it informative.

(Disclaimer: This post contains no political, ethical, moral, or religious conclusions. Any such insights the reader draws from it are their own. This post is simply my understanding of the current science.)

The start of this conversation was my assertion that sexual attraction is hard-coded into human physiology, and that culture/socialization may encourage or discourage our acting on that attraction, but culture cannot create a sexual orientation where none exists in the biology. My analogy for this is diet. A culture can influence what you eat, and how you eat, but only within the limits of a maximum possibility; it can't make you an herbivore. You just don't have the biology for it. JN's strongly held belief is that culture can in fact create homosexual attraction.

As a primary source, JN provided a link to this Columbia University paper which ruled out simple genetic and hormonal models of homosexual attraction, and posited that there must be socialization components to this behavior to cover the explanatory "gap" created by the genetic/hormonal explanations. Their primary reason for believing this was in opposite-sex twins (one boy, one girl) the boy was more likely to express homosexual attraction as an adolescent if he had no older brother, but showed the same odds of expressing homosexual attraction as anyone else if he did have an older brother. The presence of an older brother obviously cannot effect uterine environment or genetics, so the conclusion was that the older brother provided a social role model that guided the boy-twin away from homosexual attraction.

In opposition to this paper, Wikipedia provides a lengthy list of physiological markers which are different between gay and straight members of both genders. There are differences in brain structures, finger lengths, startle responses, handedness, hair-whorl direction, and so forth between gay and straight populations, and in many of these categories the homosexual shows characteristics associated with a heterosexual of the opposite gender. Put simply, there is no way culture or socialization can change the length of your fingers the shape of your cerebral lobes, especially so when this markers are present prior to birth. It is "unpossible".

So where does that leave us? The Columbia paper rules out a simple genetic explanation of homosexual attraction, and the existence of physiological markers rules out culture and socialization.

I believe that the Columbia paper is mistaken in two respects. Firstly, they only measure self-reported attraction, not biological markers. And secondly, they used the wrong model of how genetics work. I don't blame for that though, as the paper was written in 2001 and we have learned a lot about genomics in the last decade.

Firstly, let's dispense with the self-reporting. We've known since the Kinsey Study that as much as 10% of the population may engage in homosexual activity at least once during their adult years. Sexuality isn't an on/off switch between gay and straight; there's a range between the two, with individuals reporting a varying degree of bisexuality. It makes perfect sense that if a person is biologically bisexual (but not strongly so, maybe a 1 or 2 on the Kinsey Scale) that culture or socialization can influence whether they explore those feelings. That would explain entirely how birth order could affect self-reported feelings of attraction.

As for the genetic model, we have learned in the last decade that the old Mendel model of discrete genes is false. Craig Venter (who won the Human Genome Project prize by sequencing his own DNA, along with several others) had this to say about his own genetics:
"I found out that I have a high probability of having blue eyes," the blue-eyed Venter said in a telephone interview.

"You can't even tell with 100 percent accuracy if I would have blue eyes, looking at my genetic code," he laughed. "We all thought that would be simple."
Craig Venter was born with blue eyes. They never changed to any other color at any point during his life. Culture and socialization had nothing to do with it, any more than it did the shape of his nose. But his DNA doesn't say for certain his eyes would be blue either, only that it was a probability. And this is the difference between genotype and phenotype.

Your DNA is your genotype. It says what's probable, but doesn't lock in hard-coded certainties in all respects. All it does it set the beginning state of an incredibly complex and self-organizing dance of molecules that turns two sex cells into a zygote and eventually a baby. But this process is not a fancy clock following set steps, it's a big messy chemistry bath subject to hormonal signals, uterine environment, and pure random chance.

By the time you're born though, the roulette wheels have all stopped spinning. Your cerebral lobes are either symmetrical, or not. Your index and ring fingers are either the same length, or not. There's no going back, and there's no socialization that will change them. To borrow an analogy from quantum physics, DNA is the quantum state of probability that existed before your conception, and your phenotype is the observed result - and thereafter fixed. The only thing society can do is encourage or discourage you from acting on your phenotype's existing and hard-coded predisposition to various behaviors.

Sidebar: What about the Greeks?

This section is primarily editorial in nature, and isn't based on much science (collecting firm data from 2,500 years ago just isn't possible). It addresses the point some people raise about how some societies (such as the Ancient Greeks) saw widespread homosexual activity, far greater than the 10% of the population found by the Kinsey Study to be at least partially bisexual. The argument here is that culture can in fact create homosexual attraction, despite everything I said above. I mean, haven't you read The Symposium by Plato?

Yes, I have. And I don't find Plato to be a trustworthy narrator. Rather than high-minded ideals of love and attraction, I'm reminded more of American prisons and NAMBLA apologists.

Among gays, there is a distribution of individuals who prefer top, bottom, and versatile positions during sex. There's no scientific consensus on what exactly the distribution is, or how culture may effect it, but the existence of these preferences are beyond dispute. I would call them "common knowledge" among the gay community, and I believe my gay friends when they tell me they have such preferences.

No such distribution is observed in the Ancient Greek tradition of paiderasteia. The older male is always the top, and the younger male always the bottom. If these were actual homosexual relationships the reverse would be true at least half the time. The practice of paiderasteia (both in Ancient Greece and in primitive tribes in Papa New Guinea, who have been studied by modern sociologists) is only consistent in my mind with institutionalized sexual abuse. The young men studied in primitive tribes show biological markers of abuse too, even where their culture say it's "Okay" for older men to do those things. They show stress markers, and are not engaging in the practice joyfully. If we had a time machine, I'd bet $1,000 we'd find the same among the Ancient Greeks.

The male sex drive is very strong, and if access to females is restricted (whether by the social rules of Athens, or because the male is locked up in prison, or because he's a shepherd alone with his sheep for weeks at a time), then it will find outlets by other means. The Ancient Greeks are only unique, in my mind, with the lengths they went to to romanticize and justify the practice.