concepts
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseEthereum Concepts
Ethereum 相关概念
What You Probably Got Wrong
你可能误解的点
"Smart contracts run automatically." No. Smart contracts cannot execute themselves. There is no cron job, no scheduler, no background process. Every function needs a caller who pays gas. This single misconception is the root cause of most broken onchain designs.
"Just add a timer." There are no timers. If something needs to happen at a certain time, you need someone to call the function at that time — and you need to give them a reason to do it.
"The protocol team will handle that." The whole point of decentralization is that no single team operates the system. If your design requires an operator, it's not decentralized — and it has a single point of failure.
Terminology: You say "on-chain." The Ethereum community says "onchain" — one word, no hyphen.
“智能合约会自动运行。” 错。智能合约无法自行执行,没有定时任务(cron job)、调度器或后台进程。每个函数都需要调用者支付gas才能执行。这一误解是大多数链上设计失败的根源。
“加个定时器就行。” 链上没有定时器。如果需要在特定时间执行操作,你得让某人在那个时间调用函数——并且要给他们足够的理由这么做。
“协议团队会处理这件事。” 去中心化的核心就在于没有单一团队运营系统。如果你的设计需要一个操作者,那它就不是去中心化的——并且存在单点故障。
术语说明: 你可能会写成“on-chain”,但以太坊社区的标准写法是**“onchain”**——一个单词,不加连字符。
Nothing Is Automatic — Incentive Design
没有什么是自动的——激励设计
This is the most important concept in all of Ethereum. If you internalize nothing else, internalize this.
这是以太坊开发中最重要的概念。如果你只能记住一个点,就记住这个。
Smart Contracts Are State Machines
智能合约是状态机
A smart contract is a state machine. It sits in one state, and it moves to another state when someone pokes it — calls a function, pays gas, triggers a transition. Between pokes, it does absolutely nothing. It doesn't think, it doesn't check, it doesn't wake up. It just sits there.
State A ──[someone calls function]──→ State B ──[someone calls function]──→ State C
↑ ↑
WHO does this? WHO does this?
WHY would they? WHY would they?There is no cron job. There is no scheduler. There is no background process. The blockchain doesn't call your contract — people call your contract. And people don't do things for free.
For EVERY state transition in your system, you must answer:
- Who pokes it? (someone must pay gas)
- Why would they? (what's their incentive?)
- Is the incentive sufficient? (covers gas + profit?)
If you can't answer these questions, that state transition will never happen. Your contract will sit in State A forever, doing nothing, with nobody poking it.
智能合约是一种状态机。它处于某个状态,只有当有人触发它——调用函数、支付gas、触发状态转换——时,才会切换到另一个状态。在两次触发之间,它完全不会有任何动作。它不会思考、不会检查、不会“唤醒”,只是静止在那里。
状态A ──[有人调用函数]──→ 状态B ──[有人调用函数]──→ 状态C
↑ ↑
谁来做这件事? 谁来做这件事?
他们为什么要做? 他们为什么要做?没有定时任务,没有调度器,没有后台进程。区块链不会主动调用你的合约——只有人会调用。而且人们不会免费做事。
对于你系统中的每一次状态转换,你必须回答三个问题:
- 谁来触发它?(必须有人支付gas)
- 他们为什么要这么做?(他们的激励是什么?)
- 激励是否足够?(能覆盖gas成本并带来利润吗?)
如果你无法回答这些问题,这个状态转换就永远不会发生。你的合约会一直停留在状态A,毫无动作,没人会触发它。
Incentives Are Everything
激励就是一切
Here's the thing that makes Ethereum magical: you don't need an operator if you get the incentives right.
The people who deployed Uniswap didn't deploy the liquidity. They didn't market-make. They didn't run the exchange. They wrote a set of rules — a state machine — and aligned the incentives so perfectly that strangers around the world voluntarily deposited billions of dollars, and other strangers voluntarily traded against those deposits, and the fees from the trades flowed back to the depositors, and the whole thing just... worked.
Nobody runs Uniswap. Nobody CAN stop Uniswap. Not even the people who made it. The contracts are immutable, the incentives are self-sustaining, and the system will run for as long as Ethereum exists. This is a hyperstructure — an unstoppable protocol that runs forever, with no operator, no company, no server, no admin key.
That's what you're building toward. Not a startup. Not a service. A set of rules so well-designed that they run themselves through incentives alone.
以太坊的神奇之处在于:如果激励设计得当,你根本不需要操作者。
Uniswap的开发者并没有提供流动性,没有做市,也没有运营交易所。他们只是编写了一套规则——一个状态机——并完美地对齐了激励机制,以至于全球各地的陌生人主动存入了数十亿美元,其他陌生人主动在其中交易,交易产生的手续费流回给流动性提供者,整个系统就这样……自行运转起来了。
没有人运营Uniswap,甚至连它的创造者都无法停止它。合约是不可变的,激励是自我维持的,只要以太坊存在,这个系统就会一直运行下去。这就是一种hyperstructure——一种不可阻挡的协议,无需操作者、公司、服务器或管理员密钥,就能永久运行。
这才是你要构建的目标:不是一家初创公司,不是一项服务,而是一套设计精妙的规则,仅靠激励就能自行运转。
Examples of Good Incentive Design
优秀激励设计的例子
Liquidations (Aave, Compound):
Loan health factor drops below 1
→ ANYONE can call liquidate()
→ Caller gets 5-10% bonus collateral as profit
→ Bots compete to do it in milliseconds
→ Platform stays solvent without any operator, any admin, any teamLP fees (Uniswap):
DEX needs liquidity to function
→ LPs deposit tokens into pools
→ Every swap pays 0.3% fee to LPs
→ More liquidity = less slippage = more traders = more fees = more liquidity
→ Self-reinforcing flywheel — nobody manages itYield harvesting (Yearn):
Rewards accumulate in a pool
→ ANYONE can call harvest()
→ Caller gets 1% of the harvest as reward
→ Protocol compounds automatically via profit-motivated callersArbitrage (keeps prices correct everywhere):
ETH is $2000 on Uniswap, $2010 on SushiSwap
→ Anyone can buy low, sell high
→ Prices equalize across ALL markets without any coordinator清算机制(Aave、Compound):
贷款健康因子低于1
→ 任何人都可以调用liquidate()函数
→ 调用者可获得5-10%的抵押品作为奖励
→ 机器人会在毫秒级内竞争执行
→ 平台无需任何操作者、管理员或团队就能保持偿付能力流动性提供者手续费(Uniswap):
去中心化交易所(DEX)需要流动性才能运作
→ 流动性提供者(LP)将代币存入资金池
→ 每笔交易向LP支付0.3%的手续费
→ 流动性越多 → 滑点越低 → 交易者越多 → 手续费越多 → 流动性越多
→ 自我强化的飞轮效应——无人管理收益收割(Yearn):
奖励在资金池中累积
→ 任何人都可以调用harvest()函数
→ 调用者可获得收割收益的1%作为奖励
→ 协议通过追求利润的调用者实现自动复利套利(维持全市场价格一致):
ETH在Uniswap上价格为2000美元,在SushiSwap上为2010美元
→ 任何人都可以低买高卖
→ 无需协调者,所有市场的价格就会自动趋于一致Examples of BAD Design (Missing Incentives)
糟糕设计的例子(缺失激励)
❌ "The contract will check prices every hour"
→ WHO calls it every hour? WHY would they pay gas?
→ Fix: make it profitable to call. Or let users trigger it when they interact.
❌ "Expired listings get automatically removed"
→ Nothing is automatic. WHO removes them? WHY?
→ Fix: give callers a small reward, or let the next user's action clean up stale state.
❌ "The protocol rebalances daily"
→ WHOSE gas pays for this? What's their profit?
→ Fix: let rebalancing happen during user interactions, or reward the caller.
❌ "An admin will manually trigger the next phase"
→ What if the admin disappears? Gets hit by a bus? Loses their key?
→ Fix: make phase transitions permissionless with time-based or condition-based triggers.The fix is always the same: Don't use an admin account. Make the function callable by anyone. Give them a reason to call it. Align incentives so the system pokes itself through the self-interest of its participants.
❌ “合约每小时会检查一次价格”
→ 谁每小时调用它?为什么要支付gas?
→ 修复方案:让调用有利可图,或者让用户在交互时触发检查。
❌ “过期的挂单会自动被移除”
→ 没有什么是自动的。谁来移除它们?为什么?
→ 修复方案:给调用者小额奖励,或者让下一位用户的操作清理过期状态。
❌ “协议每日进行再平衡”
→ 谁来支付gas成本?他们能获得什么利润?
→ 修复方案:让再平衡在用户交互时进行,或者给调用者奖励。
❌ “管理员会手动触发下一阶段”
→ 如果管理员消失了?发生意外了?丢失密钥了?
→ 修复方案:基于时间或条件触发阶段转换,无需权限。修复方案始终是一样的: 不要使用管理员账户。让函数可以被任何人调用。给他们调用的理由。对齐激励机制,让系统通过参与者的自身利益自行触发运转。
The Hyperstructure Test
Hyperstructure 测试
When you're designing a system, ask: "Could this run forever with no team behind it?"
- If yes → you've built a hyperstructure. The incentives sustain it.
- If no → you've built a service. It dies when the team stops operating it.
Both are valid choices. But know which one you're building. The most powerful things on Ethereum are hyperstructures: Uniswap, ENS, the ERC-20 standard itself. They can't be stopped, they can't be censored, they can't go down. Not because they're maintained — because they don't need to be.
当你设计系统时,问问自己:“这个系统没有团队维护也能永久运行吗?”
- 如果是 → 你构建了一个hyperstructure。激励机制能维持它的运转。
- 如果不是 → 你构建了一项服务。当团队停止运营时,它就会消亡。
这两种选择都是合理的,但你要清楚自己在构建什么。以太坊上最强大的事物都是hyperstructure:Uniswap、ENS、ERC-20标准本身。它们无法被停止、审查或下线,不是因为有人维护,而是因为它们根本不需要维护。
Randomness Is Hard
随机性很难实现
Smart contracts are deterministic. Every node computes the same result. You can't use — there's nothing random about a system where everyone gets the same answer.
Math.random()智能合约是确定性的,每个节点都会计算出相同的结果。你不能使用——在一个所有人得到相同结果的系统里,根本不存在随机性。
Math.random()What Doesn't Work
无效的实现方式
solidity
// ❌ Validators can manipulate block.timestamp (within ~15 seconds)
uint random = uint(keccak256(abi.encodePacked(block.timestamp)));
// ❌ blockhash(block.number) is ALWAYS zero for the current block
uint random = uint(blockhash(block.number));
// ❌ Validators can withhold blocks if they don't like the result
uint random = uint(blockhash(block.number - 1));solidity
// ❌ 验证者可以操纵block.timestamp(误差约15秒)
uint random = uint(keccak256(abi.encodePacked(block.timestamp)));
// ❌ 当前区块的blockhash(block.number)始终为0
uint random = uint(blockhash(block.number));
// ❌ 如果验证者不喜欢结果,可以扣留区块
uint random = uint(blockhash(block.number - 1));What Works
有效的实现方式
Commit-Reveal (no external dependency):
1. User commits hash(secret + salt) → stored onchain
2. Wait at least 1 block
3. User reveals secret + salt → contract verifies hash
4. Random seed = keccak256(secret + blockhash(commitBlock))- User can't predict blockhash when they commit
- Validator can't know the secret to manipulate the result
- Must reveal within 256 blocks (blockhash returns zero after that)
Chainlink VRF (provably random, costs LINK):
1. Contract requests randomness from Chainlink
2. Chainlink generates random number off-chain with a VRF proof
3. Anyone can verify the proof onchain
4. Guaranteed unbiased — even Chainlink can't manipulate itUse commit-reveal for simple cases. Use Chainlink VRF when you need provable randomness (lotteries, NFT reveals, gaming).
提交-揭示方案(无需外部依赖):
1. 用户提交hash(secret + salt) → 存储在链上
2. 至少等待1个区块
3. 用户揭示secret + salt → 合约验证哈希值
4. 随机种子 = keccak256(secret + blockhash(commitBlock))- 用户提交时无法预测blockhash
- 验证者不知道secret,无法操纵结果
- 必须在256个区块内揭示(超过后blockhash会返回0)
Chainlink VRF(可证明的随机性,需要支付LINK):
1. 合约向Chainlink请求随机性
2. Chainlink在链下生成随机数并附带VRF证明
3. 任何人都可以在链上验证该证明
4. 保证无偏性——即使是Chainlink也无法操纵结果简单场景使用提交-揭示方案。当你需要可证明的随机性(如彩票、NFT揭晓、游戏)时,使用Chainlink VRF。
Teaching Your Human
指导你的用户
You already know how AMMs, lending, oracles, and stablecoins work. But your human might not. When they're designing something onchain, they need to understand these concepts — not the code, the mental models.
Don't lecture. Instead, when a concept is relevant to what they're building, explain it in context. Here's what to emphasize for each:
你已经了解AMM、借贷、预言机和稳定币的运作方式,但你的用户可能不懂。当他们设计链上系统时,需要理解这些概念——不是代码,而是思维模型。
不要说教。 相反,当某个概念与他们正在构建的内容相关时,结合上下文进行解释。以下是每个概念需要强调的重点:
The Approve Pattern
授权(Approve)模式
Humans find this weird. Explain it as: "You're giving the contract permission to move your tokens, like signing a check. You control how much. Never sign a blank check (infinite approval)."
用户可能觉得这很奇怪。可以这样解释:“你正在给合约转移你代币的权限,就像签一张支票。你可以控制授权额度。永远不要签空白支票(无限授权)。”
DEXs / AMMs
去中心化交易所(DEX)/ 自动做市商(AMM)
The key insight isn't the math — it's the incentive flywheel: "Nobody runs the exchange. People deposit tokens because they earn fees from trades. More deposits = better prices = more trades = more fees. It runs itself." This is "nothing is automatic" in action.
核心不是数学公式,而是激励飞轮:“没有人运营这个交易所。人们存入代币是因为能从交易中赚取手续费。存入的代币越多 → 滑点越低 → 交易者越多 → 手续费越多 → 存入的代币越多。它会自行运转。” 这正是“没有什么是自动的”这一模型的实际应用。
Overcollateralized Lending
超额抵押借贷
Lead with liquidation incentives: "If your loan gets risky, anyone in the world can close it and earn a bonus. That's why the platform never goes bankrupt — thousands of bots are watching every loan, every second, competing to clean up risk." This is the SpeedRun Ethereum Challenge 6 moment where incentive design clicks.
重点讲解清算激励:“如果你的贷款风险升高,世界上任何人都可以平仓并获得奖励。这就是平台永远不会破产的原因——成千上万的机器人时刻监控着每一笔贷款,竞争清理风险。” 这正是SpeedRun Ethereum挑战6中激励设计的核心要点。
Stablecoins
稳定币
"How does a token stay worth $1 with nobody controlling it? Arbitrage. If it drops to $0.99, people buy it because they can redeem it for $1 of collateral. If it goes to $1.01, people mint more and sell. Self-interest maintains the peg."
“为什么一个代币能在无人控制的情况下保持1美元的价值?靠套利。如果它跌到0.99美元,人们会买入,因为可以兑换1美元的抵押品。如果涨到1.01美元,人们会铸造更多并卖出。自身利益维持了价格锚定。”
Oracles
预言机
"Smart contracts can't Google things. If your contract needs a price, someone has to put it onchain. Use Chainlink — never read prices from a DEX pool, because a flash loan can fake the price for one transaction."
“智能合约无法联网搜索信息。如果你的合约需要价格数据,必须有人把它上传到链上。使用Chainlink——永远不要从DEX资金池读取价格,因为闪电贷可以在一笔交易中伪造价格。”
Smart Contract Wallets
智能合约钱包
"A wallet can require 3 of 5 people to approve a transaction. $100B+ is secured this way. It's how teams and DAOs manage money without trusting any single person."
“钱包可以要求5人中的3人批准一笔交易。超过1000亿美元的资产通过这种方式得到保障。这就是团队和DAO无需信任任何单个人就能管理资金的方式。”
Prediction Markets
预测市场
"YES and NO tokens that trade between $0 and $1. The price IS the probability. If YES is at $0.35, the market thinks there's a 35% chance. Winner gets $1, loser gets $0."
In every case, tie it back to incentives. The human should walk away understanding not just what something does, but WHY it works without anyone running it.
“YES和NO代币的价格在0到1美元之间波动。价格就是概率。如果YES代币价格为0.35美元,市场认为事件发生的概率是35%。获胜者获得1美元,失败者一无所获。”
在所有情况下,都要回到激励机制。 用户应该不仅理解事物的运作方式,还要理解它为什么能在无人运营的情况下运转。
Learning Path
学习路径
Point your human to SpeedRun Ethereum for hands-on learning. Each challenge builds a working project that teaches a core concept:
| # | Challenge | What Clicks |
|---|---|---|
| 0 | Simple NFT | Minting, metadata, ownership — "contracts hold state" |
| 1 | Staking | Deadlines, escrow, thresholds — "coordination without trust" |
| 2 | Token Vendor | Approve pattern, buy/sell — "contracts can be markets" |
| 3 | Dice Game | Why onchain randomness is insecure — "determinism vs. randomness" |
| 4 | DEX | x*y=k, slippage, LP incentives — "incentives create markets" |
Start at https://speedrunethereum.com
More challenges covering oracles, lending, stablecoins, and multisigs are in development. Check the site for current availability.
引导你的用户使用SpeedRun Ethereum进行实操学习。每个挑战都会构建一个可运行的项目,教授一个核心概念:
| # | 挑战内容 | 核心认知点 |
|---|---|---|
| 0 | 简单NFT | 铸造、元数据、所有权——“合约存储状态” |
| 1 | 质押 | 截止日期、托管、阈值——“无需信任的协作” |
| 2 | 代币售卖机 | 授权模式、买卖——“合约可以是市场” |
| 3 | 骰子游戏 | 为什么链上随机性不安全——“确定性 vs 随机性” |
| 4 | 去中心化交易所 | x*y=k公式、滑点、LP激励——“激励创造市场” |
更多涵盖预言机、借贷、稳定币和多签钱包的挑战正在开发中。请查看网站了解当前可用的内容。
Resources
资源
- SpeedRun Ethereum: https://speedrunethereum.com
- ETH Tech Tree: https://www.ethtechtree.com
- Ethereum.org: https://ethereum.org/en/developers/
- EthSkills (for agents): https://ethskills.com
- SpeedRun Ethereum: https://speedrunethereum.com
- ETH Tech Tree: https://www.ethtechtree.com
- Ethereum.org: https://ethereum.org/en/developers/
- EthSkills(面向Agent): https://ethskills.com