Sub topic 9
Coins versus tokens
This chapter assumes you know what a blockchain ledger is, that Ethereum runs smart contracts, and that gas is the fee for computation. It also assumes you can read short Python snippets. By the end you should be able to classify any asset as a coin or a token and say what that choice means for fees, security, and risk.
The working definition
A coin is the native asset of a blockchain. The protocol itself defines it, and the base layer of the chain tracks it. Bitcoin (BTC) on Bitcoin and ether (ETH) on Ethereum are coins. Coins usually do three jobs:
- They pay transaction fees.
- They pay block rewards or staking rewards to the participants who secure the network.
- They are the unit the consensus rules count directly.
A token is an asset recorded by a program running on top of another blockchain. On Ethereum that program is a smart contract. The chain does not know the token exists as a special thing. It only runs the contract's code, and the code keeps a table of who owns how much.
The test is where the balance lives:
- If the protocol's own account or UTXO data holds the balance, it is a coin.
- If a contract's storage holds the balance, it is a token.
What a token contract actually is
A basic fungible token is a mapping from addresses to integers, plus rules for changing it. The sketch below models that in Python. It is not a real contract, but the logic matches what a standard token does.
class ToyToken:
def __init__(self, name, symbol, decimals, initial_supply, owner):
self.name = name
self.symbol = symbol
self.decimals = decimals
self.total_supply = initial_supply
self.balances = {owner: initial_supply}
def balance_of(self, account):
return self.balances.get(account, 0)
def transfer(self, sender, recipient, amount):
if amount < 0:
raise ValueError("amount must be non-negative")
if self.balance_of(sender) < amount:
raise ValueError("insufficient balance")
self.balances[sender] -= amount
self.balances[recipient] = self.balance_of(recipient) + amount
def display(self, account):
raw = self.balance_of(account)
whole, frac = divmod(raw, 10 ** self.decimals)
return f"{whole}.{frac:0{self.decimals}d} {self.symbol}"
token = ToyToken("Example Dollar", "EXD", 6, 1_000_000 * 10**6, "alice")
token.transfer("alice", "bob", 2_500_000) # 2.5 EXD in raw units
print(token.display("alice"))
print(token.display("bob"))
print(token.total_supply == sum(token.balances.values()))Three details matter here:
- Raw integers. Contracts store whole numbers only. The
decimalsfield is a display hint for wallets. USDC uses 6 decimals, and many tokens use 18, as ether does. If you assume the wrong decimals when reading raw data, your numbers will be off by a power of ten. - The conservation check. The final line prints
True. A transfer moves value between entries and never changes the total. Only code paths for minting or burning can change it. - Contract rules, not protocol rules. Anything the contract's author wrote is enforced. That includes extras such as pausing transfers, blocking addresses, or creating new supply.
Token standards
A standard is an agreed interface so wallets and exchanges can handle every token the same way. On Ethereum, these are the common ones:
| Standard | What it represents | Typical use |
|---|---|---|
| ERC-20 | Fungible units, where any unit equals any other | Stablecoins, governance tokens, utility tokens |
| ERC-721 | Unique items, each with its own ID | Collectibles, deeds, tickets |
| ERC-1155 | Many fungible and unique items in one contract | Game items, bundled collections |
ERC-20 defines functions including totalSupply, balanceOf, transfer, approve, allowance, and transferFrom. It also defines Transfer and Approval events. Wallets show your token balance by calling balanceOf on the contract, not by reading a field in your account.
Other chains have equivalents. BNB Chain uses BEP-20, which copies the ERC-20 interface. Solana uses its SPL Token program, and Tron uses TRC-20. Bitcoin has no general smart contracts, but token-like schemes exist, such as Omni Layer, Runes, and BRC-20 inscriptions. These work by social convention. Indexer software reads data embedded in Bitcoin transactions and agrees on how to interpret it. Bitcoin nodes do not validate token rules.
How the layers fit together
Notice that the user's fee goes to the coin layer even when the thing being moved is a token. This leads to the first practical consequence.
Practical consequences
Fees are paid in the coin
To send an ERC-20 token on Ethereum, you pay gas in ETH. A wallet holding only USDC and no ETH cannot move that USDC. People often get stuck this way after buying a token on a new network. Some systems work around it with account abstraction or relayers that sponsor fees, but the underlying fee is still paid in the coin.
A token transfer also costs more gas than a plain coin transfer. A plain ETH transfer uses 21,000 gas. A typical ERC-20 transfer runs a contract, writes to storage, and emits an event, so it commonly uses about 45,000 to 65,000 gas. The exact figure depends on the contract.
Security is inherited, then reduced
A token's ledger is only as secure as the chain beneath it, so double-spending a token requires attacking Ethereum itself. The token adds a second layer of risk on top:
- The contract may have bugs.
- The contract may have an owner key with special powers.
- The contract may be upgradeable, so its rules can change after launch.
A coin's rules come from the protocol and change only through the network's social process. A token's rules are whatever the contract allows. When you evaluate a token, read what privileged functions exist and who controls them.
Supply is set by the issuer's code
Bitcoin's 21 million cap is enforced by every node. A token's cap is enforced only if the contract has no minting function, or if minting is locked. Some token issuers can create more supply, and some can freeze balances. Centrally issued stablecoins such as USDC and USDT include blacklist features for this reason.
Governance and value capture differ
A coin is usually needed to use the chain, so demand for blockspace creates demand for the coin. A token's link to a project's success is often weaker. It might grant votes on a protocol, a discount on fees, a claim on revenue, or nothing beyond being tradable. Ask what the token concretely does and whether it could be replaced without breaking the system.
Edge cases and common errors
- Same name, different asset. Anyone can deploy a contract named "USDC" or "Ether". The real asset is identified by its contract address on a specific chain, so check the address against the issuer's official documentation.
- Wrong network. USDT exists on Ethereum, Tron, Solana, and others as separate contracts with separate balances. Sending to the right address on the wrong network can leave funds unrecoverable, depending on the receiving service.
- Sending tokens to a token contract. The contract has no way to return tokens it was not designed to receive, so they are usually stuck for good.
- Unlimited approvals.
approvelets another address spend your tokens up to a limit. Many apps ask for the maximum value. A compromised or malicious spender can then drain that token from your wallet. Revoke approvals you no longer need. - Odd token behavior. Some tokens take a fee on every transfer, change balances automatically (rebasing), or return no value from
transfer. Software that assumes plain ERC-20 behavior can miscount. - Wrapped assets. WETH is ether wrapped in an ERC-20 contract so contracts can treat it like any other token. WBTC represents bitcoin held by a custodian on Ethereum. Wrapping adds trust in the wrapper, since you depend on the contract and, for WBTC, on the custodian.
Borderline cases
The categories blur in a few places:
- A coin on one chain can be a token on another. USDT started on Bitcoin's Omni Layer and later moved to many chains as a token. ETH bridged to another chain appears there as a token.
- Layer 2 networks. Rollups such as Arbitrum and Optimism use ETH as the gas coin for their users, even though they have their own tokens for governance. Their native fee asset and their governance token are different things.
- A project that launches as a token and later its own chain. Many projects begin as ERC-20 tokens. They later migrate to a new chain and swap the old token for a native coin. Before the migration it is a token, and after it, a coin.
The rule stays the same. Ask who tracks the balance: the protocol, or a program on top of it.
Quick classification checklist
- Does the asset pay fees on its own chain? If yes, it is probably a coin.
- Is there a contract address for it? If yes, it is a token.
- Which chain is the contract on? That chain decides the fee asset and the security base.
- Can the issuer mint, freeze, or upgrade? If yes, add that trust to your risk assessment.
Exercise
A friend holds 500 units of an ERC-20 stablecoin on Ethereum and zero ETH. They try to send the stablecoin to you and the wallet refuses. Explain why, and name one more risk that comes from the asset being a token rather than a coin.
Show answer
Sending an ERC-20 token calls a function on the token's contract, and every Ethereum transaction must pay gas in ETH, the native coin. With a zero ETH balance, your friend cannot pay the fee, so the transfer cannot be submitted. They need a little ETH, or a service that sponsors the fee. A risk specific to tokens is that the contract's code defines the rules. The issuer may be able to mint more supply, freeze or blacklist addresses, or upgrade the contract. The token also inherits any bugs in that code, whereas a coin's rules are enforced by the protocol itself.