跳到主要内容Skip to main content

← 返回链← Back to Chain

协议档案Protocol records

ERC-20:同质化代币的最小接口ERC-20: the minimal interface for fungible tokens

交集:同质化代币的最小公共接口——每个单位等价、可拆分,适合计价、投票、质押与结算;OpenZeppelin 的实现把 name/symbol/decimals 与转账、授权等逻辑封装成可继承合约。
适用范围:官方文档强调 decimals 只是显示约定,链上仍是整数运算;默认 18 位,可按需覆盖。这与「AI Agent 收付款、按 token 计费」的账本层直接相关。
未解决:标准本身不规定发行上限、增发、冻结或合规白名单,这些都由具体合约自行实现;approve/allowance 的授权模型有已知的授权残留风险,集成方要读安全指南,不能把「ERC-20」当作信任保证。
The intersection: the minimal shared interface for fungible tokens — every unit is equivalent and divisible, suiting pricing, voting, staking and settlement; OpenZeppelin’s implementation packages name/symbol/decimals with transfer and allowance logic into an inheritable contract.
Scope: the docs stress that decimals is a display convention only and arithmetic on-chain stays integer; the default is 18 and can be overridden. This is directly relevant to agent payments and per-token billing.
Open: the standard itself does not define supply caps, minting, freezing or compliance allowlists — each contract does; the approve/allowance model carries known residual-approval risk, so integrators need the security guidance and must not treat “ERC-20” as a trust guarantee.

关键参数Key specs

标准 / standard
ERC-20(同质化代币)
精度 / decimals
默认 18,仅显示用;链上整数运算
实现 / implementation
OpenZeppelin Contracts 5.x ERC20
常见用途 / uses
计价、投票、质押、结算
本站口径 / scope
只记录标准与实现,不评价任何代币

官方原文怎么说What the source says

any one token is exactly equal to any other token; no tokens have special rights or behavior associated with them
1 https://docs.openzeppelin.com/contracts/5.x/erc20
All arithmetic inside the contract is still performed on integers
2 https://docs.openzeppelin.com/contracts/5.x/erc20
ERC20 uses a value of 18 for decimals
3 https://docs.openzeppelin.com/contracts/5.x/erc20

资料与许可Source and licence

资料时间Source checked
2026-11-17
许可 / 类型Licence / kind
official-documentation
许可说明Licence evidence
https://docs.openzeppelin.com/contracts/5.x/erc20
类目Category
协议档案Protocol records

去官网看原页Open the official page →

← 返回链← Back to Chain