Web3 GuidesBlockchain

beginner


Introduction

A blockchain is a decentralised, distributed ledger system designed to record and verify transactions across a network of computers. This compels that no single entity or company controls the entire network, promoting a system of collective agreement and transparency. Unlike traditional databases that rely on central authorities (private servers owned by companies who set all the rules and make all the decisions), blockchains operate on a peer-to-peer network where every participant, known as nodes, has access to the entire ledger (the information is spread across multiple nodes or computers and each has an entire copy of the information). This decentralisation enhances both security and transparency, as each transaction is visible to all participants and cannot be altered without consensus (all nodes agreeing) from the network.

The core of blockchain technology lies in its unique distributed or decentralised structure. Transactions are grouped into units called "blocks." Each block contains a list of transactions that have been validated (consensus) by the network. Once a block is filled with transactions, it is added to the existing chain of blocks in a sequential manner that is time stamped. This process creates a continuous, unalterable chain of blocks, hence the name "blockchain." Each block contains a reference to the previous block, forming a chronological sequence. This structure makes it extremely difficult to alter any information in a block without changing all subsequent blocks, which would require the consensus of the majority of the network.

Decentralised consensus

What sets blockchain apart from traditional databases is its decentralised nature and the consensus mechanisms used to validate transactions. In a traditional system, a central authority, such as a bank or government agency, maintains and verifies transactions. In contrast, a blockchain uses various consensus algorithms, like Proof of Work (PoW) or Proof of Stake (PoS), to achieve agreement among nodes. This is how transactions are verified and proved valid. These algorithms validate that all participants agree on the state of the ledger, making it nearly impossible for a single participant to manipulate or fraudulently alter the data.

Blockchains are best known as the underlying technology behind cryptocurrencies such as Bitcoin and Ethereum and they are the base technology of web3. Bitcoin, the first and most well-known cryptocurrency, was created to provide a decentralised digital currency that operates without the need for intermediaries like banks. Its blockchain serves as a public ledger where every transaction is recorded and verified by network participants (nodes), safeguarding the integrity and security of the currency. Similarly, Ethereum introduced the concept of 'smart contracts'—self-executing digital agreements that run on blockchain technology, enabling trustless execution of transactions.

How the Ethereum blockchain works

Ethereum, launched in 2015, is a blockchain that extends beyond simple transactions by enabling the creation of decentralised applications (dApps) and smart contracts. Here’s an overview of how Ethereum’s blockchain operates:

  1. Smart Contracts: Smart contracts are self-executing contracts with the terms of the agreement written directly into code. They run on the Ethereum Virtual Machine (EVM), a decentralised computing environment that executes the code (terms and conditions) of smart contracts. When a network participant interacts with a smart contract, the contract executes the agreed-upon actions, such as transferring funds or updating records. Smart contracts enable trustless transactions that don't need to be verified by intermediaries.
  2. Ethereum Virtual Machine (EVM): The EVM is a critical component of Ethereum. It provides a runtime environment for executing smart contracts and dApps. The EVM is decentralised, meaning that the execution of code occurs across all nodes in the Ethereum network. Distributed execution validates that smart contracts are executed consistently and transparently.
  3. Ethereum Accounts: Ethereum supports two types of accounts—externally owned accounts (EOAs) and contract accounts. EOAs are controlled by private keys and can send and receive Ether (ETH), the native cryptocurrency of Ethereum. Contract accounts, on the other hand, are controlled by the code of smart contracts and can interact with EOAs and other contracts.
  4. Transactions and Gas: Transactions on the Ethereum network involve sending Ether or interacting with smart contracts. Each transaction requires a certain amount of computational work, measured in "gas." Gas is a unit of measure for computational effort, and users must pay for gas to execute transactions and smart contracts. Gas costs exist so that the network remains efficient and prevents spam or abuse.
  5. Consensus Mechanism - Proof of Stake (PoS): Ethereum initially used Proof of Work (PoW) as its consensus mechanism, but it has transitioned to Proof of Stake (PoS) with the Ethereum 2.0 upgrade. PoS is a more energy-efficient consensus algorithm where validators are chosen to create new blocks based on the amount of cryptocurrency they hold and are willing to "stake" as collateral. Validators are rewarded for participating in the network and safeguarding its security, while also being penalized for dishonest behavior.
  6. Interoperability and Tokens: Ethereum’s blockchain also enables the creation of various tokens through standards such as ERC-20 and ERC-721. ERC-20 tokens are fungible tokens used for creating cryptocurrencies and other digital assets. ERC-721 tokens are non-fungible tokens (NFTs) that represent unique digital items or assets. These tokens expand Ethereum’s functionality and facilitate the development of diverse applications and ecosystems.

Aave.com provides information and resources about the fundamentals of the decentralised non-custodial liquidity protocol called the Aave Protocol, comprised of open-source self-executing smart contracts that are deployed on various permissionless public blockchains, such as Ethereum (the "Aave Protocol" or the "Protocol"). Aave Labs does not control or operate any version of the Aave Protocol on any blockchain network.