以太坊智能合约,以及大部分Token都在用的ERC标准是什么?

白话区块链Published on 2022-09-03Last updated on 2022-09-03

Abstract

在现实生活当中,我们经常在各种业内报道中看见 ERC 的身影,那么什么是 ERC 呢?今天就来和大家聊一聊。

在现实生活当中,我们经常在各种业内报道中看见 ERC 的身影,那么什么是 ERC 呢?今天就来和大家聊一聊。

智能合约

在讲 ERC 之前,先和大家科普一下智能合约,智能合约的概念最早是在 1994 年由尼克.萨博提出。他定义道:一个智能合约是一个计算机化的交易协议,它执行一个合约的条款。

智能合约来源生活中的自动售货机,当客户往自动售货机投钱之后,自动售货机就开始工作。而智能合约是怎么样的呢?以以太坊中的智能合约为例,每一个以太坊中的智能合约都有自己的账户,就相当于自动售货机有自己的 ID 一样,当外部账户用一定的小费调用了自己选中的智能合约之后,就相当于启动了自动控制的开关,智能合约就会按照自己的代码定义自动地执行下去。

但是和自动售货机不一样的是,智能合约一旦创建完之后,它的代码就不能被更改,不能像自动售货机一样还能由工作人员打开门再放货品进去。

智能合约不可更改的优势让它很自然地适用于合约条款的场景,它可以有效地减少恶意篡改,减少人工干预。比如可以在以太坊上写一个类似银行的智能合约,然后人们就可以通过这个合约来存钱、取钱。这样就不会出现因为银行工作人员因失误或恶意更改导致余额不对等情况的出现。

事实上,这个“银行”智能合约里存的钱不一定是大饼(ETH),因为以太坊智能合约它还允许合约开发人员定义自己的货币,就是我们所知道的各种基于以太坊的 Token,比如 USDT,NBN 等。

这么一讲,仿佛智能合约给各行各业的人们提供了一个新的思路,大家都在想着是不是可以基于智能合约开发一些新的项目,发行自己的代币呢?智能合约当然可以,但是必须按照规定程序进行。那么为了有效地防止平台上出现各种杂七杂八的代币、数据等,它有着自己的一套标准。

ERC标准

ERC 全称是“Ethereum Request for Comment”,表示以太坊版的意见征求稿,ERC 中包含技术和组织等注意事项及标准。这套标准其实不光由以太坊官方提出,还由一些以太坊爱好者提出。

以前面谈到的银行智能合约为例,我们不难想到它会具备以下几个功能和须知:

需要有记录每一个客户的余额;

需要具备转钱的功能,即包含存钱与取钱;

要保证每个客户能够查询自己的余额。

以上这些功能和须知仔细一思考,好像是每个“银行”合约都需要具备的,也是 Token 合约所需要具备的,因此为了更好地兼容钱包,兼容交易所,以太坊发行了像 ERC20,ERC721 这样的代币协议标准。

比如阿猫币、阿狗币都是基于 ERC20 标准发行的,那么它们都会提供给用户一些选择按钮(即接口函数一致),这些选择按钮供用户查询余额,转移代币等,但是阿猫币、阿狗币底层实现查询余额和转移代币的等功能的方式可以不同。

除了 Token 合约需要规范一样,其他的一些包括但不限于数据包的设计、一些接口的定义规则等也有一些 ERC 标准。这些标准协议一些来自于以太坊创团队,一些来自于以太坊的爱好者、贡献者的提议。总的来说,都是为了共同创建一个更好的以太坊环境。

所以,感兴趣的小伙伴也可以根据以太坊智能合约中的一些不足或是值得创新的地方提出自己的一些提议,作出自己的贡献。

Trending Cryptos

Related Reads

Former SpaceX Engineer Reconstructs Financial Execution System Using First Principles

Former SpaceX engineer Lex Li applies "First Principles Thinking" to financial infrastructure with Plan Execution Lab, recently raising angel funding at a $50M post-money valuation. The team argues that the core function of finance is capital allocation, and the critical gap is not in trading but in execution, which remains highly manual and fragmented. While assets, liquidity, and settlement have migrated on-chain, execution workflows (monitoring, risk management, liquidity coordination) are still human-native. In an era of accelerating AI agents, strategy decay is rapid, shifting the competitive edge from having the best strategy to having the most robust execution network. Plan Execution Lab introduces two core components: 1. **PlanX**: A Financial Execution Protocol designed as infrastructure for the migration from CEX to DEX, providing on-chain execution capabilities, liquidity access, risk management, and capital orchestration. 2. **Xgent**: An Autonomous Financial Runtime. Users define investment intents, risk preferences, and constraints; Xgent automatically constructs an execution graph, verifies it, and handles ongoing execution and optimization—streamlining the process from Intent to Autonomous Execution. The long-term vision is to create the "Bloomberg Terminal for Autonomous Finance"—a shared operating environment and execution network built collectively by participants like execution nodes, liquidity providers, and autonomous agents. The future of finance, they contend, belongs not to isolated algorithms but to open, collaborative execution networks.

marsbit17m ago

Former SpaceX Engineer Reconstructs Financial Execution System Using First Principles

marsbit17m ago

Former SpaceX Engineer Reconstructs Financial Execution System from First Principles

Plan Execution Lab, a financial infrastructure project founded by former SpaceX engineer Lex Li, has raised angel funding at a $50M post-money valuation. The startup is applying "first principles thinking" from Li's SpaceX experience to rethink financial market execution. Their analysis posits that while assets, liquidity, and settlement have moved on-chain, the execution layer remains fundamentally human-dependent and fragmented. In the era of AI Agents, strategy advantages decay rapidly, shifting the competitive edge from isolated algorithms to robust **execution networks**. Plan Execution Lab's solution is a two-part system: **PlanX**, a Financial Execution Protocol designed to facilitate the migration from centralized exchanges (CEX) to on-chain markets by providing core on-chain execution capabilities; and **Xgent**, an Autonomous Financial Runtime. Xgent allows users to define investment goals and constraints, then autonomously constructs and manages the execution logic—moving from **Intent to Execution Graph to Verification to Autonomous Execution**. The long-term vision is to create the "Bloomberg Terminal for Autonomous Finance"—an operating environment not for humans, but for agents and execution nodes. The future financial system, they argue, will be a collaborative network built by diverse participants contributing execution capabilities, not secret strategies. The core competition will shift to who builds the most powerful and adaptive execution network.

链捕手18m ago

Former SpaceX Engineer Reconstructs Financial Execution System from First Principles

链捕手18m ago

First Long-Horizon Doc2Repo Training Dataset: Code Agents Move Beyond Bug Fixing and Begin Creating Repositories

With the advancement of LLM Code Agents, the research focus is shifting towards long-horizon, real-world tasks, moving beyond simple bug fixes to full repository generation. To address this, researchers from Renmin University of China introduced the DeNovoSWE dataset. This dataset focuses on long-term software engineering tasks, specifically the "document-to-repository" challenge—generating an entire, executable code repository from a task description. The DeNovoSWE construction method employs a Divide & Conquer approach. It breaks down target repositories into core capabilities and uses a multi-agent Draft-Critic-Repair workflow to automatically generate high-quality, evaluation-aligned task documents. The dataset also implements difficulty-aware filtering to balance quality and diversity. The result is a high-quality, anti-leakage dataset of 4,818 instances. Experiments show that models trained on DeNovoSWE achieve significant improvements in long-horizon repository generation. For instance, Qwen3-30B-A3B-Instruct's performance on the BeyondSWE-Doc2Repo benchmark increased from 5.8% to 47.2%, and on NL2RepoBench from 4.3% to 23.0%. Similar gains were observed with stronger backbones, demonstrating that dedicated long-horizon training data is crucial for advancing Code Agents from maintainers to architects capable of planning and building complete software projects from scratch.

marsbit33m ago

First Long-Horizon Doc2Repo Training Dataset: Code Agents Move Beyond Bug Fixing and Begin Creating Repositories

marsbit33m ago

Even CZ Praised Hyperliquid as 'Awesome', But Its Biggest Moat Might Also Be Its Biggest Risk

In an episode of Galaxy Brains, Binance founder CZ praised Hyperliquid as "awesome" but clarified that while its product is strong, Binance cannot compete in its specific niche due to Hyperliquid's no-KYC, decentralized model. CZ noted he would not personally operate such a model, highlighting the inherent legal and compliance risks tied to its access advantage. The discussion underscores a core market structure conflict: on-chain perp platforms like Hyperliquid thrive on open, low-barrier access, which regulated exchanges like Binance cannot replicate without abandoning their global compliance posture. However, this very advantage makes Hyperliquid a clear target for regulatory scrutiny. The UK FCA has already issued a warning against Hyperliquid for potentially offering unauthorized services to UK users, framing it as a financial services provider rather than neutral infrastructure. Historical cases like the CFTC's action against bZeroX and Ooki DAO further illustrate that regulators may pursue decentralized structures if they facilitate leveraged trading for retail users without proper controls. Meanwhile, regulated venues like Cboe are developing US-compliant "continuous futures" that mimic perpetual exposure, narrowing the product gap. Hyperliquid's long-term edge may increasingly hinge on its access model—the very feature most exposed to regulatory pressure. The key question is whether its "access premium" can withstand escalating legal challenges as on-chain perps gain mainstream attention.

marsbit51m ago

Even CZ Praised Hyperliquid as 'Awesome', But Its Biggest Moat Might Also Be Its Biggest Risk

marsbit51m ago

Trading

Spot
Futures

Hot Articles

Discussions

Welcome to the HTX Community. Here, you can stay informed about the latest platform developments and gain access to professional market insights. Users' opinions on the price of ETH (ETH) are presented below.

活动图片