Algorithms, Hashing & ERC-20 Tokens, Oh My!
This post will be following the topic I posted last week. Last week, I helped put an understanding of decentralization within blockchain technology. If you already have read that post, or previously knew about decentralization and blockchain technology, you are in the right place!
This blog will be focusing on the basics behind algorithms used with Bitcoin (SHA-256) and Ethereum (Ethash). After the explanation, I'll touch on ERC-20 tokens and how they relate to Ethereum's blockchain.
---Disclaimer: I am not giving investment advice, I am only making you aware of the recent news regarding cryptocurrency so you can better understand the coin, technology, and the overall effect cryptocurrencies are currently having in the world we live in.---
Question: "What is Bitcoin's algorithm and how does it work?"
Answer: Bitcoin runs on SHA-256. SHA stands for "Secure Hashing Algorithm" and 256 stands for the number of bits the algorithm generates. 256 bits is 64 characters. These 64 characters generated by the hashing process will be a sequence of random numbers and letters.
Think of hashing being a secret messenger. You have a message you want your best friend to read, and nobody else. The hashing messenger codes your message up so in the case he got robbed, the robbers would not be able to read what you wrote. Once the hashing messenger finds its way to your best friend, your best friend provides a secret phrase notifying the messenger that they are the best friend. They are then allowed to read your message.
Lucky for all of us, the robber in the example is to show the significance of encryption. Nobody can steal/hack your message within the blockchain technology. As long as you send the message the correct public wallet of 64 characters, the transaction will be successful.
I found this example from decryptionary.com (I'll add the link below the post).
The message you sent to your best friend stated "I like bitcoin".
The hashing messenger then codes your message. The finished hash code is the following 64 random characters: "ad3e58f21b94f32dcadca6b71df4c31a18179f38011551a17a80d0ff065d22c5".
Let's say your message said "I like Bitcoin" instead (the difference being a capital B).
The hashing messenger then codes your message. The finished hash code is the following 64 random characters: "d988ca30eaa88c0410ad6e48a5297c0d505dcee572f9884f1a6fa2cbc8dedc86".
Notice that even the slightest change of a lowercase b to an uppercase B changes the hashing code. You can't reserve a hashing code, so each hashing given is generated at random and unique to that moment. Think of the hashing and its unique qualities to the unique qualities of snowflakes. No snowflake is identical and all snowflakes are produced on the spot.
One other thing I would like to point out about SHA-256 is the Proof of Work decentralized consensus mechanism. There are other forms of decentralized consensus mechanisms (Proof of Stake is another big one), but before you become a Wiz at them, understand Proof of Work first.
SHA-256 and Ethereum's Ethash both use Proof of Work. PoW requires members of the network (Bitcoin/Ethereum node holders) to solve a complex math problem with their mining supercomputers so no one individual controls the blockchain system. The first node to complete the Proof of Work complex math problem is now the lead node in the blockchain. The miner is then rewarded with the cryptocurrency involved. This whole process is to be used to validate transactions through the blockchain.
The main difference between SHA-256 and Ethash is the relationship with ASICs. ASIC stands for "Application-Specific Integrated Circuit". ASICs are computer chips created for a specific purpose. In our case, the specific job is mining a cryptocurrency. Ethereum strays away from ASICs because the increased memory requirement of Ethash exceeds SHA-256 (Ethash requires 1 or more Gigabytes of Random Access Memory).
ASICs within Bitcoin mining have developed Brute force to find the answer to the complex math problem. This means that the supercomputers push out potential answers until one supercomputer comes out on top with the correct answer.
Finally, ERC-20 tokens and the significance within the crypto-verse.
Question: "What is ERC-20 and how is it related to Ethereum?"
Answer: ERC-20 is used within smart contracts placed on the Ethereum blockchain. ERC-20 tokens are similar to Bitcoin, Litecoin, and other cryptocurrencies in the aspect you can buy, sell and send ERC-20 tokens. The main difference is ERC-20 provides regulations and rules for cryptocurrencies to follow if they choose to run on the Ethereum blockchain and ERC-20 itself runs on the Ethereum network.
You probably know of the cryptocurrencies that run on the Ethereum blockchain and ERC-20 tokens. The most well-known cryptocurrencies and the ones with the biggest market cap are Binance Coin (BNB), Maker (MKR), and Basic Attention Token (BAT). (Investopdia)
The significance of ERC-20 is it gives more to the potential to cryptocurrency and blockchain technology. Rather than ERC-20 being another token, it allows a platform to be present with the technological advancements. If any of the above-named crypto currencies want to be available to the public, then they have to follow the ERC-20 regulations and protocols.
Think of Ethereum being the parent and BAT, BNB and MKR are the children. The genes that are shared from the parent to the children are the ERC-20 tokens.
-Seth Hinkle
Watch this YouTube video to see an example of how hashing works:
Sources:
Hashing example:
https://decryptionary.com/dictionary/secure-hash-algorithm-256/#:~:text=Get%20Started%20Here%21%20Secure%20Hash%20Algorithm%20256%20or,letters%20and%20numbers%20%28hash%29%20out%20of%20any%20input.
Reiff, Nathan. “What Is ERC-20 and What Does It Mean for Ethereum?” Investopedia, Investopedia, 6 Sept. 2020, www.investopedia.com/news/what-erc20-and-what-does-it-mean-ethereum/.