NFT项目惊现低级漏洞,合约未审计导致3400万美元资产被锁死

成都链安Pubblicato 2022-04-23Pubblicato ultima volta 2022-04-23

Introduzione

由于多个代码缺陷导致合约中 11539.5 枚 ETH永远无法取出。

2022年4月23日,成都链安链必应-区块链安全态势感知平台舆情监测显示,NFT项目方Akutar的AkuAuction合约由于智能合约本身漏洞,导致11539ETH(价值约3400万美元)被锁死在合约中。成都链安技术团队第一时间对事件进行了分析,结果如下。
#1 事件相关信息
4月23日消息,Solidity开发者foobar发推称,11539ETH(价值3400万美元)被永久锁定在AkuDreams合约中,个人用户或开发团队都无法取出资金。退款处理完成后,将每个出价状态设置为1。因此,用户无法调用emergencyWithdraw()。此外,团队也无法领取资金,基本上等于销毁。 

漏洞

成都链安技术团队立刻进行了分析。
漏洞合约:
0xf42c318dbfbaab0eee040279c6a2588fa01a961d
#2 漏洞分析
Akutar项目的智能合约包含2个漏洞:
漏洞一:
1.第一个合约漏洞在processRefunds中,设计者根据refundProgress计数器进行循环退款。
2.而这里使用了call函数进行退款操作,且把退款的结果作为require的判定条件。

漏洞

3.因此如果此时有攻击者在队列中进行退款操作,调用call退款给攻击者时,攻击者在fallback中进行进行恶意的revert则会导致退款队列卡在攻击者这里,从而导致队列后面的所有人都无法进行退款。

漏洞

4.这个漏洞被人在链上证明有效,但随后攻击合约便进行了解锁,并没有进行攻击利用,且公开进行了申明。

漏洞

漏洞二:
该漏洞也是导致价值约3400万美元的ETH资产被锁死在合约中的元凶。
1.在claimProjectFunds函数中,该函数主要用于项目方提款。为了避免项目方权限过大,在用户完成提款之前就将合约中的资产全部转走导致用户无法退款,所有的退款操作应全部完成之后项目方才能够提款。业务逻辑设计上来说,是没有问题的。然而,在具体的代码实现中,当前的代码容易受到漏洞一的影响,导致项目方无法提款,不过这只是潜在的风险,本次资金锁死的元凶不是这个原因。
2.注意函数中第620行代码:require (refundProgress > = totalBids)此处refundProgress表示已经处理了多少个用户的退款,totalBids表示所有用户总投标了多少个NFT。注意由于一个用户可以投标多个NFT,导致单从数值上比较,refundProgress可能小于totalBids。

漏洞

而再来看看退款函数processRefunds中:require(_refundProgress < _bidIndex); bidIndex表示所有参与竞标的用户,refundProgress永远不会高于bidIndex。

漏洞

此时来看看bidIndex的值,为3669:

漏洞

totalBids的值为5495:

漏洞

3.所以refundProgress>=5495且refundProgress<3669这个判断条件永远不会成立,最终导致项目方团队将永远无法执行后续的提款操作。此处应将refundProgress与bidIndex做对比,开发者犯了一个很低级的错误。最终,导致项目方11539ETH(价值约3400万美元)被锁定无法提取。
#3 总结
针对本次事件,成都链安技术团队建议:
1.开发者应具备基本的安全开发意识,熟悉智能合约开发应注意的安全问题;
2.在合约设计和实现时,注意代码实现的正确性,项目上线前,可选择专业的安全审计公司进行全面的安全审计,规避安全风险。

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.

marsbit3 h fa

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

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

marsbit4 h fa

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

marsbit4 h fa

Trading

Spot
Futures
活动图片