Everyone is talking about cryptocurrency. What is Cryptocurrency and How Does it Work? Everyone wants to invest in it and become rich. Bitcoin, Ethereum, meme currency dogecoin are the hot topics these days. Everyone from big hotshots like Elon Musk to the college students are talking about crypto. But what actually is cryptocurrency and how does it work? What processes go behind the easy transaction you make? How do these non-centralized currencies maintain security and prevent the customers from getting cheated?
What is cryptocurrency?
Oxford Dictionaries define cryptocurrency as a digital currency in which transactions are verified and records maintained by a decentralized system using cryptography, rather than by a centralized authority. Let’s first learn what is cryptography. Cryptography is the study of secure communications techniques that allow only the sender and intended recipient of a message to view its contents. This means that whenever a transaction is made the records are kept only between the customer and the bitcoin ledger.
This is a little bit more complex method which we’ll discuss further on in this article. For now, let’s say that blockchain is used to protect these transactions. So, cryptocurrency is a binary data designed to work as a medium of exchange wherein individual coin ownership records are stored in a ledger existing in a form of a computerized database using strong cryptography to secure transaction records, to control the creation of additional coins, and to verify the transfer of coin ownerships.
How Does Crypto Works?
Cryptocurrency is not attached to any organization or authority. Therefore, there is no central authority or regulatory body. Thus, there is no organization to decide when to make more bitcoins, figure out how many to produce, keeping track of where they are and to investigate if any fraud has occurred.
Now whenever bitcoin transaction is an exchange between a worldwide peer to peer network. Bitcoin is not actually a physical coin or commodity, it’s just a digital entry. Now if bitcoin is a digital copy of a ledger, then anyone could make any number of copies of a bitcoin and become rich!! But it doesn’t work that way. Bitcoin is a digital entry that can’t be duplicated because of the unique system that works behind it, which we will discuss further along in this article.
So, what is bitcoin actually, it is a digital entry on a huge global ledger called Blockchain. It records every bitcoin transaction that takes place. And as of 2016, this ledger stores about 107GBs of crypto transactions. Therefore, whenever we are exchanging bitcoins, we aren’t actually exchanging something, we are just making an entry on this huge worldwide ledger, and this entry has its own special key which is almost impossible be copied to prevent duplication.
Now another question that may cross your mind is that, if no authority regulates and keeps tabs in the transactions then who does? So, there is a community for this, and anyone can volunteer to become a part, even you can, although you’ll need a huge skillset of coding, a highly proficient team and huge investment to set up your digital mine, well that’s the topic for another article. Moving on, the people who are a part of this community are called miners.
There are tons of people who keep track of the same ledger. This way if there is some fraud or mistake in one ledger, it can be verified by the others and the fraud can be prevented. To understand this let’s take an example, suppose you and your friends are playing poker, but no one of you brought cash, so one of you starts writing down names and the amount each person bets in each round. Now if only one person keeps this track the system will be centralized and cheating will be easy for that one person.
So, to tackle this problem all of you decide to keep tabs of the same ledger. This way if anyone of you cheated, they’ll be caught when you tally all of your ledgers, and the fraud can be prevented. Now you have a huge number of pages keeping the track of all transactions. So, let’s call each page a block of transaction, and we have chain of pages, hence ‘blockchain’. Now this is what happens in the crypto networks, there are several entities keeping track of the big bulky worldwide ledger. Now since this network is so large how do all the ledgers stay in sync?
To understand this let’s consider the entire network of computers and systems as a huge global poker table, and anytime anyone makes a transaction, they have to announce it to the entire network and everyone crosschecks the information with their own ledgers and if anyone does not find a match the transaction is not completed. For every transaction you announce a couple of things to the bitcoin network, your account number and the account number of the person you are sending bitcoins to and how many bitcoins you want to send. After you announce this everyone in the network keeping a track of the ledger
What if someone impersonates you?
Now it may seem that keeping so many tabs makes the system completely secure, but it is not so as there is no one keep tabs on any abnormal transaction like a bank does, it becomes easy for anyone to pretend to be you and send bitcoins worth all your life savings to their account. Thus, to keep bitcoin transactions safe and secure we use cryptography. Thus, you have a specific key for your crypto account.
A key is basically a chunk of information that can be used to make a mathematical guarantee about messages like, “Hey, this is really me!” Whenever we make an account for these transactions, we get two keys linked to our account, private key and public key. Private key takes some data and marks it also called signing so that others can verify it. Later on, anyone can use the public key to verify the private key and hence verify the transaction. This means, if the private key works, that’s proof that the message was signed by you and it is something that you wanted to send. Unlike the banking id or credit card information, this private key can’t be copied.
Now, not only the who part matters, but also the when part matters when it comes to transactions. Suppose you take Rs.1000 from a bank to buy a certain item, so the bank will respect the first transaction and will not verify any other transaction later on the same Rs.1000. Similarly, both the Bitcoin network and your wallet automatically check your previous transactions to make sure you have enough bitcoins to send in the first place.
How does everything remain synced up?
Now another problem that arises is time delay. As so many people are there spread all over the world, network delays occur, and with so many transactions happening all over the world everyone gets the same entries in the ledger, but jumbled. Now how do we solve this problem since all the entries are completely valid and we need to arrange them in a specific order so that all the ledgers can be matched perfectly. So, to solve this issue, every person maintaining a ledger has to solve an actual math problem. To add a block to the chain every person maintaining a ledger has to solve a math problem created by a cryptographic hash function.
Now what is a hash function? A hash functions is an algorithm that takes in input of any size and turns it into an output with a fixed size. Let’s say the algorithm gets an input 1 2 3 4 and the function says to add up all these inputs then we get the output 10. Now the special part about hash functions is that it is easy to get an output but it is extremely difficult to figure out the input from just the output, thus making the transactions more secure. Like for the output in above example, i.e., 10 there are many inputs possible like 5 5, 1 2 3 4, 6 4, etc., Thus the only way to get it correct is by guessing until getting it right. Now the hash function that bitcoin uses is SHA256 which stands for Secure Hash Algorithm 256-bit.
It was originally developed by United States National Security Agency. Computers that are built specifically to solve SHA256 problems, take on average 10 minutes to guess the solution to each one. This means that these computers are churning through billions and billions of guesses before they get it right. This means that whoever solves the hash first gets to add the block to the chain which generates a new problem. Now if 2 people solve the hash simultaneously then the algorithm picks one block that goes into the main chain, and the rest go into a pool from which they are later used to add more blocks to the main chain.
What’s in it for a miner?
Now, these volunteers spend millions and millions of dollars to build the computers to solve these problems and run their electricity bills sky high to maintain these machines. So, what is in it for them? Is it just community service? So, Bitcoin actually has a built-in reward system to reward them. For each race they win to solve a hash problem and create a block to add to the main chain, 6.25 bitcoins are created out of thin air and added to their account. Thus, getting a bitcoin is like swinging a proverbial axe at a hash problem to break it and get bitcoins, which is why these people are called miners. These miners are also tipped a very small amount for each transaction they add to the ledger. It is also worth noting that for every 210,000 blocks added to the chain the number of bitcoins generated by one block goes down by half.
So, what started with 50 bitcoins for each block has reduced down to 6.25 bitcoins which will further keep decreasing as time passes by. The theory is that as the number of transactions per block increases miners can mostly be get paid in the tips they get for each transaction. It is estimated that the last bitcoin will be mined around 2140 which will be around the 21 millionth coin. Pretty large number!! Isn’t it? This model is basically based on the mining of gold because it is getting reduced as time passes by and its value keeps on increasing as is expected of bitcoin.
Follow us on Instagram and subscribe to Knowlab.