In its purest form, cryptocurrency is simply digital currency that is decentralized and not backed by any governmental body. Cryptocurrencies exist purely as lines of code which have monetary value.
According to Merriam-Webster, a currency is ‘a common article for bartering’. In modern times, this term is largely synonymous with physical money in circulation, such as coins and notes. Nowadays, cryptocurrency is increasingly popular as a currency as well: you could purchase physical commodities such as gold using a cryptocurrency like Bitcoin.
Rather than holding coins or notes, the general public has become increasingly comfortable with using cards and online transactions, where their cash is stored as numbers online. Paying for items results in a deduction, and getting paid results in an increase. This is all monitored and controlled by a central authority, such as a bank. There is an inherent ‘trust’ required for this to work: each individual trusts that the bank records every transaction accordingly, and any mistakes will be redressed.
Cryptocurrency is also digital; it can only be transacted online. They are also stored in cryptocurrency wallets, which are created specifically for storage of this digital currency.
Here is where the main difference lies between cryptocurrency and regular currency. Rather than a trust based system, cryptocurrencies employ a ‘trustless’ system via a decentralized ledger.
A decentralized ledger is a record that is not stored by a central authority, but is instead distributed across the network with each user. Every participant in the network has a copy of the entire ledger, which is known as the blockchain. Each copy of the blockchain verifies itself against other copies online, and any discrepancies are corrected in accordance to consensus of the blockchain.
This gives the blockchain several characteristics that make digital currency possible.
There is no central authority that is relied on for transactions. Transactions are performed between accounts, and is recorded publicly on the blockchain every few minutes when they are verified. This way, it solves the problem of double-spending, where the same digital currency is promised to different vendors.
By its nature, the more people are in the network, the more secure it becomes. To edit the blockchain, it is necessary to override every single node in the network in the time the system takes to reach a consensus. For a cryptocurrency like Bitcoin, the window of time would be 10 minutes. In Litecoin, the window is even smaller, at 2.5 minutes. Even so, it would destroy the value of the blockchain, which is an added protective measure against blockchain tampering.
Every transaction is permanently recorded on the blockchain, and is publicly viewable by anyone in the network.
That is all that a cryptocurrency is; the usage of the blockchain has allowed a digital currency to be created that is robust, accountable, and prevents double-spending.
How Cryptocurrencies Work
The core of cryptocurrency lies in the blockchain, the immutable distributed ledger that ensures that transactions are legitimate and publicly viewable. Transactions are bundled up into a ‘block’, and connected to the previous block to form a ‘chain’; hence the name.
There are two main ways to verify a transaction, namely Proof of Work (PoW), and Proof of Stake (PoS).
Proof of Work
We will be taking a closer look at Bitcoin for a more detailed understanding of PoW.
For a block of transactions to be verified and added to the blockchain, it requires someone to solve a complex cryptographic hash.
Miners have a key role in this process. They are the ones who spend computing power to verify that the transactions within the block are legitimate through solving these mathematical problems.
A hash function is a mathematical algorithm that turns a string of data (regardless of its size) into a fixed sized length of data, which is known as a hash. The adjustment of a single digit in the initial data input would result in a completely different hash being produced.
The new hash also requires the hash from the previous block in order for it to link up, so there is no way to calculate a future block without having the solution from the previous block. This hash acts as a seal of authenticity: any block that has been tampered with would not be in line with the rest of the distributed ledger.
It may seem difficult for people, but it is relatively easy for a computer to produce thousands and thousands of hashes each second. To prevent this, the Bitcoin protocol automatically adjusts the difficulty to average the rate of solving at about 6 per hour. It does so by requiring the hashes to have a certain number of 0s in front, rather than just allowing any hash to be accepted.
Miners cannot tamper with transaction data in a block, but they have to change the data to create a new hash, in hopes that it aligns with Bitcoin’s protocol. To do so, they add a nonce to the data. A nonce is an arbitrary number that can only be used once, and miners repeatedly change the nonce and re-hash the data to find the solution.
Upon success, a new block containing the recent newly verified transactions, the time stamp, the hash of the previous block, and the address of the miner who solved the problem. The address of the miner will then be awarded with newly minted Bitcoin, as a reward for the effort.
While this method is secure, it does have several problems. The energy required to compute millions of hashes becomes higher and higher the more difficult the problems become. It also means that mining farms which hold specialized equipment just for hashing, have an overwhelming advantage over anyone else participating. This leads to a few main networks that control the validation of transactions. Finally, there lies the theoretical issue of a group of miners owning more than 50% of the network’s computing power. In such a case, they would be able to halt transactions and partake in double-spending while in control of the network.
Proof of Stake
PoS is an alternative algorithm proposed to overcome the problems of PoW. Rather than having miners compete to solve equations and mint new coins, the coins are pre-minted, meaning that no new coins can ever be created. Instead, there are ‘validators’ who confirm these transactions, and instead of being rewarded with newly minted coins, they are paid transaction fees. Here we look at Ethereum’s Casper and Qtum’s PoS 3.0, based on Blackcoin.
Under the Casper protocol, validators put up a certain number of tokens as a stake, which will be forfeited if they verify fraudulent transactions (the exact amount forfeited has yet to be disclosed).
This acts as an incentive for them to verify the right transactions, as they now have skin in the game. The new validator is randomly chosen based on their stake and maturity, which means that the larger the stake, the higher than chance of being chosen.
To prevent the issue of major stakeholders having all the transaction fees, Ethereum is looking into limiting the amount of ETH that can be staked. By doing so, it makes staking more accessible to the masses, and every participant in the network has a fair chance of profiting from transaction fees.
Under Qtum’s PoS 3.0, validators are chosen based on the size of their stake as well as their coin-age maturity. The larger the stake, the higher the chances of being chosen to validate the new block and receive the transaction rewards.
To prevent large actors from monopolizing transaction fees, Qtum’s PoS 3.0 also considers coin-age. When an amount has been staked for 500 blocks, it is removed as a stake and needs to go through the rematuring cycle once again before it is eligible for staking again.
In this way, large actors are rewarded for their stake, but not allowed to gain a monopoly on the system.
Cryptocurrencies are digital cash. While it sounds simple enough, the mechanics that go behind it to ensure that it is secure, able to transact smoothly, and decentralized requires layers of technology under the surface. While an average person might simply buy into a cryptocurrency based on hype, having an understanding of how it works is definitely an advantage.