In this article, you’ll learn:
A young Russian programmer, Vitalik Buterin, who was an active participant in the Bitcoin community and co-founded Bitcoin Magazine, began to question the limitations of Bitcoin.
He felt that
Bitcoin's core functionality, even without additional features or upgrades, supports a basic form of smart contracts that allow you to send and receive Bitcoin.
Beyond that, Bitcoin’s smart contract can allow more advanced transactions, such as those requiring multiple signatures (proofs of ownership) for approval or enabling the exchange of Bitcoin for other cryptocurrencies. However, Vitalik still believed this breakthrough was limited.
Lack of universal computing ability
As a programmer, Vitalik discovered that Bitcoin's scripting language lacked loops—the ability to easily perform repetitive actions. This limitation is in place to prevent infinite loops that could disrupt transaction processing. Although programmers can work around this by manually repeating code, it makes the scripts much longer. For example, creating an alternative signature method might require writing the same multiplication step 256 times in the code. This elongates the code and is also time-consuming.
Value-blindness
Bitcoin’s scripting language can't control the exact amount of Bitcoin that can be withdrawn from a transaction. For example, if two people each put $1000 worth of Bitcoin into a contract, and after 30 days, one should get $1000 back while the other gets the remainder, the script can't handle this directly. Typically, you'd need an external source of information (oracle) to determine the value of Bitcoin, but Bitcoin's system doesn't easily allow for splitting amounts. To work around this, you’d need to create multiple chunks of Bitcoin in different amounts and have the oracle decide which chunk goes to each person. This approach is quite complicated.
Limited use case
Bitcoin’s scripting initially, couldn't handle more complicated tasks, like managing multi-step contracts, creating decentralized organizations, or setting withdrawal limits.
Data blindness
The inability of Bitcoin's scripting to allow viewing or using important blockchain data like the timestamp, previous block hash, or other details, makes it difficult to create certain applications because they can’t access the contextual data that these elements provide.
Based on the limitations listed above, Vitalik Buterin decided to create the Ethereum blockchain—a platform that reimagines cryptocurrency by enabling the development of decentralized applications on the blockchain through smart contracts.
To send Ethereum to a wallet, you need:
Once you have the wallet address, ETH, and your private key, you create and sign a transaction. The transaction is then sent to the Ethereum network, where it gets confirmed and added to the blockchain.
In Ethereum, contracts can communicate with each other by sending what is called "messages”. These messages are similar to transactions, but instead of coming from a person (like you or me), they come from a program that is already running on the Ethereum blockchain.
Messages are created when a contract uses a specific command to "call" another contract. When this happens, the recipient contract will run its code based on the instructions in the message.
A simple breakdown of how contracts interact in Ethereum:
- Contract A sends a message to Contract B to perform its task, along with 400 units of gas.
- Contract B begins executing its code using the 400 units of gas.
A transaction is created by a person— the sender.
A message is like a transaction but it is created by a contract.
Before a transaction on Ethereum is approved, here's a glimpse of what goes on behind the scenes:
Ethereum makes sure that the transaction is correctly formatted, that the signature (digital fingerprint) is valid, and that it matches the sender's account. If anything is wrong, the transaction is rejected.
The transaction fee is calculated based on how much work the transaction will require. This fee is subtracted from the sender’s account. If the sender doesn’t have enough money to cover the fee, the transaction is rejected.
Unlike Bitcoin, Ethereum uses proof of stake as its consensus mechanism to validate blocks. Before 2022, Ethereum used proof of work to validate blocks which requires more energy than proof of stake.
Proof of work requires participants on a blockchain to solve complex puzzles before a block is approved while proof of stake gives validating power to participants with large stakes in the blockchain’s token.
To easily remember, just think of proof of work as having to do some work and proof of stake as showing that you have staked tokens before being allowed to make important decisions.
Here's how proof of stake works in Ethereum:
Instead of miners solving puzzles to propose new blocks, Ethereum uses validators who have staked their ETH as collateral. Validators are randomly chosen to propose new blocks. This selection is not entirely random but is influenced by the amount of ETH they have staked.
When validators are chosen, they propose a new block that includes transactions and other important data. This block is then broadcast to the network.
Smart contracts are usually written in lines of code as programs or languages that the Ethereum network fully understands. This language is called the Ethereum Virtual Machine code. It contains instructions on what the contract should do when an action is taken.
The Ethereum network runs through these instructions one by one, starting from the beginning and moving through each step until it either finishes or hits a problem.
The code has three main places where it can store and use data:
The EVM code can also use information from the incoming transaction, such as who sent it, how much Ethereum (ETH) is included, and any additional data sent along with it. After the contract runs, it can send back some data as a result, like answering a question or confirming that a task is done.