> For the complete documentation index, see [llms.txt](https://read.cryptograb.wiki/cryptograb-automatic-affiliate/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://read.cryptograb.wiki/cryptograb-automatic-affiliate/nova-drainer-docs-zh/readme/shen-me-shi-dai-bi-shou-quan-token-approvals/shen-me-shi-permit-qian-ming.md).

# 什么是 Permit 签名？

由于需要支付 gas，许多应用程序倾向于请求无限制的授权（批准），这意味着您只需支付一次 gas。这可能带来安全风险，因为应用会无限期保留此无限制访问。理想情况下，您应仅授予有限的批准，覆盖特定交易所需的确切代币数量。但那样的话，您将不得不为每次批准支付 gas。

[EIP2612](https://eips.ethereum.org/EIPS/eip-2612) 试图通过允许离线签署批准消息来解决此问题。这样，您无需发送链上交易就可以提供有限的批准，从而无需为此支付 gas。

### Permit 签名如何工作？

EIP2612 是对 ERC20 标准的扩展，这意味着 ERC20 代币可实现此附加功能，但大多数代币并不支持它。Permit 签名基于标准 [EIP712](https://eips.ethereum.org/EIPS/eip-712)，该标准定义了对结构化数据进行签名的标准化方式。用于 Permit 签名的需签名数据包含与链上发出批准时相同的信息：授权支出者地址（ASA）和代币数量。

![在 Etherscan 上用 Permit 批准 USDC](https://revoke.cash/assets/images/learn/approvals/what-are-eip2612-permit-signatures/permit.png)

然后这些数据和相应的签名可被传递到代币的函数 `permit()`，该函数会验证签名并在链上“激活”批准，之后它与普通的链上批准相同。尽管这种签名需要在链上“激活”，但链上激活可以与您需要批准的交易合并，这样您就不必发送单独的交易。

### Permit 签名的优点

如上所述，Permit 签名解决的主要问题是您可以在不发送单独批准交易的情况下发放批准。这带来了两个重要好处：

* 减少对用户的不便，因为他们不需要支付 gas 或等待交易被挖掘。
* 降低安全风险，因为可以发放有限数量的批准，只覆盖特定交易所需的代币数量。

### Permit 签名的缺点

尽管 Permit 签名具有若干重要优点，但也存在缺点。其中之一是大多数代币不支持它们，因此您不能指望随处可用。由于 ERC20 代币对其支持有限，许多应用也不支持它们。为了让智能合约支持 Permit 签名，需要专门实现此支持，这给开发者带来额外困难。

![MetaMask 弹窗中的 Permit 批准 USDC](https://revoke.cash/assets/images/learn/approvals/what-are-eip2612-permit-signatures/permit-request.png)

由于 Permit 签名是链下签名，它们也经常被诈骗者利用来欺骗用户并迫使其给予批准。许多钱包（例如 MetaMask）在您签署链上批准时会显示警告，但对 Permit 签名则缺乏此类警告。因此，看起来您只是把钱包连接到网站，但实际上您是在授予批准。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://read.cryptograb.wiki/cryptograb-automatic-affiliate/nova-drainer-docs-zh/readme/shen-me-shi-dai-bi-shou-quan-token-approvals/shen-me-shi-permit-qian-ming.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
