The mechanics of Bitcoin- Blocks, chains and double-spending

Blog 6

Dr. Neeraj Oak continues his examination of why Bitcoin is designed the way it is. In this post, he looks at the concept of blocks and block chains, and why these security features stop fraudsters from spending the same money twice.

Let’s look at another major design feature of Bitcoin- the ‘blockchain’. Why did the designers opt to use this mechanism?

When a user makes a payment to another Bitcoin wallet, the transaction is not immediately executed. Instead, it is put together with many others into what is known as a block, ready to be processed. Processing a block involves verifying that all the transactions within it are valid and consistent, and that no Bitcoins have been spent twice.

Double-spending is a potentially fatal problem for a cryptocurrency; what stops someone from spending the same money twice? Ordinarily, the first person to be promised money should be entitled to it, but if nobody is tracking the history of promises, it is possible to promise the same money to two people, and then indefinitely defer payments by pointing to conflicting transactions in the ledger.

Once a block has been successfully processed or mined, the person who mined it announces the solution of the block. ‘Solving’ a block involves deciphering a mathematical problem that is partly a function of all the transactions in the block, but also contains a random element. This means that the miner must perform a lot of computational work to properly process it. But the beauty of the system is that, once processed, it is easy for someone else to verify that a solution is correct. A good analogy would be trying to open a combination lock. You might successfully guess the combination on your first try, or it might take you all day. But once you know the combination, you can tell someone else, and all they would have to do to check if your combination is correct is to try it on the lock and see if it opens. As such, finding a solution is far harder than checking it.

clip_image002clip_image004clip_image006

If a block is solved, it is placed after a previous block in chronological order; this is called a chain. In the rare situation that two people solve the same block simultaneously (but with different solutions- remember that the problem is partly random), both blocks are initially considered to be valid but parallel solutions. The tie is broken when someone solves the next block, which is necessarily built upon the solution of one of the previous blocks. It is even more unlikely that two people will solve this next block simultaneously for each of the parallel block chains, but if this happens, both continue in parallel until a block is solved for one but not the other. At this point, the longer chain always wins, and the parallel track is discarded. The discarded blocks are said to be orphaned.

The block chain method is a fairly efficient way of solving the double spend problem and spotting fraudulent transactions, but it also has one more feature that helps it frustrate potential attackers.

If someone was very keen on putting through a fraudulent transaction, what stops them from falsifying an entire block in order to cover their tracks? Firstly, it’s a great deal of work, but the system also rather cleverly pits such attackers against the entire mining community in a race they are bound to lose. To see how this works, let’s imagine the attacker wants to falsify a transaction that happened a few blocks ago. The attacker would have to not only falsify the block that transaction’s block, but every subsequent block, as his version of history will only be accepted if it is the longest block chain. The problem is, other miners are solving blocks at the same time, so the attacker would need to solve blocks faster than every other miner put together in order to eventually overtake the size of the largest block chain. This is the equivalent of a 51% attack, and as we’ve seen earlier, this is usually more expensive to perform than the rewards it yields.

Join me for my next post, in which I consider why the designers of Bitcoin chose to reward the people who verify transactions with ‘mined’ Bitcoins.

The mechanics of Bitcoin- Ledgers and 51% attacks

Blog 5

Dr. Neeraj Oak continues his examination of why Bitcoin is designed the way it is. In this post, he concentrates on the concept of a shared transaction ledger, and examines the concept of a ‘51% attack’.

clip_image003

A feature of decentralised systems such as cryptocurrencies is that there is no one entity dedicated to keeping the ‘history’ of the system in order. If one entity did control the history of the system, it would be possible for that entity to, either by incompetence or malfeasance, adjust past transactions. This could be used to steal funds, or make them disappear or appear at will.

The only solution is for everybody to keep the history of the system simultaneously. This sounds like a difficult proposition, but it’s actually quite simple. Every user of Bitcoin maintains a copy of the same ‘ledger’ of transactions on their device, and this ledger can only be updated by public announcements.

To see how this works, imagine someone making fraudulent changes to the ledger on their machine. The next time their ledger is compared to that of another user, the mismatch will become apparent. All the other user needs to do to verify that the person they are dealing with is a fraudster is to compare ledgers with a large number of other users, and to accept the most commonly held ledger as genuine. This means that a criminal would need to include over 50% of the machines on the network to make adjustments to the ledger and get away with it. This is known as a “51% attack”. However, this kind of attack is unlikely to occur for well-established cryptocurrencies such as Bitcoin because the cost of buying up or suborning so many machines into a single criminal conspiracy would be enormous. Indeed, such an attack hardly seems worthwhile, as it’s unlikely to obtain more money than it costs to perform. This may not be the case for smaller cryptocurrencies which have low market capitalisation. However, once it becomes known that a currency has been compromised, it becomes worthless very quickly, so 51% attacks on these currencies don’t seem worthwhile either.

An interesting side effect of this design is that every user of the system has a complete record of all the transactions ever made through the system. This actually has some radical privacy implications that aren’t always made clear. It would be rather like your bank erasing all the names from your monthly bank statements and then handing copies to any criminals, government agencies, friends and neighbours who ask for it. While it doesn’t mean that any of these people can directly exploit the information or steal your money, it would certainly make me uncomfortable.

Join me for my next blog post, in which I look at blocks, chains and the double-spending problem.

The mechanics of Bitcoin- decentralisation

Blog 4

Dr. Neeraj Oak explains the motivation behind the design features of Bitcoin, considering why Bitcoin is built the way it is. In this post, he concentrates on the concept of a decentralised cryptocurrency, and the implications it has for the users – and abusers - of Bitcoin.

clip_image002

There’s been a great many attempts to explain the underlying mechanism behind Bitcoin, from both a technical and user perspective. Some of these are rather excellent; I can hardly compete with such succinct summaries. What I will do instead in this post is to explain why the creators of Bitcoin made the choices they did when designing the payment mechanism we see today.

Let’s start with the defining feature of Bitcoin (and most other cryptocurrencies), decentralisation. Why is it important to decentralise the way people pay?

In essence, a payment is simply the exchange of one good for another. In the simplest form, this is just barter- Alice offers Bob one goat in exchange for one cow. But what happens if Bob thinks his cow is worth more than one goat? For Alice, having to pay one-and-a-half goats would be impractical… and messy. Here is where currency comes into the picture. Currency allows for a greater subdivision of value, and currency can be stored cheaply and exchanged for practically anything. But the value of the currency is just a useful fiction. For that fiction to achieve universal recognition, it requires people to choose to believe in it- and one shortcut to achieving this is to have the currency backed by a powerful entity such as a state or financial institution.

clip_image004

Another problem with barter is that, once complete, it cannot be easily reversed. In our earlier example, Alice would have to find Bob again and convince him to exchange the items again; this would take a significant amount of time and work. To counter this, banks and financial institutions (FIs) offer to be third parties in the transactions. They hold currency for a transaction ‘in escrow’ for a period to allow either party to change their minds. In return for this, they charge a fee, usually as a percentage of the transaction. In the times before fast person-to-person communications and digital money transfers, the bank or FI could also offer the service of connecting distant parties.

It should be noted that there is no fundamental reason that a transaction requires a third party to mediate it. Exchanging cash in person with a stranger is perfectly legal, if not always advisable. In a world where information can be transferred quickly and cheaply between individuals around the world, it was the view of the creators of Bitcoin that currency should be no different. Further, they saw the fees levied by third parties as unjustified, as the services they offer should be seen as optional extras instead of integral to the transaction.

Decentralisation cuts out the third party FI and allows the payee to quickly identify the recipient and transfer money, forgoing the escrow and transaction validation carried out by the banks. Escrow services are possible for cryptocurrencies too, and for now are predominantly free to use.

But choosing to decentralise the system has the side effect of removing any security checks made by the third party FI. Some of those checks are mandated by governments who are concerned about how funds are being used within their borders. Governments are therefore innately distrustful of decentralised systems, as it can be extremely difficult to verify that no laws are being broken, and even more difficult to track and punish criminals. Given a choice, a government would much rather deal with a financial institution as it saves a great deal of effort.

Join me for my next blog post in which I look at how the designers bypassed third-party financial institutions… by handing a list of every transaction ever made to anyone who asks for it.

Bitcoin: The coin that launched a thousand coins

Blog 3

Dr. Neeraj Oak examines the history of Bitcoin, and looks at the connection between price and publicity for this ground-breaking technology.

Wiser heads than mine have examined the history of Bitcoin, from the initial registration of the Bitcoin.org domain on August 18th 2008 to its more recent price volatility and regulatory concerns.

In this blog, I’d like to highlight a few of the events that I think are the most notable, mainly due to the effect they’ve had on how potential consumers and investors view Bitcoin. As I do so, I will also mention what effect each event had on the closing price of Bitcoins on that day.

After its initial foundation, Bitcoin continued almost unnoticed by the wider world. For instance, the first time any noticeable number of people typed ‘Bitcoin’ into Google was February 2011. And even then, it barely scraped a search intensity score of 1/100.

Around this time, the infamous drug black market, ‘Silk road was founded. Silk road offered users a selection of drugs, pharmaceuticals and chemicals, and protected both buyer and seller from prosecution by using Bitcoin wallets to make payments. Since neither party needed to reveal any personal information to obtain these wallets, transactions were, at the time, practically untraceable. Being something of an open secret, Silk Road’s foundation didn’t have much of an effect on the price of Bitcoin, which oscillated between $0.3 -$0.5 in this period.

Litecoin, an early and influential alternative cryptocurrency was established in October 2011, while the price of Bitcoins was between $2- $5. Litecoin has become the biggest ‘Altcoin’ in circulation today, with a market capitalisation of around $320 million. The emergence of new alternatives to Bitcoin would speed up after this point; at the time of writing, there are over 300 cryptocurrencies in circulation worldwide.

In September 2012, Bitcoin made its first move towards mainstream acceptance with the establishment of the Bitcoin Foundation, a lobby group whose aims were to "standardize, protect and promote the use of Bitcoin cryptographic money for the benefit of users worldwide". Bitcoins were worth between $9- $13.

Bitcoins continued their upward trend in price, albeit with a few wild lurches up and down. The Winklevoss twins, of Facebook fame, filed the bitcoin trust on 1 July 2013. Up until this point, Bitcoins were viewed as a very high risk venture, beyond the tolerances of mainstream investors. The Winklevoss vote of confidence marked the start of a trend in which wealthier investors began to put some of their money into bitcoins, albeit by indirect means. Bitcoin prices rallied briefly, but in fact fell 31% over the next 5 days.

Remember the Silk Road? The FBI certainly did. On October 2nd 2013, they raided and shut down the online drug bazaar, causing a temporary dip of 20% in the Bitcoin price; it more than recovered within a week.

On October 29th 2013 in Vancouver, the first ever bitcoin ATM opened. At last, users of bitcoin could transfer conveniently between fiat money and bitcoins. Over the next week, prices rose 17% to around $240.

By this time governments around the world were giving serious attention to Bitcoin and cryptocurrencies in general. On 19th November 2013, a US senate committee heard strong praise for Bitcoin, describing it as ‘legitimate’, but also conceding that it had been ‘exploited by malicious actors’. Bitcoin prices rallied strongly, more than doubling to a peak of $1147 over the next 2 weeks.

But what goes up, as the old adage says, must come down. In this case, spectacularly. On December 5th 2013, China effectively banned Bitcoin, as its central bank barred financial institutions from handling Bitcoin transactions. Over the next two weeks, prices almost halved to a low of $522.

Norway made its mark on the history of Bitcoin on December 13th 2013. It declared that Bitcoin should be taxed like an asset, which has significant tax ramifications and could change the equation for large-scale Bitcoin miners and retailers. Prices fell after this announcement, but this could be partly attributed to China’s ruling earlier that month.

Warren Buffett has been a respected commentator on the business world for years, and his statement against bitcoin on 14 March 2014 appeared to deal a significant blow to investor confidence in Bitcoin. In an interview, he was quoted as saying ‘Stay away from it. It’s a mirage basically’. Prices actually rose the next day, but within a month they had nearly halved to around $300.

Further tax rulings and clarifications have been made by the UK (3rd March 2014) and the USA (25th March 2014), with mildly negative responses from Bitcoin prices.

Finally, I’d like to highlight one important landmark in the acceptance of Bitcoin by online retailers. Overstock agreed to accept Bitcoins on January 9th 2014. With an annual revenue in excess of $300 million, Overstock’s faith in Bitcoins may well cause other retailers to follow.

clip_image002

The chart above is a good guide to the most volatile years of Bitcoin’s existence. On it, I’ve drawn the closing price of Bitcoin at each day for the last 3 years (blue line). I’ve superimposed this with an index (from 1 to 1000) of the number of Google searches made for the word ‘Bitcoin’, where the higher the index, the greater the number of searches. This forms a useful proxy for the publicity, or at least the public interest in Bitcoin. Looking at this chart, a few interesting points stand out.

Notice that spikes in Bitcoin prices correlate very well with publicity in the period up to 2014. Indeed, they appear to coincide almost perfectly. As a scientist by training, I feel obliged to point out that correlation is not causation, and that publicity could just as well be a symptom of rising prices as a cause. But it’s hard to deny the link between them.

However, in 2014 this link appears to have broken down. Indeed, peaks in publicity appear to occur more often during price minima. How should we interpret this sudden change?

Partly, I think this is a sign that the novelty stage of cryptocurrencies is drawing to a close, as larger firms move into the space. By now, the bulk of the population may also have had a chance to become acquainted with cryptocurrencies due to extensive media coverage.

It could also be explained by the predominance of speculation in cryptocurrency markets- perhaps people just aren’t surprised any more when Bitcoin leaps in value, or comes crashing down.

Whatever the cause of this breakdown between the correlation of publicity and price, it opens up a significant opportunity; when prices aren’t sensitive to daily news, it might be possible to introduce reforms to Bitcoin without debasing its value.

Join me for my next post, in which I look at the mechanism through which Bitcoin operates.

 

 

 

Meet Shift Thought at:

image

What is cryptocurrency?

Blog 2

Dr. Neeraj Oak offers a definition of a cryptocurrency and looks at the many types and flavours of cryptocurrencies available today.

The growth of cryptocurrencies has been much too fast for definitions to keep pace with. That said, practically all cryptocurrencies can be said to share one key characteristic: decentralisation. But what is decentralisation, and how has it created such a potentially disruptive business model?

The traditional way of making non-cash payments is through a bank or financial institution (FI). These organisations provide a service as a central, trusted authority that guarantees the transaction in exchange for a fee.

clip_image002[4]

Cryptocurrencies avoid using any central authority to route transactions by sending money directly between ‘wallets’. These wallets contain some quantity of the cryptocurrency, and possess a public and private keys. The public key can be thought of as an account number- a unique identifier that is visible to others and through which currency can be directed to you. The private key is more like a password, and is necessary to gain control over your wallet.

 clip_image004[4]

Transactions are made peer-to-peer, as wallets may transfer messages to one another over the internet instructing each other about the time and value of transactions. This cuts out the need for a central authority and the associated fees. On the other hand, transactions cannot be reversed in the decentralised model; it’s rather like paying in cash to a complete stranger.

Cryptocurrencies also share many similarities in the way they maintain a ledger of transactions, a vital requirement in keeping transactions secure. I’ll cover this in greater detail in a later post, but it’s important to note at this stage that it is vital for cryptocurrencies to make sure users can’t use the same money twice.

Beyond decentralisation, the number of types and flavours of cryptocurrencies is vast. Each cryptocurrency sets out its benefits in a subtly different way in order to stand out and attract new users.

Looking at the advertising messages of the top 15 cryptocurrencies, I’ve created an index that shows the attributes that each try to emphasise to their prospective customers. This is shown in the column chart ‘Importance of attribute by currency’.

image

It’s clear that each cryptocurrency sees its appeal differently. Some, such as Peercoin and Blackcoin set out their product as being more environmentally friendly due to the lower computing power costs they require. Others such as Dogecoin appeal to users through a fun, community-focussed message. However, one needs to look at the trends in the advertising messages too.

clip_image008[4]

The diagram ‘Weighted importance of attributes for top 15 cryptocurrencies’ was created by aggregating advertising messages of all of the top 15 cryptocurrencies. Surprisingly, cryptocurrencies seem most keen on appearing to be a convenient method of transferring money. It’s also clear that security is seen as a primary concern of prospective customers.

The ability to transfer money cheaply across long distances is also emphasised by most cryptocurrencies. This is an especially useful attribute for users who need to move money across borders, where government fees would otherwise apply.

Of late, cryptocurrencies have acquired a reputation for providing an anonymous service that circumvents financial and legal barriers. Few of the largest cryptocurrencies seem willing to emphasise this point further, as they perceive it as a barrier to their ambitions of moving into the mainstream of online payments. That said, some cryptocurrencies such as XC and Darkcoin heavily emphasise these attributes; it’s possible that this strategy will win over ‘ideological’ adopters of cryptocurrencies, who value a more libertarian way to pay.

Join me for my next post “Bitcoin: The coin that launched a thousand coins”, in which I look at the history of the world’s first and largest cryptocurrency.

The rise of cryptocurrency

Blog 1

In this series of blogs, I will examine the global cryptocurrency economy, looking at its history and technical design, the many types of business models that have sprung up to make use of it and what the future might hold for this new and potentially disruptive concept. I will examine cryptocurrencies from several perspectives, including that of investors and banks, merchants, consumers and governments. Finally, I will consider the fundamental stability of cryptocurrencies, drawing on my background as a mathematician and complexity scientist.

Since 2009, there has been a radical new way of making payments. The creation of the first decentralised peer-to-peer payment system, Bitcoin, has led to the creation of a novel and booming set of payment services- known collectively as ‘cryptocurrencies’. These digital currencies are not created or backed by any government, nor does any one user have complete control over them. Could this become the chief way people pay for goods and services in the 21st century?

 image

It’s clear that cryptocurrencies are an important and rising element in today’s digital economy. At the time of writing, the market capitalisation of the top 10 cryptocurrencies in the world was around $8.69 Billion and growing. But why have so many people invested their belief (and perhaps more importantly, their money) in digital currencies that have little-to-no intrinsic value and no state to back them up?

In the wake of the 2008 financial crisis, the trust in banks, financial institutions and governments has melted away amongst the populations of Europe and the USA; this is especially true amongst the younger, more tech-savvy demographic. It is from amongst this group of people that Bitcoin emerged. A central tenet of cryptocurrencies is to avoid using banks or established financial institutions to route money or accept payments. This cuts out the need for banks as third-party guarantors of transactions, and limits the ability of governments to interfere or regulate payments.

A side effect of removing third-party guarantors from payments is that the new payment method must be decentralised and trust-free. In such an environment, it is considerably easier to conceal one’s identity; indeed, declining to reveal personal information becomes the norm.

Inevitably, by providing a means of making payments secretly and without government interference cryptocurrencies have become popular with providers of illicit products and those who would rather operate under a cloak of anonymity.

However, there is a significant following of cryptocurrencies who appreciate secrecy as a response to a distrust of governments as a result of the spying allegations made by WikiLeaks and Edward Snowden. Many also feel that the internet should remain free of state regulation, and supporting cryptocurrencies might be a means of expressing this libertarian view.

Finally, the growth of cryptocurrencies has been fuelled significantly by the activities of speculators, who can harness the volatile prices that cryptocurrencies often exhibit to make large profits.

While these groups of people have brought the cryptocurrency industry to its current state, they are unlikely to be able to create a viable and sustainable business model over the coming years without participation from the more mainstream economy. If cryptocurrencies are to become more than just a passing phase, the coming years must see a huge change in the types of users of these services.

Join me over the next few weeks as we look at the history of cryptocurrencies, their business models and technical structures and what the future might hold for this innovative but fragile industry.