平台对比

Permit2 与 Token 授权撤销对比:到期、额度与钱包安全控制

5 分钟

已验证事实边界

1. Uniswap Permit2 documentation describes two modules: SignatureTransfer for signature-based one-time transfers and AllowanceTransfer for amount-and-duration permissions. 2. Uniswap AllowanceTransfer documentation says its approve function includes token, spender, amount and expiration parameters. 3. Uniswap Permit2 documentation says users still need a one-time standard ERC-20 approval of the Permit2 contract before Permit2 can move a token. 4. Uniswap SignatureTransfer documentation describes one-time permissions that are signed and consumed without leaving a standing allowance. 5. EIP-2612 defines a token-native permit function that modifies allowance through a signed message instead of msg.sender. 6. A wallet safety checklist should not treat Permit2 expiration, token-contract revoke and EIP-2612 permit as the same control.

收起完整分析

决策矩阵

文章表格:可横向滑动,或聚焦表格区域后使用方向键。

CheckWhat it meansPractical actionUnknown to keep explicit
Permission layerPermit2, token approval and token-native permit sit at different permission layersname the layer before signing or revokingwallet UI labels that collapse multiple layers into one approval screen
Spender identitythe spender can be Permit2, a router, a protocol contract or another addressrecord token, spender and contract address from the official flowspoofed spender names in wallet prompts
Amount and expiryAllowanceTransfer carries amount and expiration controls while some token approvals are open-endedprefer bounded amount and expiration when the workflow supports itfuture dapp compatibility when an old allowance is reduced
Nonce and replaysignature permissions depend on nonce and deadline semanticstreat nonce, deadline and spender as part of the evidence recordcross-wallet presentation of signed-data details
Revoke costexpiring or reducing permission can require a different action depending on whether the flow is Permit2 or token-nativechange only the specific spender, token and allowance layer that the evidence identifiesgas cost and wallet UX during urgent incident response
Incident responsecompromised wallet response is broader than a single allowance adjustmentseparate allowance reduction, asset migration, device cleanup and support evidencewhether a private key or seed phrase is already exposed
Stop rulesigning should pause when layer, spender, amount or expiry cannot be verifiedstop before blind-signing typed data or approving max allowancewallet extensions that omit structured fields

来源地图

控制说明

1. Permission layer

这一项要求读者先把公开来源翻译成操作规则。这里的含义是:Permit2, token approval and token-native permit sit at different permission layers。可执行动作是:name the layer before signing or revoking。仍然未知的是:wallet UI labels that collapse multiple layers into one approval screen。因此本文不会把未知部分包装成收益承诺、牌照承诺、审批保证、恢复保证、结算保证、可用性保证、价格暗示或平台排名。

2. Spender identity

这里的含义是:the spender can be Permit2, a router, a protocol contract or another address。可执行动作是:record token, spender and contract address from the official flow。仍然未知的是:spoofed spender names in wallet prompts。

操作测试也必须很窄。这就是本节保留边界的原因。

3. Amount and expiry

这里的含义是:AllowanceTransfer carries amount and expiration controls while some token approvals are open-ended。可执行动作是:prefer bounded amount and expiration when the workflow supports it。仍然未知的是:future dapp compatibility when an old allowance is reduced。

操作测试也必须很窄。这就是本节保留边界的原因。

4. Nonce and replay

这里的含义是:signature permissions depend on nonce and deadline semantics。可执行动作是:treat nonce, deadline and spender as part of the evidence record。仍然未知的是:cross-wallet presentation of signed-data details。

操作测试也必须很窄。这就是本节保留边界的原因。

5. Revoke cost

这里的含义是:expiring or reducing permission can require a different action depending on whether the flow is Permit2 or token-native。可执行动作是:change only the specific spender, token and allowance layer that the evidence identifies。仍然未知的是:gas cost and wallet UX during urgent incident response。

操作测试也必须很窄。这就是本节保留边界的原因。

6. Incident response

这里的含义是:compromised wallet response is broader than a single allowance adjustment。可执行动作是:separate allowance reduction, asset migration, device cleanup and support evidence。仍然未知的是:whether a private key or seed phrase is already exposed。

操作测试也必须很窄。这就是本节保留边界的原因。

7. Stop rule

这里的含义是:signing should pause when layer, spender, amount or expiry cannot be verified。可执行动作是:stop before blind-signing typed data or approving max allowance。仍然未知的是:wallet extensions that omit structured fields。

操作测试也必须很窄。这就是本节保留边界的原因。

仍需明确的未知项

  • wallet UI labels that collapse multiple layers into one approval screen
  • spoofed spender names in wallet prompts
  • future dapp compatibility when an old allowance is reduced
  • cross-wallet presentation of signed-data details
  • gas cost and wallet UX during urgent incident response
  • whether a private key or seed phrase is already exposed
  • wallet extensions that omit structured fields

实用结论

Permit2 与标准 ERC-20 授权撤销解决的是不同的钱包控制问题。Uniswap 文档说明,Permit2 结合 SignatureTransfer 与 AllowanceTransfer,可在一次初始 token approval 后提供一次性签名、限时 allowance 与 per-spender permission;EIP-2612 则单独定义了通过 signed message 改变 allowance 的 token-native permit 方法。实用结论是:用户先判断自己管理的是 Permit2 permission、token-contract allowance,还是 EIP-2612 token-native permit,再记录 spender、token、amount、expiry、nonce 与 adjustment cost,之后才签名或撤销。 本文停在证据边界内,帮助读者决定下一步核验什么,而不是把公开文档改写成私人账户、钱包、回调、政策框架、结算路径或流动性头寸在任何未来条件下都能成功的承诺。

来源与证据

04
  1. Uniswap DevelopersPermit2 Overview
  2. Uniswap DevelopersAllowance Transfer
  3. Uniswap DevelopersSignature Transfer
  4. Ethereum Improvement ProposalsERC-2612: Permit Extension for EIP-20 Signed Approvals