Hi there! My name’s Elias, and I initially wrote this article for my cousin. He wanted to understand blockchain technology and did not know how to go about it.
Hearing about cryptos can be quite overwhelming: speculation, huge carbon footprint, Ponzi schemes and other forms of bad buzz. Our mind tends to get saturated pretty quickly.
From there it’s easy to just classify web3 as a scam or a bubble and move on. But behind the hype lies a whole world of driven and passionate builders that strive towards a decentralised and open future đź‘· 🏗.
I’ll try to provide you with some fundamentals on a few subjects and point you to cool resources I found over the months.
- Blockchain (sometimes abbr. ‘chain’):
A bunch of computers (so-called ‘nodes’), all linked together over the internet. They all hold a copy of a ledger (~ database). That involves: keeping track of users, account balances, and applications (smart contracts). One modifies this ledger by transacting with other users or smart contracts: paying someone some ether, or bitcoin, or buying an NFT, etc.
The transaction will then be added to the current state of the blockchain and registered in all the computers that are part of the network.
New transactions are added to the blocks. Blocks are simply containers storing lists of transactions. The word “blockchain” refers to the idea that blocks are added one after the other, as time passes by. Blocks are thus ordered linearly.
For example block 1129 maybe holds the transaction: “Mark sends Alice 10 ether”. Later, block 12820239 has “Alice bought an NFT for 10 ether”.
Cool note: blockchains are based on decentralised systems.
TL;DR: Blockchains are made of blocks (a group of transactions) that are chained one after the other. The entities that maintain a blockchain “online” are nodes (computers that run the blockchain software). Users in a blockchain have a private key (their password), an address (their username), and a balance in coins (their money).
2. Consensus, or how to maintain a single source of truth between all nodes.
Because of the decentralized nature of blockchains, nodes need to agree to some common truth. They reach an agreement through a so-called consensus. Check out the below video “Proof of WHAT?! Overview of 13 different consensus algorithms for cryptocurrencies!, by Coinsider” to learn about those.
TL;DR: Blockchains are kept online and validated by computers all around the world. In order for these computers to synchronise and accept a common reality, they perform consensus. It’s essentially close to democratic voting to an elect a representative, except in our case they elect a shared reality. In Proof-of-Stake, the most widespread form of consensus, nodes vote to assess whether a group of transactions are correct.
3. Smart contracts. They’re just programs đź’…
A smart contract is essentially an application (so code written in some programming language), on a blockchain. They were named smart contracts in the beginning because of their ability to perform an action automatically after receiving money. This opens up the way for contracts to be enforced in an automated fashion. Some call it programmable money.
But it’s really just a program. A game’s logic, anything. The only limitation is a blockchain’s price of storage.
TL;DR: just an app
4. Gas: the cost of running a shared infrastructure worldwide
Gas is the way to pay for the computation you ask the network to do for you. When you post an image on Facebook, you don’t necessarily see it, but you’re uploading an image to their server. Then Facebook displays it to anyone who visits your profile page. This storage costs them some money, but they get it back by selling you some ads (and more).
For blockchains, since no one really “owns” the network, some computers will store, compute transactions and execute app logic for users. These operations cost so-called “gas”. Gas is essentially conceptual computer fuel. This is meant so that users pay for tasks, and so don’t overuse them.
Example: I want to send 1 ether to my buddy Greg, it will cost me 0.00075593ETH ether.
Some of this fee will be given to the computers operating the network as a reward for their computation (electricity, uptime, running the software, etc.). Note that anyone can run a node (with the right computer).
A short pause to see how Bitcoin works:
This creator, 3Brown1Blue, is really cool, consider checking his videos đź’«.
A bonus on blockchain security: How secure is 256bits security?
5. Wallets, your digital cryptocurrency store of value
A web3 wallet is like a real-life wallet, where you may store currencies (tokens, ether coins, bitcoin, etc.) or NFTs (art, etc.). They are linked to you through a private key (~ a password).
Your wallet is publicly accessible through an address representing your public identity on the blockchain (equivalent to your email address). One may send you money directly to your wallet using your public key (kind of like sending an email to an email address).
️️️P️lease remember:️ never share your private key with anyone ⚠️
Note: wallets rely on asymmetric cryptography. If you want to dig deeper: consider reading about asymmetric cryptography in web3.
It took me a while to understand these points about web3 wallets so I’ll share them with you here:
- When you create a wallet, a 256-bit private key is generated at random.
- A passphrase (corresponding to your 256-bit private key) gives complete access to your wallet. Anyone with your private key has complete control over your assets. Some wallets will enable multi-factor authentication (MFA), email protection, etc.
TL;DR: Wallets are the equivalent of your bank account in web3: they store all of your capital: cryptos, NFTs, etc. They are chain specific. Your Bitcoin wallet isn’t necessarily connected to your Ethereum wallet.