02 From zero · Crypto markets

The blockchain

The ledger thousands of machines copy at the same time. What a block is, why it carries a summary of the one before it, and why that makes erasing the past too expensive to be worth it.

Renato UlianovOpening · 22 s · in Portuguese

The sentence
The block closed with the transaction inside, joined the chain and became the first confirmation; whoever paid a higher fee left the queue first.

Blurred on purpose. Five words describing a single mechanism.

The problem it solves

A ledger with no owner

Every money system has to answer the same question: who writes in the book? At a bank, the bank does. And it works — as long as you trust the bank, and as long as the bank is open.

A blockchain answers differently: nobody and everybody. Every machine on the network keeps a full copy of the book and follows the same rule for accepting a new page. There is no original — there are thousands of copies that have to agree.

The obvious problem with that is fraud: if anyone can write, what stops someone from going back and erasing a payment they already made? The answer is the structure of the chain, and that is what this lesson is about.

The chain

Each block signs the one before

A block is a batch of transactions with two extra things: a summary of its own contents and the summary of the previous block. The summary is a number computed from the contents, and it changes entirely if a single letter changes.

That is what ties the chain together. Block 903 says where it came from: from the block whose summary is such and such. If 902 is altered, its summary changes, and 903 now points at a block that no longer exists.

Tap a block to see what is inside. Then use the tamper button and watch what happens to every block that came after.

The summary here is a toy one, a few digits long, so it fits on screen. The real one is sixty-four characters and comes from a function nobody knows how to reverse. The mechanism, though, is exactly this.
Why nobody rewrites

Not forbidden — expensive

Nothing stops someone from rewriting an old block in their own copy. What stops them is everyone else: for the network to accept the new version, it would have to arrive with every following block redone, and get there before the real chain moves one step further.

Redoing a block costs computer work — lesson 03 shows exactly what kind. Redoing ten blocks costs ten times that, racing the entire network. Which is why the deeper a block sits, the more final it is. That is all a confirmation is: how many blocks came on top of yours.

The queue

Very little fits in each block

A block has a size limit, and comes out every so often. While the next one hasn't closed, transactions wait in a waiting room — and whoever picks which ones get in does not pick by order of arrival.

They pick by fee. Each transaction offers an amount per unit of space, and the highest offers go first. Drag to see the effect.

    Illustrative numbers. What the figure shows is the rule, not the price: the queue is an auction for space, which is why fees rise when many people want to transfer at once — and fall overnight.
    The proof

    Now read the sentence

    It's the same one from the top, unblurred. Tap each highlighted part.

    The closed with the transaction inside, joined the and became the first ; whoever paid a higher left the first.
    Start here

    Five words

    All of them describe the same mechanism, from different angles. Tap one.

    Five taps and the sentence is done.

    You can already answer these

    If this landed, the lesson did what it promised

    • Each block carries the summary of the previous one — that ties the chain.
    • Rewriting the past isn't forbidden; it's too expensive to be worth it.
    • A confirmation is how many blocks came on top, not a stamp.
    • A fee is a bid for space in a block, so it rises when the queue fills.

    Renato UlianovClosing · 33 s · in Portuguese

    Educational material. The blocks, summaries and queue on this page are illustrative: they exist to show the mechanism, and represent no real network and no real fee level. It is not investment advice.