不懂代码的DeFi套利者,为何总能赚得盆满钵满?

白话区块链Pubblicato 2022-12-12Pubblicato ultima volta 2022-12-12

Introduzione

即便做不了技术含量更高的黑客,如果能在信息繁杂的 Web3 中时刻保持敏锐的嗅觉与果断的执行力,对 DeFi 的基本原理熟稔于心,高效快速地获知类似一闪而过的危机,也未尝不能在 Web3 世界在寻找到类似的机遇。

即便做不了技术含量更高的黑客,如果能在信息繁杂的 Web3 中时刻保持敏锐的嗅觉与果断的执行力,对 DeFi 的基本原理熟稔于心,高效快速地获知类似一闪而过的危机,也未尝不能在 Web3 世界在寻找到类似的机遇。

12 月 2 日,加密基础设施提供「Ankr」的 aBNBc Token(BNB 封装资产)合约因存在无限铸造 Token 漏洞而被攻击,攻击者铸造了大量 aBNBc Token 后卖出,导致 aBNBc 价格几近归零,很多用户都没有及时获知消息从而止损。

与此同时,更有敏锐度高的黑客第一时间进行套利,利用 10 BNB 兑换 aBNBc,通过借代协议 Helio 套利超 1550 万美元。

01 Ankr 攻击事件复盘

如果复盘此次 Ankr 攻击事件,会发现其中大幅获利的主要分为两个角色:

一是最直接地就是黑客直接利用合约漏洞,凭空铸造大量 aBNBc 并砸盘获利;

二是有嗅觉敏锐的链上用户趁 aBNBc 二级市场价格剧烈波动,利用预言机喂价不及时的 Bug 在借代协议抵押套利(也不排是攻击者本人所为)。

首先,Ankr 或因部署密钥丢失,导致被攻击者抓住合约漏洞,凭空铸造出 10 万亿枚 aBNBc。

然后攻击者将 aBNBc 通过 PancakeSwap 兑换为 500 万枚 USDC ,导致交易池几乎被掏空,aBNBc 被砸到接近归零,随后攻击者将资产跨到以太坊,并转入 Tornado Cash。

与此同时,黑客铸造 Token 之后的约半小时,aBNBc 暴跌,产生了套利机会——套利者利用借代协议 Helio 的预言机喂价是采用 6 小时平均加时权重的设置,利用 aBNBc 在市场上和在 Helio 系统中的价差将其换成 hBNB,并将 hBNB 质押换出稳定币 HAY ,并将其换成 BNB 和 USDC。

套利者此举总共套出超过 1500 万美元等值的稳定币和 BNB,基本掏空 hay 的交易对池子,随后将套出的 BUSD 和 BNB 转入 Binance。

从这个角度看,攻击者获利的原因是 Ankr 的 aBNBc 智能合约自身存在漏洞,而套利者获利的原因则是 Helio 协议显然存在预言机喂价问题,其嗅觉敏锐第一时间抓住了这个套利机会。

而且套利者(1700 万美元)明显比直接的攻击(500 万美元)获利更丰,所以推特用户 rick awsb 复盘时也表示,攻击者如果直接用套利的方式,先套 hay 的利,再卖 aBNBc,则可以至少多赚 1500 万美元,当然,如果黑客和套利者是同一人,则可以解释这个疑问。

02 DeFi 世界的「预言机攻击」

其实这种「预言机攻击」导致的 DeFi 损失,在 2020 年就已经屡见不鲜,其中最早的典型按理应该可以追溯到 bZx 协议(现已更名为 Ooki)。

2020 年 2 月 15 日,某位攻击者也是利用 bZx 的借代等功能,在一个以太坊区块时间内(不足 15 秒),充分利用 DeFi 乐高——5 个 DeFi 产品之间(dydx、Compound、bZx、Uniswap、kyber)互相的合约调用,在未曾动用自有资金的前提下,一环紧套一环,最终通过在漏洞间操纵价格,成功套利上千枚以太坊。

而整个过程完整发生在 2020 年 2 月 15 日以太坊区块高度 9484688 期间,堪称经典:

攻击者先通过闪电贷(Flashloan)从 dYdX 上无抵押贷款了 1 万枚 ETH;

然后攻击者将其中 5500 个 ETH 在 Compound 上做抵押,借出了 112 枚 WBTC(以太坊链上的比特币封装资产);

同时攻击者将另 1300 枚 ETH 存入 bZx,发起 bZx 保证金交易,5 倍做空 ETH 的永续空单(ETH/wBTC)——借入 5637.6 个 ETH,通过 Kyber 的 Uniswap 储备库,兑换获得 51.3 枚 WBTC;

由于 Uniswap 内 WBTC 深度相对太浅,导致产生极大的滑点,Uniswap 内 WBTC 价格暴涨 3 倍,大幅偏离正常值;

然后将第 2 步中借出的 112 枚 WBTC 在 Uniswap 中以大幅偏离正常值的价格集中出售,获得 6871.4 枚 ETH;

最终 6871.4 枚 ETH+3200 ETH(从未动用)=10000 ETH(归还 dYdX 贷款)+71.4 ETH(落袋为安),而且由于 wBTC 在第 5 步中被打低,所以攻击者用大约 4300 枚 ETH 便可兑换 112 枚 wBTC 还清第 2 步的 5500ETH 抵押,从而再净获利 1200 枚 ETH;

最终获利 71.4 ETH + 1200 ETH = 1271.4 枚 ETH。

总的来看,套路是一致的,都是针对预言机进行攻击,从而利用其它 DeFi 协议依赖预言机喂价的漏洞进行套利:

攻击者通过操控 Kyber 和 Uniswap 上 WBTC/ ETH 的价格,利用了 bZx 中单一依赖 Uniswap 上的价格进行喂价的漏洞,从而可以以偏离正常值的 3 倍虚高价格卖出 WBTC 以获利。

某种意义上,如果黑客通过钓鱼、撞库等手段来从 CEX 盗取资产,算是不义之财,那类似地通过 DeFi 的规则来套利,就堪称明火执仗地赚钱,手段高明但无可置喙。

03 赚麻的「套利者」们

其实回顾今年上半年的 LUNA/UST 归零之路也是如此,每次发生这种攻击或市场价格剧烈之际,总有反应迟钝的链上用户往往通过媒体、Discord 等获取二手、滞后的信息,从而蒙受损失。

当然也总有反应迅速的用户能够第一时间获悉,然后针对喂价不及时等预言机漏洞进行套利,导致一批借代、DEX 等 DeFi 协议损失惨重,从而大赚。

Venus 损失 1420 万美元

今年 5 月 12 日,在 LUNA/UST 进入负螺旋之际,Chainlink 对 LUNA 的价格反馈达到价格下限,并被其以 0.107 美元的价格暂停。

但与此同时,BNB 上借代协议 Venus 的 LUNA 市场却在继续运行,且其关于 LUNA 的喂价正是来自于 Chainlink,这就导致了一个明显的逻辑漏洞:

LUNA 现货价格继续下跌,但 Venus 由于采用 Chainlink 的喂价,却仍允许用户按照 LUNA 价格为 0.107 美元的默认情况进行抵押借代。

直到 4 小时后,现货价格约为 0.01 美元时,团队才发现问题并暂停协议,但此间已有用户通过「预言机攻击」进行借代,导致资金损失缺口约 1420 万美元。

Drift Protoco 损失 1040 万美元

同样是 5 月 12 日,受 LUNA 价格剧烈波动影响,Solana 生态永续合约协议 Drift Protoco 的预言机喂价也未能及时跟进二级市场价格的变化,导致用户能够从抵押品库和金库中以远低于正常价值的抵押品,提取比他们有权获得的更多的资金,从而造成 1040 万美元的损失。

04 小结

仔细复盘会发现,敏锐度高的用户足以在最开始的第一时间到第一波并迅速获利了结,进一步验证了在 Web3 里敏感度和执行力就是获利的基本要素。

所以即便做不了技术含量更高的黑客,如果能在信息繁杂的 Web3 中时刻保持敏锐的嗅觉与果断的执行力,对 DeFi 的基本原理熟稔于心,高效快速地获知类似一闪而过的危机,也未尝不能在 Web3 世界在寻找到类似的机遇。

当然套利者有时候也会面临被平台锁定等风险,不排除白忙活一场甚至赔本的可能。

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.

marsbit48 min fa

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

marsbit48 min 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.

marsbit1 h fa

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

marsbit1 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.

marsbit2 h fa

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

marsbit2 h fa

Trading

Spot
Futures

Articoli Popolari

Come comprare UNI

Benvenuto in HTX.com! Abbiamo reso l'acquisto di Uniswap (UNI) semplice e conveniente. Segui la nostra guida passo passo per intraprendere il tuo viaggio nel mondo delle criptovalute.Step 1: Crea il tuo Account HTXUsa la tua email o numero di telefono per registrarti il tuo account gratuito su HTX. Vivi un'esperienza facile e sblocca tutte le funzionalità,Crea il mio accountStep 2: Vai in Acquista crypto e seleziona il tuo metodo di pagamentoCarta di credito/debito: utilizza la tua Visa o Mastercard per acquistare immediatamente UniswapUNI.Bilancio: Usa i fondi dal bilancio del tuo account HTX per fare trading senza problemi.Terze parti: abbiamo aggiunto metodi di pagamento molto utilizzati come Google Pay e Apple Pay per maggiore comodità.P2P: Fai trading direttamente con altri utenti HTX.Over-the-Counter (OTC): Offriamo servizi su misura e tassi di cambio competitivi per i trader.Step 3: Conserva Uniswap (UNI)Dopo aver acquistato Uniswap (UNI), conserva nel tuo account HTX. In alternativa, puoi inviare tramite trasferimento blockchain o scambiare per altre criptovalute.Step 4: Scambia Uniswap (UNI)Scambia facilmente Uniswap (UNI) nel mercato spot di HTX. Accedi al tuo account, seleziona la tua coppia di trading, esegui le tue operazioni e monitora in tempo reale. Offriamo un'esperienza user-friendly sia per chi ha appena iniziato che per i trader più esperti.

445 Totale visualizzazioniPubblicato il 2024.12.12Aggiornato il 2025.03.21

Come comprare UNI

Discussioni

Benvenuto nella Community HTX. Qui puoi rimanere informato sugli ultimi sviluppi della piattaforma e accedere ad approfondimenti esperti sul mercato. Le opinioni degli utenti sul prezzo di UNI UNI sono presentate come di seguito.

活动图片