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

成都链安Published on 2022-04-23Last updated on 2022-04-23

Abstract

由于多个代码缺陷导致合约中 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.在合约设计和实现时,注意代码实现的正确性,项目上线前,可选择专业的安全审计公司进行全面的安全审计,规避安全风险。

Related Reads

SK Hynix Q2 Profit Soars Sixfold, Still 'Misses Expectations'; Secures Long-Term Agreements with 10 Clients, HBM4 to Accelerate Volume Ramp in Second Half

SK Hynix reported record-breaking Q2 2026 financial results, with operating profit soaring 557% year-over-year to 60.5 trillion won and revenue increasing 257% to 79.3 trillion won, driven by strong demand for AI server memory, HBM, and enterprise SSDs. The operating profit margin reached 76.3%. However, both figures fell short of analyst expectations, leading to a drop in its share price. The company attributed the earnings miss to three factors: a high sales mix of HBM, which limited upside from surging prices of general-purpose DRAM; a deceleration in memory price increases compared to Q1; and long-term supply agreements (LTAs) with major customers that lock in prices, reducing sensitivity to spot market gains. SK Hynix has signed LTAs with about 10 clients, covering roughly half of its sales. Despite the miss, the company remains optimistic about AI-driven demand. Its net profit of 93.9 trillion won was significantly boosted by a one-time gain from the partial sale of its Kioxia stake. Financially, it strengthened its cash position, ending the quarter with a net cash position of 69.4 trillion won. Looking ahead, SK Hynix plans capital expenditures at the high end of its 40-50 trillion won range for 2026 to expand capacity for HBM and advanced NAND products, including accelerating the mass production of HBM4 in the second half of the year.

marsbit3m ago

SK Hynix Q2 Profit Soars Sixfold, Still 'Misses Expectations'; Secures Long-Term Agreements with 10 Clients, HBM4 to Accelerate Volume Ramp in Second Half

marsbit3m ago

Behind the 67,000 Semiconductor Talent Shortage: U.S. Industrial Policy Game and Implications for China

The U.S. push to reshore semiconductor manufacturing faces a core challenge: a significant talent shortage. While over $770 billion in investments are planned across 160 projects, a key hurdle is finding enough people to run the new fabs. According to industry projections, the U.S. could face a shortage of approximately 67,000 technicians, engineers, and computer scientists by 2030. This shortage is multi-faceted. It includes not only high-level chip design engineers requiring advanced degrees but also a substantial need for technicians to operate and maintain fab equipment. Technician roles, while often requiring less formal education, are hard to fill due to factors like shift work, factory locations, and local community infrastructure. Conversely, for high-end engineers, the issue is less about salary—which is already competitive—and more about intense competition for specialized skills from other tech sectors and the long lead time to develop such expertise. The geographic dispersion of new investments complicates recruitment, as fabs need large numbers of local, stable employees. In response, U.S. policy emphasizes building workforce development as critical infrastructure. Strategies include expanding community college programs for technician training, fostering industry-education partnerships, and pursuing immigration reforms for high-skilled talent, aiming to balance immediate needs with long-term domestic pipeline development. For China, the key takeaway is the need to integrate talent supply planning with factory construction from the outset. This involves requiring companies to submit workforce plans, strengthening vocational education aligned with industry needs, and building supportive local ecosystems to retain talent. Ultimately, a sustainable semiconductor industry depends not just on building fabs, but on cultivating a continuous, local talent pipeline capable of keeping them running and advancing.

marsbit59m ago

Behind the 67,000 Semiconductor Talent Shortage: U.S. Industrial Policy Game and Implications for China

marsbit59m ago

Trading

Spot
活动图片