Discover more from Around the Blockchain
Lesson No. 2: Blockchains and Cryptocurrencies
An examination of the challenges of blockchain, the differences between Layer-1s, and Layer-2s, a brief foray into Smart Contracts, and an introduction to Bitcoin and Ethereum.
In our last edition, we covered the basics of blockchain technology, the driving force behind cryptocurrencies. Today, we’re diving deeper into:
The challenges of blockchain;
The difference between layer-1 and layer-2 networks;
Introduction to Cryptocurrencies: Bitcoin and Ethereum
CHALLENGES OF BLOCKCHAIN
Any developer who wants to create a blockchain project has to confront what Vitalik Buterin, one of the co-founders of Ethereum, coined (pun intended) as the ‘Blockchain Trilemma’. The Blockchain Trilemma is essentially a trade-off between three challenges facing blockchain:
2) Security; and
Let’s quickly run through each of those:
One of the primary benefits of blockchain technology is decentralization, the lack of a central authority calling the shots. If a new block of a transaction is to be added to the chain, consent is required from independent nodes around the world. This prevents a single entity from controlling the blockchain.
You can learn more about decentralization by reading The Center Will Not Hold: How Decentralization is Reshaping Technology and Governance, by David Kerr and Bruno Lulinski or Sufficient Decentralization: A Playbook for Web3 Builders and Lawyers by Marc Boiron.
Blockchain transactions are encrypted which makes them difficult to hack. Additionally, they require a hacker to gain control of more than 50% of a network’s nodes, which is almost impossible - “almost” being the keyword.
Proponents of traditional finance enjoy boasting Visa’s ability to process over 1000 transactions per second (TPS) as compared to Ethereum’s 15. Scalability is the ability of a network to process more transactions as demand increases. For blockchain technology to achieve mass adoption, scalability is essential.
Blockchain strives to achieve all three factors but is often forced to contend with just two. While decentralization and security go hand in hand (more nodes processing transactions decreases the likelihood of a bad actor infiltrating the chain), scalability poses an obstacle. More nodes in a network increase the processing time and fees required for making transactions. Think of it like a traffic jam (kudos to Binance Academy for using this brilliant analogy): any road has a limit to the number of cars it can take. If it takes drivers hours to get through the road, they’ll simply find alternative routes. Scalability is trying to fit more cars on the road so anyone who wants to use it can do so without any trouble.
LAYER-1 AND LAYER-2
Understanding the Blockchain Trilemma is a helpful precursor to understanding layer-1 and layer-2 networks. Layer-1 simply refers to the main blockchain network. Bitcoin, Ethereum, and Solana are all examples. Layer-1 blockchains are capable of recording transactions on their networks and often have their own native token. For example, Bitcoin’s native token is Bitcoin (BTC) and Ethereum’s is Ether (ETH).
Layer-2 refers to networks built on top of layer-1 blockchains. Developers can create layer-2 networks for several reasons, but enhancing scalability of the base layer-1 chain is the most important one. Layer-2 networks use a variety of solutions to achieve their purpose, and we will cover some of these in our next edition. For now, try and remember the analogy of the traffic jam on a road. Think about layer-2 networks as roads built adjacent, or on top of (like a road above a road) to the one overpacked with cars (the layer-1 network). These additional roads not only ease and mitigate traffic but also allow more drivers to join, bolstering the scalability of the blockchain. Polygon is a layer-2 solution built on Ethereum that does this.
Coined by Nick Szabo in Smart Contracts: Building Blocks for Digital Markets in the early 1990s, a smart contract is a computer program that persistently and autonomously runs on a blockchain. Let’s break that down into three components:
1) it is a contract in that it reflects an agreement between parties;
2) the contract is in the form of code that runs as a program on blockchains;
3) it is autonomous in that it relies on “if/when…then…” semantics. In simple words, a smart contract will automatically execute a transaction if certain conditions are satisfied i.e. if x, then y.
What separates a smart contract from a traditional contract?
A smart contract improves traditional contracts in several ways, including efficiency, trust, and security. Let’s say John wanted to send Katy 5 BTC and Katy wanted to send John 3 ETH. Instead of using the bank as an escrow, they could use a smart contract. A bank will require paperwork, time off on weekends, and may even go bankrupt, potentially leaving both John and Katy without their fair shares. A smart contract on the other hand can be programmed to transfer each of them their shares as soon as it receives the necessary inputs: “when John sends 5 BTC and Katy sends 3 ETH, transfer John 3 ETH and Katy 5 BTC” (keep in mind that the actual coding is much more complicated).
Despite their clear advantages, smart contracts are imperfect and can be fallible. A smart contract is often jokingly referred to as a “bug bounty” because of the awaiting financial gains if a hacker finds a bug or weakness in the code. Additionally, unlike traditional contracts, smart contracts cannot (yet) reflect relational arrangements. For example, a smart contract can be of no help in a situation where a former employee is suing their employer for wrongful termination. Scalability also poses a challenge.
ETHEREUM v. BITCOIN
Bitcoin and Ethereum are two of the most well-known cryptocurrencies and utilize open ledger blockchain technology (review our last segment for a refresher on blockchain). But what exactly are they, and what's the difference between them?
Modern cryptocurrencies emerged as a result of the 2008 global financial crisis, with the aim of solving issues associated with centralized financial institutions. For people to transact safely using digital currencies free from the potential for abuse or manipulation by intermediaries (like banks or governments), a decentralized model was required. In a centralized space like Web2, intermediaries essentially have full control of our money and act as a central point of failure which increases the risk of hacks and data leaks.
Enter Bitcoin: a peer-to-peer payments network that is trustless, permissionless, and immutable.
Launched in 2009 by Satoshi Nakamoto, Bitcoin was the first cryptocurrency on the blockchain. Bitcoin was developed as a means of processing secure digital payments but has now turned into a store of value, similar to gold. Bitcoin’s rise has been astronomical, with one BTC costing as much as $70,000 earlier this year. Not only have developing countries like El-Salvador started accepting it as legal tender but Blackrock, the world’s biggest asset management firm, recently signed a deal with Coinbase, a cryptocurrency trading exchange, to allow its clients to trade Bitcoin.
Like Bitcoin, Ethereum is also a layer-1 network where transactions can be recorded and verified. However, unlike Bitcoin, Ethereum’s strength isn’t in being a store of value but in its ability to host and execute smart contracts. Developers use smart contracts to develop decentralized applications (dApps). dApps are like apps on our smartphones except they aren't controlled by a centralized authority. Imagine a Facebook where Mark Zuckerberg couldn’t just get up one day and decide to ban someone for using a certain word. Sounds tempting, right?
Launched in 2015, Ethereum has dominated the space for dApps ever since. The network is known for its supportive interface that offers developers the ability to create dApps regardless of the coding language used. Ethereum also has a “network-native language known as Solidity that is used to code smart contracts”. This has allowed Ethereum to be the blockchain where all the action in decentralized finance (DeFi) and Non-Fungible Tokens (NFTs) takes place. We’ll talk more about DeFi and NFTs in future editions. For now, all you need to know is that DeFi applications act as regular financial institutions that lend and borrow money, provide returns on investment opportunities, and plenty more. Unlike regular financial institutions, DeFi applications run on smart contracts and therefore, no single individual or entity has control over the entire system. NFTs are essentially like certificates of authenticity. They are unique lines of code generated by smart contracts and associated with another asset, digital or physical. There are millions if not billions of dollars in DeFi and NFTs.
All blockchain projects face the challenge of finding the right balance between achieving decentralization, security, and scalability (the Blockchain Trilemma)
Layer-1 refers to the main blockchain network while layer-2 refers to networks built on top of layer-1 blockchains
Smart contracts are pieces of code that exist on blockchains and are capable of executing transactions automatically
Bitcoin was designed as a digital currency platform
Ethereum was designed as a decentralized application development platform