Thursday, August 18, 2016

Cryptocurrencies

Cryptocurrencies are digital currencies which derive their value from computing costs. The most well known cryptocurrency is Bitcoin. Nowadays, a Bitcoin is equivalent to nearly $600 - a big change from when they were equal to a cent.

Every cryptocurrency has two main components: a hashing algorithm and a blockchain distribution network. Bitcoin uses SHA-256, which is a common hashing algorithm on the internet. Cryptocurrencies keep a blockchain - a list of every transaction made. These are divided into blocks - each of which contains all of the transactions from a certain window of time. In Bitcoin, there is one block for every 10 minutes. Whenever someone makes a transaction, they first sign the transaction with an asymmetric cryptographic algorithm such as RSA and then broadcast the transaction to the network to be added to the next block. All nodes on the network keep their own copy of the blockchain and synchronize with other nodes.

But what stops people from changing the transaction record? And where do the bitcoins come from? The answer to both questions are the same. After a block has been created, people attempt to "mine" it. The process of mining involves first appending a random number to the beginning of the block and then hashing it. If the resulting hash is lower than a certain number, the network will grant the miner a certain amount of cryptocurrency - 25 bitcoins in the case of bitcoin (which is presently over $14 thousand). This number is called the difficulty. Every 2016 blocks, the difficulty is adjusted proportionally to the amount of time taken to mine the blocks with the goal of making it take 10 minutes per block.

Anyone can mine bitcoin with almost any computer, but it is difficult to become profitable. Because it will take an extremely large number of hashes on average in order to get a block, it will take a large amount of core-hours to mine a block on a CPU. At that point, the cost of the energy used by the CPU would be greater than the reward - so you would lose money. CPUs lose profitability when outcompeted by GPUs - Graphics Processing Units. Graphics processors take longer to complete a hash, but can do thousands of hashes simultaneously. And then GPUs were outcompeted by FPGAs. FPGAs are Field Programmable Gate Arrays - microchips containing sets of logic gates connected to switches - so that they can be arranged to act as any digital circuit (within the limits of the FPGA). They can be configured to create hashing circuits which are much faster than GPUs and use less energy. But afterward, ASIC chips - Application Specific Integrated Circuits. These are microchips that serve no other purpose than mining cryptocurrency. These are extremely expensive to purchase, but they are presently the only way to make money off of bitcoin mining. People set up giant collections of ASICs called mining farms. Below is a picture of a bitcoin mining farm in Iceland:

Bitcoin isn't the only cryptocurrency. After bitcoin became run by ASICs, Litecoin was created as an ASIC-proof alternative. Litecoin is run by ASICs, but there is a much smaller margin relative to GPUs, and prices are much lower - under $4. There is also a joke cryptocurrency called dogecoin. One cryptocurrency with a notable change is Ethereum - which adds "contracts." Contracts are programs on the ethereum blockchain which can store data and do automated and reliable transactions.

No comments:

Post a Comment