Skip to content

Latest commit

 

History

History
89 lines (64 loc) · 5.13 KB

File metadata and controls

89 lines (64 loc) · 5.13 KB

The Control Spectrum

The conceptual spine of this course. Everything maps back to this.


The idea

Most explanations of "tokens on a blockchain" jump straight to smart contracts. But on Stellar, the richest lessons about assets live in the base protocol itself — no contract required. An asset is issued by an account, held through a trustline, and governed by a handful of flags. Those primitives encode a surprisingly complete answer to one question:

Quem controla este ativo, e onde essa autoridade está codificada? (Who controls this asset, and where is that authority encoded?)

Control is not a yes/no. It is a spectrum — a single axis running from the holder's sovereignty to the issuer's authority — and every classic-asset mechanism is a nameable point on it. A token can be an open, ungoverned promise; or a tightly regulated stablecoin the issuer can freeze and claw back; or something whose price is no longer controlled by any account at all, because it now lives inside an automated market maker.

This course makes that axis tangible by issuing one asset — a fictional community stablecoin cBRL from a "casa da moeda comunitária" — and walking it across the whole spectrum, one class at a time.


The spectrum, as the course lays it out

     AUTORIDADE DO DETENTOR ◄──────────────────────────────► AUTORIDADE DO EMISSOR
            (soberania)                                            (controle)

 XLM nativo    trustline       ativo básico     AUTH_REQUIRED /     AUTH_CLAWBACK
 (sem          = consentir      (só emitir;       AUTH_REVOCABLE     = confiscar
  emissor)      ou recusar       supply            = autorizar /       saldo
                                 infinito)         congelar
                        lock do issuer (masterWeight=0): supply fixo, irreversível
                └──────────────── AMM / pool de liquidez ────────────────┘
                    o controle do MERCADO sai das contas e vira
                    uma fórmula:  x · y = k   (autoridade no código)
Point on the axis What it is Where the control is encoded
XLM (native) No issuer at all Nobody controls it; no trustline needed. The baseline of holder sovereignty.
Trustline The holder's consent to hold an asset A changeTrust operation on the holder's account. Without it, the holder cannot receive the asset — control starts as consent.
Basic issued asset A bare promise, CODE:ISSUER The issuer can payment more into existence forever. Supply is unbounded; backing is pure off-chain trust.
AUTH_REQUIRED / AUTH_REVOCABLE A gated asset Flags on the issuer account. The issuer must authorize each trustline, and can freeze one — setTrustLineFlags.
AUTH_CLAWBACK_ENABLED A seizable asset A flag on the issuer; clawback pulls a balance back. But only binds trustlines opened after the flag was set.
Locked issuer A fixed-supply asset setOptions({ masterWeight: 0 }). The issuer renounces its own authority — irreversibly.
AMM / liquidity pool Control ceded to code Off the account axis entirely. The exchange rate is a constant-product formula x·y=k, not any account's decision.

This table is the spine of the whole course. Each class anchors on one region of it.


The through-line question

One question runs across all three classes:

"Quem controla este ativo, e onde essa autoridade está codificada?"

Every class answers it by pointing at a concrete on-chain location — a trustline, a master-key weight, a setTrustLineFlags op, a clawback op, or nobody (the pool). If you can always answer it, you understand Stellar assets.


Why teach it as one asset across three classes

The single most important moment in the course is locking the issuer. Before you lock it, cBRL is a promise you can inflate at will. The instant you set masterWeight: 0, the issuer can never mint again — the asset's supply becomes credibly fixed, and the issuer has given away its own power. You cannot demonstrate that trade-off with a token in isolation; you need to have held the power first (Class 2), and you need somewhere for the now-fixed asset to trade (Class 3). The three classes are one arc: the asset is born (Class 1), is governed (Class 2), and is set loose in a market (Class 3).


Where each class sits

Class Title Region of the spectrum What it builds
1 (class-1-emissao-trustlines) Emissão & Trustlines Left of the axis + the axis itself Issue cBRL; trustlines as consent; distribute
2 (class-2-controle-stablecoin) Controle de Ativos & Stablecoins Right of the axis + renunciation Auth flags, freeze, clawback, lock-the-issuer
3 (class-3-liquidez-amm) Liquidez & AMM Nativo Off the axis — control ceded to code Liquidity pool, deposit, path-payment swap

Each class ships on its own cumulative branch (see implementation-plan.md).