Lição 03 · Unit 1 · Web3 with Go and Polygon
How a Blockchain Actually Works
You've connected to Polygon and read a balance — but what is the thing you're reading from? This lesson is pure mental model, no new code. You told me Web3 theory is the gap, so we close it here. Get these six ideas straight and every later lesson — deploying the token, minting shares, reading events — becomes "of course it works that way" instead of magic.
1 · It's a shared state machine
Forget "chain of blocks" for a second. The useful way to think about Polygon is a single giant spreadsheet — the state — that everyone shares. The state records, for every account: its balance, and (for contracts) its stored data. Your property-share contract's slice of that spreadsheet will say "address 0xABC owns 40 shares."
A blockchain is that spreadsheet plus a rule for how it's allowed to change. The only way to change it is a transaction.
2 · Transactions are the only edits
A transaction is a signed instruction to change the state: "move 5 POL from me to this
address", or "call transfer(0xABC, 40) on the share contract". Two things make it
trustworthy:
- It's signed
- Authorized by the sender's private key (Unit 2 makes this concrete). Nobody can move your investors' shares without the right key — that's what makes on-chain ownership ownership.
- It's deterministic
- Given the same starting state, the transaction produces the same new state on every computer that runs it. No surprises, no "it worked on my machine".
Reads (like BalanceAt) are free and change nothing. Only transactions cost gas and move
state.
3 · Blocks batch the edits — and lock them
Transactions are gathered into a block roughly every 2 seconds on Polygon. Each block carries a cryptographic hash of the block before it. Chain them and you get the "blockchain": change one old transaction and its block's hash changes, which breaks every block after it. That's immutability — the audit trail your client's lawyers will love. History is append-only.
4 · Consensus makes it trustless
The spreadsheet isn't stored in one company's database — many independent nodes each keep a copy and must agree on the next block. Polygon uses proof-of-stake: validators lock up (stake) tokens and are rewarded for honest blocks, slashed for cheating. No single party can rewrite ownership records or quietly hand themselves your investors' shares. That is the whole point of putting property shares on-chain instead of in a normal SQL table you control.
5 · Gas: computation isn't free
Every operation a transaction performs costs gas, paid in the chain's native token
(POL on Polygon). Two reasons it exists:
- Anti-spam: if edits were free, attackers would flood the network.
- Halting: a paid-per-step model guarantees no contract can loop forever — it runs out of gas and reverts.
On Polygon gas is tiny (fractions of a cent), which is exactly why real tokenization projects pick it over Ethereum L1. Reads cost zero; a mint or transfer costs a little gas. This is also why your Lesson 01 faucet habit matters: gas is small but never zero.
6 · The EVM runs the code
When a transaction calls a contract, every node runs that contract's bytecode on the
EVM (Ethereum Virtual Machine) — a deterministic mini-computer baked into the chain.
Polygon is EVM-compatible, so the same Solidity contracts, the same go-ethereum
tooling, and the same standards (ERC-20, ERC-3643) all just work. Your share token is EVM
bytecode; "deploying" it means writing that bytecode into a new contract account's slot in
the state.
Polygon PoS vs Ethereum — the honest paragraph
Polygon PoS is not Ethereum. It is its own chain with its own, much smaller validator set (on the order of a hundred validators versus Ethereum's hundreds of thousands), which periodically checkpoints its state to Ethereum. That design is a trade, and you should be able to say it plainly to your client: Polygon gives up some of Ethereum's decentralization and gets ~2-second blocks and sub-cent fees in return — which is what makes minting and transferring property shares economically sane. The security your product actually depends on — who may hold and transfer shares — will live in the token contracts themselves (that's Act III and ERC-3643), and those rules are enforced identically on any EVM chain. See Polygon's PoS docs and the Amoy announcement for the specifics.
Put it together: the life of one share transfer
Click the steps in the order they happen. (Recall, don't peek.)
Check yourself
1. The only way to change on-chain state is by sending a…
2. What makes old blocks effectively impossible to edit?
3. Gas exists mainly to stop spam and to…
4. Polygon being "EVM-compatible" means it runs the same…
5. What does Polygon PoS trade away, relative to Ethereum, for cheap fast blocks?
ethereum.org — Intro to Ethereum (accounts, transactions, the EVM) and its companion Gas and fees page. High-trust, vendor-neutral, and it maps one-to-one onto Polygon.
Sou seu professor — traga suas perguntas difíceis de “mas por quê”. Exporte seu progresso na página do curso e cole no /teach.