Lesson 0112 min
SUPPLY & AUTHORITY

Supply Is a Set of Powers, Not a Number

Use a virtual token to separate minting, allocation, vesting, and claims—and watch who retains the power to change supply.

ObjectivesAfter this lesson, you should be able to:
  • Separate total, liquid, and locked supply
  • Explain why mint authority changes holder risk
  • Observe how vesting claims affect allocation and circulation
COURSE POSITIONStep 1 of 4
  1. PREVIOUSCourse introduction
  2. CURRENTSupply Is a Set of Powers, Not a Number

    Use a virtual token to separate minting, allocation, vesting, and claims—and watch who retains the power to change supply.

  3. NEXTWhen Does a Promise of Future Tokens Become Liquid?
BEFORE YOU READ

Think about these questions first.

Choose an answer before opening the explanation. You can add anything unexpected to your review list.

Q01Total supply is one billion. Why might only ten million be sellable?
SHORT ANSWER

Total supply includes vesting contracts, treasuries, and undistributed balances. Price meets circulating inventory and order-book depth, so total supply can overstate immediate supply.

Compared with your prediction:

A token is not just a number that can grow. It is a public promise about who can change what. Start with a minimal balance table and separate supply, authority, allocation, and time before copying an ERC-20 contract.

Separate three kinds of supply

This LAB starts with 1,000,000 total units and a 1,200,000 maximum. 600,000 LAB is already liquid in creator, community, and treasury balances; another 400,000 LAB is recorded in vesting schedules.

  • Total supply: every LAB the state machine recognizes, including locked units.
  • Liquid supply: balances that can be transferred, traded, or used now.
  • Locked supply: allocated units that need time and a claim action before becoming liquid.
SIMULATION ACTIVEVirtual asset · LAB
ASSET 001 · SUPPLY & AUTHORITY

LAB / Virtual token

Every action changes a public state table. Ask who can change supply, who can claim, and who absorbs dilution.

Mint authorityCREATOR SINGLE SIGNERCreator can mint
Total supply1,000,000Cap 1,200,000
Liquid supply600,00060.0% liquid
Locked supply400,000Claimable 0
Mintable200,000room under cap
Allocation & vestingLaunch day
Creator400,000 LAB
Liquid 100,000 · Locked 300,000
Community400,000 LAB
Liquid 300,000 · Locked 100,000
Treasury200,000 LAB
Liquid 200,000 · Locked 0
Learner0 LAB
Liquid 0 · Locked 0
LiquidLocked

Locked units count toward total supply but cannot transfer yet. Color is secondary; numbers and labels are the state.

Observation prompt

Start with the supply map: liquid balances, locked balances, and the mint authority are separate state variables.

Supply events2 EVENTS
  1. 02

    Initial allocation recorded:创建者、社区、国库余额可用;另外 400,000 LAB 处于锁仓.

  2. 01

    LAB created:总供应 1,000,000, 供应上限 1,200,000, 创建者保留增发权限.

ACTION HISTORYExperiment timeline
1 state snapshots

Use the slider to return to an earlier step. Continuing from there replaces the later history with a new sequence.

Initial state
View experiment records →

Maximum supply and mint authority are different gates

The maximum supply answers “how many can ever exist?” Mint authority answers “who can write new units into the balance table?” Even when total supply is unchanged today, a creator who still holds mint authority remains part of the trust model.

Expand: how this step works
mint(to, amount):
  require(msg.sender == mintAuthority)
  require(totalSupply + amount <= maxSupply)
  balance[to] += amount
  totalSupply += amount

claimVesting(holder):
  unlocked = schedule.total × phase / 100%
  amount = unlocked - schedule.claimed
  balance[holder] += amount
  schedule.claimed += amount

Production contracts also handle multisig authority, pauses, upgrades, reentrancy, rounding, and governance changes. This lab keeps the code short so every state change stays inspectable.

KNOWLEDGE CHECK

After mint authority is revoked, what happens when vesting advances and a holder claims?

Four questions for reading a token

  1. What are total supply and maximum supply right now?
  2. Which balances are liquid, and which remain on a vesting schedule?
  3. Who can still call mint, and did revoking authority change that rule?
  4. Which fields change after a transfer, a claim, and a mint?
LESSON RECAPComplete the exercise and knowledge check first