Alchemy University: Ethereum Developer Bootcamp | Week 3

manu kj
6 min readJan 10, 2024

--

Week 3, our journey takes a deep dive into the world of Ethereum, unraveling its intricacies, evolution, and practical applications. From understanding its foundational concepts to exploring the latest updates, connecting with the Ethereum Mainnet, and stepping into the realm of Alchemy SDK, this week promises a comprehensive exploration of one of the leading platforms in the blockchain space.

  1. Introduction to Ethereum
  2. Historical Evolution: Tracing the evolution of Ethereum, exploring key updates over the years.
  3. Ethereum Virtual Machine (EVM): Delving into the significance of the (EVM) and how to connect with Ethereum Mainnet
  4. Alchemy SDK Introduction

This week has been a roller coaster for me, and there was a point where I began to question the entire blockchain system . I wondered if it was just a hyped-up technology or if it genuinely works. However, as I delved into understanding the system’s flaws, these challenges are now my motivation to explore everything that Web3 has to offer. I’ve become even more captivated by the potential within this space.

Ethereum

Ethereum is known as the second-gen blockchain. Picture it as this global computer that’s totally free-spirited and doesn’t belong to anyone in particular. What makes it cooler? It’s not just a regular computer; it’s a place where programs, called smart contracts, come to life. Think of these smart contracts as little genies fulfilling tasks in a super secure and automated way. Ethereum is open-source, meaning it’s like a playground for developers worldwide to join in the fun.

Ethereum utilizes the Keccak256 hash function, offering an astronomically vast range of possibilities for creating unique accounts. To grasp the sheer scale, consider this: 2¹⁶⁰. Watch the video below, and prepare to have your mind blown.

The key distinction between Ethereum and Bitcoin lies in their purposes. While Bitcoin functions primarily as a distributed ledger for transactions, Ethereum goes a step further. Ethereum’s blockchain is engineered not only to record transactions but also to execute smart contracts — self-executing agreements with terms coded directly into the system.

EVM : Ethereum Virtual machine

When you add a feature, it sometimes comes with a bug. Similarly, the introduction of smart contracts gave rise to the Halting Problem, i.e., the issue of infinite loops. Imagine running an infinite loop in a distributed network — it can jam the entire network. That’s why Ethereum developers introduced the Ethereum Virtual Machine (EVM). But how does the EVM prevent the halting problem? Well, by charging a fee for every instruction to run, known as gas. This way, if a person wants to jam the entire Ethereum network, they should be very rich

GAS: It’s the cost you have to pay for executing OP-Code. Now, what is OP-Code? Those are the instructions present in a smart contract. For example, the ADD OPCode is used for addition, and for storing data, it’s SDLOAD.

The price of the gas fee is determined by the demand for block space, and this is automatically calculated after EIP-1559 (Ethereum Improvement Proposal; we’ll discuss this in the sections below). EIP-1559 introduced an automatic method for calculating the gas fee and bringing balance across the network.

EIP-1559

The price of the gas fee is determined by the demand for block space, and this is automatically calculated after EIP-1559 (Ethereum Improvement Proposal; we’ll discuss this in the sections below). EIP-1559 introduced an dynamic adjustment of gas fee/base fee to maintain balance, but How ? It work on simple formula

base fee ∝ demand

If the demand is high on the block, then the gas fee increases. Now, with a higher gas fee, only people who can afford it, unless you’re rich, attempt transactions. This indirectly manipulates the demand. When demand suddenly decreases, the gas fee also decreases, encouraging more people to transact, which, in turn, leads to an increase in gas fees again. And thus, the cycle continues.

Fork, Ethereum Improvement Proposal (EIP)

Over time, the Ethereum Virtual Machine has undergone upgrades, facilitated through the first Ethereum Improvement Proposal (EIP), followed by subsequent updates in forks (hard fork or soft fork).

The Merge

The most significant change in Ethereum is “The Merge,” where Ethereum transitioned from Proof of Work to Proof of Stake.

The Split

The DAO fork serves as the prime example of a Soft fork, which resulted in a network split between Ethereum and Ethereum Classic.

Proof of Stake

Ethereum initially used Proof of Work to mine blocks, but after the merge, Ethereum now uses Proof of Stake to validate blocks. Don’t get confused; “mine” and “validate” mean the same. So, why the different names, you ask? Well, in Proof of Work, we try to match the target hash by altering the nonce, so you’re actively performing the task, which is mining. In the case of Proof of Stake, a validator is selected. They check all the transactions to see if they are valid and then validate the block. Both achieve the same goal of adding a block to the network but in different ways.

The reason for the merge is to be environmentally friendly. You may ask, “What? How is blockchain affecting the environment?” Well, whatever we do tends to have an impact on the environment 😂. You see, Proof of Work used computational power to mine the block, meaning you need power to run the computer. When you take Bitcoin, it’s huge, and mining a block in Bitcoin is not as easy as it was before. Why? Well, as the network chain grows, mining becomes more complex. The target function gets stronger, and mining a block consumes more energy over time. So, it’s not a sustainable solution. I’m glad that Ethereum realized this early and moved to Proof of Stake.

Alchemy SDK

Watching this video has been quite an eye-opener for me, and it has led me to question some aspects of blockchain technology. In the process of exploring these questions, we also get introduced to Alchemy SDK.

After watching this video, the first thing I did was ask this question in the Alchemy Discord channel.

The Alchemy Community is incredibly active, and I received prompt responses to my questions. This has motivated me to explore more about blockchain technology. The community also introduced me to the Trilemma Dilemma, which essentially states that in life, you can’t have everything 😂. Security, decentralization, and speed constitute the essential components, yet excelling in one aspect often involves compromising the others to a certain degree.

Week 3 Project

At the end of the Week 3 tutorial, we were introduced to Ether.js, Alchemy SDK, and other front-end libraries that facilitate connecting to Ethereum. The task assigned was to build an Ethereum explorer. I personally opted to use Svelte for this project, but you’re free to choose any front-end framework that suits your preferences.

Link To My Week3 Project

Alchemy Tutorial Link

This Medium post is a series of weekly tutorials. Feel free to check it out.

WEEK 1

WEEK 2

WEEK 3

WEEK 4 & 5

--

--