What is Cryptocurrency?
Cryptocurrency has become extremely popular in the last few years, with thousands of new ones being created and different businesses exploring how they can be adapted to fit their needs and markets. But what is a cryptocurrency? Why is it special? What does it have to do with the “blockchain”?
In this guide, we’ll start by talking about blockchain technology: what it is, how it works, what makes it special, and what new things are possible using it. Since blockchain is the technology that cryptocurrency is built on, it’s an important part of understanding how a cryptocurrency works.
Next, we’ll talk about how a cryptocurrency transaction works. You know that a cryptocurrency is a digital asset that you can transfer via the blockchain. But what does all of that mean? We’ll explain how cryptocurrency transactions work on a basic blockchain and also include a description of transactions on the Lightning Network, a technology built on top of blockchains to make transactions instantaneous and scalable.
Finally, we’ll provide a brief primer describing what everyone means when they say “cryptocurrency mining”. This section is designed to get you comfortable with the what, why, and some of the how of cryptocurrency mining, enough to feel comfortable when you hear the words. Another guide is provided to give a more in-depth explanation of the ins and outs of how mining works in most of the major cryptocurrencies.
At the end of this guide, you should feel comfortable with the basics of cryptocurrencies: what it is and why it was created. You will also be familiar with most of the major terms that you will come across in cryptocurrency discussions or articles and know where in this guide to get more details.
What is Blockchain Technology?
When talking about cryptocurrencies, you hear the word “blockchain” often. It’s even cropping up outside the cryptocurrency space as large companies and even government institutions are developing and patenting different types of “blockchain technology”. But what is blockchain technology? How does it work? Why does anyone care? What can it do that we can’t do now?
Introduction to Blockchain Technology
What makes Blockchain Technology Special?The blockchain is the big new thing and it seems like all industries are looking into how it can revolutionize how they do business. But what makes the blockchain so special? In this section, we’ll talk about the foundational principles of blockchain, why they’re important, and why they make blockchain special and capable of doing things that were impossible before.
A lot of business, especially in the financial industry is based on trust. When you put money in the bank, you trust them to give it back to you when you ask for it. You trust the organizations in charge of managing your currency to make decisions that allow it to retain its value rather than inflating to the point of worthlessness. You trust that any organization that you give personal data to will properly care for it and won’t lie about it when asked.
Blockchain technology makes it possible to remove the requirement for trust in a centralized organization from many systems. For example, in banking your money is recorded in an internal ledger that you trust the bank to keep accurate. In blockchain, the ledger is publicly managed and stored in so many locations that it is infeasible for someone to successfully falsify it.
The design of the blockchain also makes it possible to trust the public ledger without trusting those who store it. Each piece of information in the blockchain is secured using cryptography and the different pieces are interwoven in a way that makes forging the blockchain infeasible but verifying it easy. This is one of the major contributions of blockchain technology since no other system in existence offers these benefits. Before blockchain, you either needed to store a copy of the ledger yourself or trust the person who does.
The Potential of Blockchain Technology
One of the things that you hear the most about blockchain technology is its potential. It’s been called “The Web 3.0” and promises the revolutionize how we do business. But what are some potential applications of blockchain technology? And how are they different from what exists today? Here, we’ll talk about some of the proposed uses for the blockchain.
Unchangeable Historical Records
One of the major features of blockchain technology is that the blockchain is designed to be difficult or impossible to change. This is true because of the security features of the blockchain. By making use of the scarcity of some resource (computational power, cryptocurrency, etc.), the blockchain is designed to make it difficult for someone to control the blockchain by controlling the creation of blocks. By chaining blocks together using hash functions, the blockchain makes it impossible to forge a block without forging every block after it, which is designed to be difficult or impossible. This makes it possible to use blockchain to create historical records that are difficult or impossible to change after the fact.
The uses for this are numerous. One application is access control logs to a restricted area, making it impossible to remove evidence of unauthorized access to the facility. Another is for security logs for a secure computer system, making it impossible for an attacker to cover their tracks by deleting or modifying security logs on the computer. Computers could be made even more secure by recording every operation on the blockchain, making it possible to easily track the introduction and spread of malware or unwanted files. Any system that requires secure storage of time-dependent information could potentially benefit from storing crucial data on a blockchain system.
The blockchain is designed to be decentralized, with those participating in the blockchain being compensated for their effort. This means that a complete copy of the blockchain is stored in multiple locations. Copies may be complete or partial since the structure of blockchain makes it trivial to divide the blockchain into chunks and verify the authenticity of each part.
This makes the use of blockchain technology as a decentralized storage system possible. An organization can use blockchain technology as a distributed storage solution (gaining the previous benefit of unforgeability as an added bonus). By compensating storage nodes for their memory space and effort in retrieving information, an organization can outsource their storage needs using a system that has built-in support for compensating contributors and verifying the authenticity of retrieved data.
Ethereum has pioneered the concept of a smart contract using blockchain technology. Unlike Bitcoin, where the blockchain is designed to store financial transactions, Ethereum has developed a system where programmers can write code that can do anything that a computer can do. These smart contracts are designed to execute on the blockchain. Users of the smart contract pay the nodes on the network using cryptocurrency to execute the code and return the result.
The potential applications of smart contracts are limited only by their creators’ ingenuity. Over a thousand different cryptocurrencies have been issued as smart contracts on the Ethereum blockchain, each providing features intended to differentiate it from the rest of the cryptocurrency space. Smart contracts can also provide a designated service (without creating a new cryptocurrency). Examples of these contracts can range from the ability to play rock-paper-scissors online with other Ethereum users to automated escrow services (acting as a third party holding payment of a product until delivery is complete) to content delivery systems (like Netflix). More details on how smart contracts work on the Ethereum network is available .
Decentralized Autonomous Organizations
Another new thing that is made possible by blockchain technology is a Decentralized Autonomous Organization (DAO). A DAO is a group whose rules of operation are written as smart contracts on the blockchain. People can buy tokens for the DAO that give them rights to vote on decisions regarding governance, allocation of funds, etc. The blockchain is essential for the existence of a DAO because its decentralized nature makes it possible to create an organization where the operation is not under the control of any member or organization and members can participate without revealing their identity (since ownership of a token is enough to prove membership).
How does a Cryptocurrency Transaction Work?
The Lightning Network is a second-layer protocol that is built on top of the blockchain to provide the capability for instantaneous “microtransactions”. Since this is becoming more common and works differently than standard blockchain transactions behind the scenes, we’ll describe it briefly here.
The Lightning Network is based on a network of “channels” between two parties. For example, let’s pretend that Alice and Bob create a channel between themselves. To do this, they both create a “funding transaction” on the blockchain (through the process described above) that says that they commit some amount of cryptocurrency to the channel. Let’s say that each commits 1 Bitcoin to their channel to begin.
To create their channel, Alice and Bob create “commitment transactions” which track the current state of their channel and are signed by both of them. To begin, Alice and Bob’s commitment transaction will say that of the 2 Bitcoin in the channel, 1 should be paid to Alice and 1 should be paid to Bob when the channel closes. Each one has a copy of the transaction that includes this information and two options: either paying their partner or one that pays them eventually but can be revoked (and they hold the revocation key).
To perform a transaction on the Lightning Network, Alice and Bob create a new set of contracts. For example, let’s say that Alice sends 0.25 Bitcoin to Bob over the Lightning Network. This includes the following steps:
- Alice creates a new commitment transaction A’ that pays 0.75 Bitcoin to her and 1.25 Bitcoin to Bob when the channel closes
- Alice signs A’ and sends it to Bob, who signs it and keeps a copy
- Bob creates a new commitment transaction B’ that pays 0.75 Bitcoin to Alice and 1.25 Bitcoin to Bob when the channel closes
- Bob signs B’ and sends it to Alice, who signs it and keeps a copy
- Alice publishes a revocation key for her previous copy, A, which allows them both to delete it
- Bob publishes a revocation key for his previous copy, B, which allows them both to delete it
As a result, Alice and Bob have new commitment transactions, A’ and B’, that reallocate the funds in the channel to account for Alice’s new payment to Bob.
But does this mean that everyone needs to keep a channel open to everyone else to send them money on the Lightning Network? Because this would mean a lot of funding transactions on the blockchain. The answer is no, this is where the network come is.
Pretend that Charlie wants to send some Bitcoin to Dorothy but they don’t have a direct channel between them. However, Charlie has a channel to Alice and Dorothy has a channel to Bob. This means that Charlie could send money to Dorothy by way of Alice and Bob. This is accomplished by the following steps:
- Charlie decides how much Bitcoin he wants to send to Dorothy, find a chain of channels that he can use (Charlie to Alice to Bob to Dorothy) and allocates the base amount plus some extra to pay Alice and Bob for their trouble
- Charlie sends the Bitcoin to Alice using a Lightning Transaction as described above
- Alice takes her cut and sends the rest to Bob over their shared channel as described above
- Bob takes his cut and sends the base amount on to Dorothy
As a result of all of this, Charlie has sent the money that he wants to Dorothy. In the process, he has decreased his share of the Bitcoin in the channel between him and Alice. The same is true of Alice with regard to Bob and Bob with regard to Dorothy. However, Alice and Bob’s net change is equal only to their transaction fees.
The change in the balance of channels will help dictate how the Lightning Network flows. It could be that Alice no longer has enough value assigned to her in the channel to send Bob Bitcoin as part of another transaction. This will affect transaction fees since Alice may charge low or even negative transaction fees in order to attract transactions that will cause Bob to transfer value to Alice and rebalance their channel.
When a channel is closed, the balance of Bitcoin assigned to each party based on their latest commitment transaction is paid to them. This means that balances on the blockchain are updated only when the channel is closed, which keeps Lightning Network transactions instantaneous (since the blockchain is “out of the loop” until everything is over).
What is Cryptocurrency Mining?
You’ve probably heard the words “cryptocurrency mining” before. But what is cryptocurrency mining? The term “cryptocurrency mining” was coined to make users think about precious metals. Someone goes out and does some digging, pulls some gold out of the ground and then they’re richer because everyone agrees that gold has value.
Cryptocurrencies work in a similar way. When you get down to it, cryptocurrencies are just a bunch of ones and zeros with no tangible use. They only have value because people agree that they do. Cryptocurrencies have a lot of parallels to precious metals and the term mining was chosen to take advantage of these similarities and make cryptocurrencies easier for everyone to understand.
Mining is a term used by a family of cryptocurrencies that use an algorithm called Proof of Work for security. Cryptocurrency miners “create value” by creating a block in the blockchain, just like gold miners “create value” by pulling gold out of the ground and bringing it to market. Both of them do some work and are rewarded for their effort.
But people only are rewarded for doing something that people agree is valuable, right? For gold, the “valuable” thing that miners do is gathering gold for people to make things (coins, jewelry, etc.). But what is the purpose of the work that cryptocurrency miners do?
Cryptocurrency miners secure the blockchain by ensuring that the blockchain remains decentralized. The original goal of cryptocurrencies was to create a system that is not under the control of any single person and organization. The reason for this is that the creator of Bitcoin, the first cryptocurrency, believed that centralized financial institutions made decisions that hurt the public and wanted to create a way for people to exchange value in a way that is independent of the existing financial infrastructure.
The decentralization of cryptocurrencies is accomplished by making sure that no-one has the ability to control the blockchain by controlling the creation of blocks. How? By taking advantage of scarcity.
All cryptocurrencies rely upon the fact that a certain thing is scarce and therefore somewhat costly to acquire. Proof of Work cryptocurrencies use the scarcity of computational power to secure the blockchain. Each block includes the solution to a difficult cryptography problem where the best way to solve the problem is guessing. Any user of the cryptocurrency is allowed to participate in a race to find a correct answer to the problem. The process of guessing until a valid solution is found is called mining and the people participating in the guessing game are cryptocurrency miners.
Since each random guess is just as likely as any other to create a valid answer to the problem, a person’s chances of winning the race to a solution is equal to the percentage of the computational power of the network that they own. For example, if a person has a single computer that they use for mining and the network is made up of 100 identical computers used for mining, then the miner has a 1% chance of creating each block in the blockchain. In established cryptocurrencies, the network is composed of many miners, where no single miner controls a significant portion of the network’s resources.
This protects the network because an attacker would need to gain enough resources to win the race every time, which would be extremely expensive (since they’d need as many computers as the rest of the network combined). For example, the Bitcoin network has a power consumption larger than many countries. To effectively attack Bitcoin, a user would need to expend an even greater amount of energy, which would be very expensive (not to mention the cost of the computers doing the mining).
This is a brief introduction to cryptocurrency mining and Proof of Work cryptocurrencies. For more information about Proof of Work and details of another system called Proof of Stake, see our mining guide.