Sub topic 1
Coins and Tokens: What a Token Actually Is
This chapter introduces tokens, the ERC-20 standard, token categories, supply schedules, and the access and incentive roles of utility tokens.
Prerequisites
This chapter assumes you know how blockchains record transactions, how wallets hold keys, and what a smart contract is. You should also be comfortable reading short Python snippets.
Coins and tokens
A coin runs on its own blockchain. Bitcoin and Ether are coins because each network's base layer records them. A token is a unit of value recorded inside a smart contract on a chain that already exists, such as Ethereum. Tokens depend on the host chain for security and for transaction processing.
Token standards and ERC-20 balances
ERC-20 is the most common standard for fungible tokens on Ethereum-compatible chains. Fungible means each unit is interchangeable with every other unit. The contract stores a mapping from addresses to balances and exposes functions such as balanceOf and transfer. The following model shows the core idea:
balances = {"alice": 1_000, "bob": 0}
def transfer(sender, recipient, amount):
if balances.get(sender, 0) < amount:
raise ValueError("insufficient balance")
balances[sender] -= amount
balances[recipient] = balances.get(recipient, 0) + amount
transfer("alice", "bob", 250)
print(balances) # {'alice': 750, 'bob': 250}Three categories and where they overlap
Tokens are usually grouped by purpose: utility, governance, and memecoin. A single token can fall into more than one group.
Supply, allocation, and vesting
Total supply is the number of units that will ever exist. Allocation describes who receives those units at launch, such as the team, investors, or the public. Vesting locks some allocations and releases them over time. Heavy concentration in a few wallets, or large unlocks that arrive at once, can push prices down.
Utility tokens: access, fees, and incentives
A utility token grants a right to use a product or service. Common uses are paying transaction fees, unlocking features, and rewarding users who provide services such as liquidity. Demand depends on how much people need the product, not on speculation alone.
Exercise
A token has a total supply of 1,000,000 units. 300,000 units are locked under a vesting schedule and cannot be sold yet. What share of the supply is freely tradable at launch, assuming no other locks?
Show answer
700,000 units, or 70 percent of total supply, are freely tradable. The locked 300,000 units are excluded until they vest.