白话解读Web3签名钓鱼的底层逻辑:授权钓鱼、Permit与Permit2的区别

Odaily星球日报Pubblicato 2024-04-22Pubblicato ultima volta 2024-04-22

Introduzione

「签名钓鱼」目前正成为了Web3的黑客们最喜欢的钓鱼方式。

原文作者:菠菜菠菜|bocaibocai(X:@wzxznl

明明只是签了个名,我的钱怎么没了呢??“签名钓鱼”目前正成为了Web3的黑客们最喜欢的钓鱼方式,最近看余弦大佬@evilcos和各大钱包和安全公司都在不断宣传科普钓鱼签名的知识,但是每天还是有好多人被钓鱼。

菠菜认为其中一个原因就是大部分人对钱包交互的底层逻辑并不了解,并且对于不懂技术的人来说学习门槛过高,所以菠菜决定出一个图解版科普签名钓鱼的底层逻辑,并且尝试用最大白话的形式让不懂技术的人也能看明白。

首先我们要知道我们使用钱包一共只有两种操作:“签名”和“交互”。最简单直接的理解就是:签名是发生在区块链之外的(链下),不需要花 Gas 费的;交互是发生在区块链上面的(链上),是需要花 Gas 费的。

白话解读Web3签名钓鱼的底层逻辑:授权钓鱼、Permit与Permit2的区别

一般签名的使用场景是为了验证你是你,比如登入钱包,就像你如果要去 Uniswap 换 Token 的话,你需要先链接你的钱包,那么这个时候你就需要签一个名告诉网站“我是这个钱包的拥有者”,然后你就可以使用 Uniswap 了,这个步骤对区块链不会有任何数据或者状态上的变化,所以不需要花钱。 而交互的话就是当你要真正在 Uniswap 上换 Token 的时候,你需要先花一笔钱告诉 USDT 的合约:“我要用 100 USDT 换一个菠菜币,我批准你可以挪动我的 100 USDT”,这个步骤就叫做授权(approve),然后你还要再花一笔钱告诉 Uniswap 的智能合约:“我现在要用 100 USDT 换一个菠菜币了,你现在可以进行操作了”,然后你就完成了用 100 USDT 换一个菠菜币的操作。

白话解读Web3签名钓鱼的底层逻辑:授权钓鱼、Permit与Permit2的区别

简单理解签名和交互的区别之后,我们就来介绍一下钓鱼的原理,菠菜会列举三个不同的方式:授权钓鱼、Permit 签名钓鱼和 Permit 2 签名钓鱼,这三个是非常常见的钓鱼方式。

咱们先讲授权钓鱼,这是以前Web3最经典的钓鱼手法之一,顾名思义就是利用授权(approve)这个机制,之前 Uniswap 的例子告诉我们,授权就是告诉智能合约“我批准你挪动我多少 xxx 的 Token”,那么黑客就可以做一个假的钓鱼网站,有着精美的前端伪装成一个 NFT 项目,网站中间是一个漂亮的大按钮“领取你的空投”,实际上你点了之后钱包弹出来的界面实际上是让你授权你的 Token 给黑客的地址,那么这时候如果你点了确认,那么就恭喜黑客成功完成一个 KPI 了。

但是授权钓鱼有一个问题:因为要花 Gas 费,现在很多人在涉及到花钱的操作上会有所警惕,在陌生网站点击之后稍微一看就会发现不对劲,还是比较好防范的。

那么接下来就来到了今天的主角:Permit 和 Permit 2 签名钓鱼啦,是Web3资产安全领域的重灾区,为什么这么难防呢?因为每次你要使用一个 Dapp 之前一定要签名登入你的钱包,在许多人脑子里可能已经形成了一种惯性思维:”这个操作是安全的”,再加上不需要花钱和大多数人不知道每个签名背后意味着什么。

我们先来看 Permit 机制,Permit 是针对 ERC-20 标准下授权的一个扩展功能,像我们平常用的 USDT 就是 ERC-20 ,简单来说就是你可以签名批准其他人来挪动你的 Token,我们知道授权(Approve)是你花钱告诉智能合约:“你可以挪动我 xxx 数量的 Token”,那么 Permit 就是你在一张“条子”上签了个名给某一个人,这个纸上写着:“我允许某某某可以挪动我 xxx 数量的 Token”,然后这个人拿着这个“条子”给智能合约并花一笔 Gas 费告诉智能合约:“他允许我挪动他 xxx 数量的 Token”,然后你的钱就可以被其他人挪走了,在这个过程中你只是签了一个名,而背后却意味着你允许其他人去调用授权(Approve)并转走你的 Token,黑客可以做一个钓鱼网站,把登入钱包的按钮替换成 Permit 钓鱼,那么就可以轻轻松松把你的资产钓走啦。

白话解读Web3签名钓鱼的底层逻辑:授权钓鱼、Permit与Permit2的区别

那么 Permit 2 又是什么呢?Permit 2 其实并不是 ERC-20 的一个功能,而是 Uniswap 为了方便用户推出的一个功能,之前的例子讲了你要在 Uniswap 上用 USDT 换菠菜币你需要先授权(Approve)一次,然后再进行兑换,这需要花两笔 Gas 费,所以 Uniswap 就想了个办法:“你一次性把额度全部授权给我好了,每次兑换你签个名我就给你处理了”,这个功能帮助 Uniswap 用户使用的时候只需要支付一次 Gas 费即可,并且这个步骤是签名,所以 Gas 费其实不是你付的,而是 Permit 2 合约代付了,但是会从你最终兑换的 Token 里扣除掉。

但是中 Permit 2 钓鱼的条件是你曾经使用过 Uniswap,并且你还授权了无限额度给 Permit 2 智能合约,由于目前 Uniswap 默认的操作就是无限额度授权,所以其实满足该条件的用户数量还是蛮大的,同样黑客只要骗你把名签了就可以把你的 Token 转走(仅限给过授权的)。

总结一下,授权钓鱼的本质是你花一笔钱告诉智能合约:“我批准你挪用我的 Token 给黑客”,签名钓鱼的本质是你签了一张允许别人去挪动你资产的“条子”给到黑客,黑客花钱告诉智能合约:“我要挪用他的 Token 转给我”。Permit 和 Permit 2 是目前钓鱼签名的重灾区,Permit 是 ERC-20 的一个授权扩展功能,Permit 2 是 Uniswap 推出的一个新功能。

那么理解了原理,怎么防范呢? 

1.首先最最重要的就是培养你的安全意识,每一次钱包的操作都要去检查一下你在做的操作到底是什么? 

2.大资金和玩链上的钱包分离,一旦被钓鱼了可以把损失降到最低 

3.学会识别 Permit 和 Permit 2 的签名格式,只要你看到以下签名格式,那你就要警惕起来了:

Interactive:交互网址 

Owner:授权方地址 

Spender:被授权方地址 

Value:授权数量 

Nonce:随机数 

Deadline:过期时间

白话解读Web3签名钓鱼的底层逻辑:授权钓鱼、Permit与Permit2的区别

原文链接


Letture associate

Podcast Notes: Hyperliquid Has Become the Top Interest Point for Traditional Hedge Funds

Empire Podcast hosts Jason Yanowitz and Santiago Santos discuss the surging institutional interest in Hyperliquid, a decentralized perpetual exchange, marking the highest level of engagement from traditional hedge fund managers since Paul Tudor Jones endorsed Bitcoin in 2020. The primary driver is the demand for weekend trading of commodities like oil, especially during geopolitical tensions such as the Iran conflict, as Hyperliquid provides the only active price discovery venue when traditional markets are closed. Trade XYZ, a front-end on Hyperliquid, has seen significant growth, with weekend oil price predictions having a median error of only 50 basis points. Santos predicts commodity trading volume on Hyperliquid will surpass Bitcoin within the year and that its market cap could rise from $25 billion to $100 billion. Other key points include Kraken raising $200 million at a reduced valuation of $13.3 billion, and the SEC clarifying that self-custodied DeFi frontends like MetaMask are not subject to broker-dealer rules, resolving a major regulatory uncertainty. The hosts also note the strong correlation between crypto and macro markets, with the S&P 500 posting one of its best 10-day rallies since 1950. They highlight MicroStrategy's continued Bitcoin acquisitions and the potential of real-world asset (RWA) tokenization as a key trend. The discussion concludes with skepticism towards many L2 projects, predicting a wave of protocols truly going to zero as capital concentrates in proven assets like Bitcoin and Hyperliquid.

marsbit2 h fa

Podcast Notes: Hyperliquid Has Become the Top Interest Point for Traditional Hedge Funds

marsbit2 h fa

a16z: The Next Frontier of AI, The Triple Flywheel of Robotics, Autonomous Science, and Brain-Computer Interfaces

a16z presents a comprehensive investment thesis for the next frontier of AI: Physical AI, centered on a synergistic flywheel of robotics, autonomous science, and novel human-computer interfaces (HCIs) like brain-computers. While the current AI paradigm scales on language and code, the most disruptive future capabilities will emerge from three adjacent fields leveraging five core technical primitives: 1) learned representations of physical dynamics (via models like VLA, WAM, and native embodied models), 2) embodied action architectures (e.g., dual-system designs, diffusion-based motion generation, and RL fine-tuning like RECAP), 3) simulation and synthetic data as scaling infrastructure, 4) expanded sensory channels (touch, neural signals, silent speech, olfaction), and 5) closed-loop agent systems for long-horizon tasks. These primitives converge to power three key domains: * **Robotics:** The literal embodiment of AI, requiring all primitives for real-world physical interaction and manipulation. * **Autonomous Science:** Self-driving labs that conduct hypothesis-experiment-analysis loops, generating structured, causally-grounded data to improve physical AI models. * **Novel HCIs:** Devices (AR glasses, EMG wearables, BCIs) that expand human-AI bandwidth and act as massive data-collection networks for real-world human experience. These domains form a mutually reinforcing flywheel: Robotics enable autonomous labs, which in turn generate valuable data for robotics and materials science. New interfaces provide rich human-physical interaction data to train better robots and scientists. Together, they represent a new scaling axis for AI, moving beyond the digital realm to interact with and learn from physical reality, promising significant emergent capabilities and value.

marsbit2 h fa

a16z: The Next Frontier of AI, The Triple Flywheel of Robotics, Autonomous Science, and Brain-Computer Interfaces

marsbit2 h fa

Conversation with Bitwise Advisor: From K-Shaped Economy to AI Taking Jobs, How Can Bitcoin Save the Younger Generation?

Jeff Park, a macro strategist and advisor at Bitwise, argues that the traditional financial system is broken, particularly for young generations. He describes a "K-shaped economy" where asset inflation enriches the wealthy while leaving others behind, with unaffordable housing as a key symptom. Park explains that real estate is often a depreciating asset due to maintenance costs and taxes, yet it remains unattainable for many young people due to distorted demand from global capital flows. He proposes Bitcoin as a superior store of value—scarce, portable, and free from maintenance costs or excessive taxation. By diverting capital away from real estate, Bitcoin could help lower housing prices and increase accessibility. Park also discusses the decline of traditional "smart investing" (e.g., value stocks) and the rise of "ideological investing" in non-correlated assets like crypto, luxury goods, and collectibles. On AI, Park warns it could trigger extreme social inequality by eliminating jobs while boosting corporate profits. He believes this will push younger generations toward Bitcoin, not only as a hedge but also as a symbol of decentralization and data sovereignty—offering an alternative to centralized AI systems that use personal data without fair compensation. He advises a diversified portfolio with Bitcoin as a core holding to hedge against currency devaluation and systemic risk.

marsbit3 h fa

Conversation with Bitwise Advisor: From K-Shaped Economy to AI Taking Jobs, How Can Bitcoin Save the Younger Generation?

marsbit3 h fa

Trading

Spot
Futures
活动图片