Anatomy of a Cryptocurrency

Linda Pelekoudas
Thoughts on Cryptocurrency
12 min readOct 27, 2014

--

Cryptocurrency technology gives us the ability to send or receive something in exchange for products or services quickly, safely, and with reduced fees. The popular explanation of cryptocurrency calls it digital money. Though it can be used in this way, it can also be used in other ways. For example it could record the terms of a contract or a bill of sale of a property.

As a transparent public ledger system it operates with a fixed set of rules that govern how information is transferred between computers. This is called a computer protocol. There are many other computer protocols that we have become familiar with over time. Here are a few examples: TCIP allows computers to network together, HTML allows us to post information that is readable by a browser, and VOIP which allows us to speak to one another over the internet. Each of these was strange and confusing at first, but they have become essential elements in creating our digitally connected world.

Coins are an object with a unique identifier that is acted on by the protocol. The computers linked together over the internet running the protocol are also called nodes, or miner machines. Combined these computers create a decentralized network. This network utilizes decades of computer science, cryptography research and process mechanics efficiencies making the sharing of transaction information is made more secure than ever before.
In order to utilize cryptocurrency several things need to be brought together: keys a wallet, some coins. It is really not as hard as everyone makes it sound, but for many these things will be new and somewhat unfamiliar ideas The good news is that it is not necessary to fully understand the inner working of the technologies in order to successfully take advantage of the benefits that cryptocurrency offers. Having a working understanding of the central elements, like the ones described here, will help to make sure that all participants are able to make informed decisions and choose actions that protects their privacy and security.

Coins

“Coins” are a unique identifier. This identifier could be compared to a serial number, like those found on most fiat currency. It is an instance of software just like a document or a spreadsheet or a picture on your computer or phone. To protect the coin owner’s identity, each coin is coupled together with an owner’s set of cryptographic keys. This encryption is meant to protect the coin from being used by another person without the owner’s permission. The value attributed to these identifiers will vary from coin to coin since they are all based on different principals in their unique business models.

The first instances of coins are today referred to as 1.0 versions of the technology. Bitcoin, being the most widely known and recognized of these 1.0 currencies, but there are other alt coins which are also 1.0 coins. Between 2013 and 2014 a new innovations in cryptocurrency were introduced and bring about the notion of a 2.0. One of these, Mastercoin protocol, is an extension of the original technology on which Bitcoin is based. It includes a smart property feature, among others, which allows for the creation of a new coin property. Coins that are created from a smart property contain a unique identifier made up of three primary elements: 1) property type which are either indivisible or divisible, 2) the property name, 3) the total amount. Coins produced using the Mastercoin protocol are not mined. They are generated as a batch of tokens each containing a unique currency identifier which can then be transferred or traded as they are treated just as another currency.

Keys and Wallets

A fundamental of cryptography is that information that is protected by encryption can subsequently be unencrypted by and authorized individual in order to access the original information. This is accomplished in most strategies with a public private pair of digital keys. An example of this is how Verisign works today. One is used to apply the encryption the other is used to unencrypt it. Cryptocurrency uses this strategy to protect the unique identifiers or coins.

In order to initiate or receive any transaction there must be a set of credentials, often referred to as a wallet containing two sets of numbers that make up the private signing key and the public verification key pair. The private key should be carefully protected because it is the portion that authorizes the sending of any balance to another account. The public key is the one that is shared so that the transactions made or received can be verified by the network.

Many sets of these keys can be stored in a wallet and it is possible to have many wallets which when combined contain the full set of coin credentials that an owner possesses. This makes it possible to take advantage of wallets that are web-based, mobile applications, or even paper.
In order for a transaction to be created, it must be assumed that somewhere in the open market an agreement was made to trade products or services for currency. This contract for purchase could be for any amount for almost any reason. To the network, they are all the same. This agreement is recorded in the form of an amount to send, an amount to receive as change if any, and the amount to pay the processor. The payment to the processor is a transaction fee. To better understand the mechanics of this lets explore the signing process, the verification process, inherent fraud prevention measures, fees, and how this all becomes recorded in an open transparent ledger.

Message Instructions Signing Process

The message containing the transaction instructions is signed and locked with the private key from the sender of the message. This is attached to the message the two combined becomes a transaction.

Verification Process

In traditional financial systems, centralized authorities are in place to validate transactions. In Cryptocurrency this is replaced by a decentralized network of individual machines formed with peer to peer connections. In order for something to be “true” a majority of the connections need to agree. In the open ledger of cryptocurrency, it is the miner machines in the network that perform the verification check to ensure that coins spent have not already been spent somewhere else. This is by design to prevent double spending. The timestamp included with each transaction is the deciding factor in preventing double spending in the system. These miner machines contribute by collecting and processing all the transactions they see and reporting the verification results.
Three things are needed to verify the message contents:
1. The message
2. The senders digital signature and,
3. The sender’s verification key which is the public portion of the sender’s key pair

The message can be of any size. It can contain one or more instructions that make up the message. No matter how many instructions are contained in a message or what additional information is appended to it, the result that is sent out will be a set size. It is packaged in a similar way that a letter is placed in an envelope. The result is a short digest of the message and the keys so that the message can be read later by the person holding the private key.

The network of miner machines picks up these digests of the transaction events and combines them with other digests. The process is again repeated to produce another fixed size envelope of information. If the process was reversed and all the messages were opened the total nature of all transactions messages both new and old would be revealed. It would also identify who digitally signed them based on their public key. The links between one block and another forms a chain. All of the unique transactions are grouped into something called a transaction block. The transaction block is broadcast over the peer to peer network where it is reviewed and verified that it contains the correct information.
The network nodes will only accept as correct the block that contains the greatest proof of work value. Chaining blocks together makes it impossible to modify transactions included in any block without modifying all succeeding blocks. As a result, the cost to modify a particular block increases with every new block added to the block chain, magnifying the effect of the proof of work.

In other cryptocurrencies a different strategy called proof of stake is utilized. That strategy follows very different rules to accomplish the same validation objective. These different strategies are described in more detail below.

Fees

There are several contributions that when combined add to the total fee paid to the processers or miner nodes of the cryptocoin transaction system. Typically transaction fees are paid based on the total byte size of the signed transaction. It is a combination of the included fees attached to each transaction sequence paid by transactions included in the block and the generation block subsidy which miners are allowed to attach to the first transaction in a batch. This is called the block reward.
To each transaction sequence there is a fee added to the total transaction that incentivizes the node network to validate the transaction details. Any difference between the transaction’s inputs and outputs is calculated as a transaction fee. Payment of this fee is awarded only to the node that successfully produces a proof that satisfies the challenge that was produced by the combination of the end result of the previous processing and the result of the new transaction process.

Transaction Priority

Each miner chooses the minimum transaction fee they will accept. By default, miners reserve 50 KB of each block for high-priority transactions, that spend satoshis (the smallest unit of the Bitcoin currency — 1/100,000,000 BTC or 0.00000001 BTC) that haven’t been spent for a long time. The remaining space in each block is typically allocated to transactions based on their fee per byte, with higher-paying transactions being added in sequence until all of the available space is filled. Transactions which do not count as high-priority transactions need to pay a minimum fee (currently 1,000 satoshis) to be broadcast across the network. Any transaction paying only the minimum fee should be prepared to wait a long time before there’s enough spare space in a block to include it.

Transaction Ledger Registration Strategies

There are fundamentally two strategies in use that result in the registration of transactions in the decentralized ledger we call a block chain. It is the strategy that determines what needs to be accomplished by the node network in order for a block to be added to the chain. Each has pluses and minuses. The Bitcoin block chain is a proof of work based process. Many alternate coins are either a proof of stake process or a merging of both processes to achieve validation of transactions. In each strategy a set of risks are actively addressed. These include: double spend fraud prevention, network dominance control, sender verification, reordering or rearrangement of entries, usefulness of effort, and efficiency of resource usage. With the advent of protocols that extend cryptocurrency it is important to understand the state of each of the strategies and to maintain awareness of new developments as they are introduced, since there is the potential in some 2.0 cryptocurrencies to replace the underlying transaction management as the technology advances.

Proof of Work

In a proof of work strategy the miner must create a hash of the block header which does not exceed a certain value. It is based on a secure hash algorithm referred to as SHA256. The computation presents a result which is known to be hard to compute but easy to verify, and by verifying the solution one can be assured that the solution provider performed the correct computational work to generate the result. Many feel that this proof of work is highly wasteful mainly due to its resource consumption. This is best exemplified when the size of the effort is considered. There are roughly six hundred trillion SHA256 computations being performed by the Bitcoin network every second. The only purpose is to solve proof of work problems that are made to be so hard that malicious attackers cannot easily pretend to be millions of individual computers and overpower the network.
The block reward for a successful proof of work solution is 25 BTC paid to the miner in newly minted coins. It should be noted that these coins have “spend restrictions” that are tied to the acceptance of the solution cementing it into the block chain.

Proof of Stake

Proof of stake provides an alternate mechanism of determining who signs bitcoin transactions and the authenticity of the lineage of the coin identifiers in the message. It is thought to offer one way of changing the miner’s incentives in favor of higher network security. A proof of stake system requires the operator to show ownership of a certain amount of money.

Though each implementation of proof of stake can be constructed uniquely, an example of one in use follows: When creating a proof of stake block, a miner needs to send some money in their possession to themselves as well as a preset reward. This creates a “coinstake” transaction. A proof of stake digest is calculated based only on the transaction input, additional fixed data, and the current time represented as an integer that equates to the number of seconds since January 1, 1970. This combination of information is then checked against a requirement that is inversely proportional to the “coin age” of the transaction input.

Coin age is defined as the size of the transaction input multiplied by the time that the input has existed. Some coins set a maximum age a coin can have, after which time the coin does not age further. Because the proof is based only on the time and static data, there is no way to make solutions more quickly by doing more work; every second each transaction output has a certain chance of producing a valid work proportional to its age and how many coins it contains, and that is that. The impact of this is that every coin can act as a simulated mining engine, with the interesting attribute that its mining power goes up linearly over time but resets to zero every time it finds a valid block.

Fraud Prevention

Someone attempting to double spend coins would create a fork in the chain. The fork results in more than one version of history present where one is legitimate and the other is not. Since the rules of the protocol require each block to contain the proof of work puzzle solution, this presents a problem for the fraudulent transaction. The generator of such a fraudulent transaction must be able to produce a correct proof of work solution on its own. At the same time, the acceptance of a block in the chain is progressing steadily at the rate of roughly one every ten minutes. The longer chain with the progressively developed proof of work solution makes insertion to defraud the process unachievable since only the longest chain is considered trusted. An additional problem in the double spend scenario is that even if a longer chain was produced in which a fraudulent transaction is listed, it would not contain the initial transaction where the coins were previously spent, resulting in a wasted effort to double spend a coin.

The total computing power of all the honest nodes in the network exceeds the power any single source could bring to bear in solving not one but multiple proof of work results that are successful. Additionally, the network makes it more rewarding to apply that power to legitimate mining versus any attempt at out running the network as a whole.

In Summary

Learning the fundamentals of coins, keys, transactions and the processing of those transactions are central to making informed decisions when using cryptocurrencies. It may help to take a page from history to better understand the introduction and adoption of new vehicles for payment. Credit cards were first introduced in the United States in the late 1800’s when consumers and merchants exchanged goods through the concept of credit. Steadily over time the industry grew and became a global norm. Cryptocurrency is a leap from the familiar plastic plate many carry, but it is much more accessible for those who may not be able to participate in the systems to which others have become accustom. The steady adoption of smartphones and other highly portable devices is accelerating the impact and usability of cryptocurrencies. Much like that time in the past when things like credit cards were new to the general population cryptocurrency can be expected to undergo changes. While this is something to expect we can all recognize that it has matured in the new 2.0 versions making this a good time to begin using cryptocurrencies. There are clear benefits of a system that embraces everyone equally making it possible to transform our global economies in a similar way that the notion of extending credit did about a century ago.

References:

http://bitcoinwatch.com/
https://bitcoin.org/en/developer-guide
http://bitcoinmagazine.com/6528/what-proof-of-stake-is-and-why-it-matters/
http://www.creditcards.com/credit-card-news/credit-cards-history-1264.php

--

--

Linda Pelekoudas
Thoughts on Cryptocurrency

Strategic thinking: Customers, Relationships, Partners, Channels, and Products Tactical actions: Analysis, Process, Systems, Technology.