# Blockchains

In many ways, a blockchain is similar to an online bank account.  It is an electronic database that stores digital assets (such as cryptocurrencies or NFTs) along with a record of who owns them.  For example, the Ethereum blockchain may have a record that says that account “0xb794f5ea0ba39494ce839613fffba74279579268” owns 10 Ethereum tokens and one Mutant Ape NFT.&#x20;

&#x20;                                         **Database of Actual Balances on the Bitcoin Blockchain**

<figure><img src="/files/mBF0ZG51vIoNUvI365Or" alt=""><figcaption><p>Source:  <a href="https://www.blockchain.com/explorer/assets/btc">Bitcoin Block Explorer</a>.  Addresses were selected at random.  Data as of 9.7.22.</p></figcaption></figure>

Unlike a traditional bank account, however, blockchains are distributed and decentralized:&#x20;

1. **Distributed:**  Instead of being hosted in a single location, they are hosted across thousands of individual computers located all over the globe
2. **Decentralized:**  Blockchains are not controlled by any one party

Let’s take a look at each of these concepts…

## **How is a Blockchain Distributed?**

Unlike traditional databases that live in a geographically centralized “server farms” (such as the ones owned by Amazon or Google), decentralized ledgers are hosted across thousands of individual computers located all over the globe.

These computers are called “nodes”, and they each contain an identical copy of the account balances and transaction history of a blockchain’s database.

&#x20;          **Decentralized Ledgers are Distributed Across Thousands of Individual Computers**

<figure><img src="/files/VSwwacqbxjBhg5BIZ5vT" alt=""><figcaption></figcaption></figure>

This distribution is very important because it means that: 1) it’s almost impossible for a third party to turn them off, 2) they are extremely resilient to hardware failures and 3) practically speaking, a distributed architecture is needed to design a decentralized system.&#x20;

## **How is a Blockchain Decentralized?**

Traditional banks have always been trusted to protect consumer’s assets.&#x20;

In the old world they did this by storing money in secure vaults and defending it with armed guards.  In the information age – where over 92% of money exists only in digital form – they do this with an army of accountants, auditors and cybersecurity experts.  These professionals monitor accounts, check for fraud and assure that no one hacks the system and manipulates account balances.&#x20;

Unlike traditional bank accounts, blockchains can’t rely on an in-house staff to safeguard a user’s assets and assure that no one tampers with the balances.  Instead, they rely on a process known as “hashing” to protect the books.&#x20;

To initiate the hashing process, blockchains organize all incoming transactions into groups known as “blocks”.  These blocks have a limited storage capacity, so when they become full, they are locked and linked to the previous block with a “hash”.  This forms a chain – hence the name, blockchain.

<figure><img src="/files/wISM8z9DCDXetSDVpTKN" alt=""><figcaption><p>Source: ig.com</p></figcaption></figure>

These hashes are extremely important because they make blockchains immutable – that is, data (such as your Bitcoin or Ethereum balance) can’t be deleted, tampered with or changed once it is locked into the chain.  &#x20;

This is due to the unique properties of hashing, a cryptographic process that takes a given set of information and converts it into a unique code.  For example, the word “fox” could be hashed as DFTY786DCFJ894SUSH865AAHJAI978 and the sentence “the quick brown fox jumps over the lazy dog” could be hashed as SOIAUYA7865ASLUAN098A5489USYAN.  There are three important things to note about hashes:

* Virtually anything can be hashed (i.e. you can hash a word, a sentence or the entirety of War and Peace)
* Hashes are always unique (i.e. if you changed a single letter in War and Peace you would get a completely different hash)
* It’s impossible to guess the original data from looking at the hash (i.e. you wouldn’t know that DFTY786DCFJ894SUSH865AAHJAI9785 was “fox”)

Because all new blocks are required to store the hash of the previous block, it’s easy to see if the blockchain has been tampered with.  If the hash contained in the new block matches the old, you know that the data is secure.  If they are different, everyone will know that the block has been manipulated.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.digitalnations.xyz/web3-overview/how-do-decentralized-economies-work/decentralized-ledgers/blockchains.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
