零时科技 || Zenterest 攻击事件分析

币界网Published on 2024-08-22Last updated on 2024-08-22

币界网报道:

AZvLVBueS8dPHk3YIbziS3gpLnKyfry9IYBrqrSW.jpeg

背景介绍

近期,我们监控到一起针对 Ethereum 的链上攻击事件,https://etherscan.io/tx/0xfe8bc757d87e97a5471378c90d390df47e1b29bb9fca918b94acd8ecfaadc598

被攻击的项目为 Mantra DAO 的 DeFi 项目 Zenterest

该项目是一个 Compound Fork 的项目,提供借贷等功能,不过该项目已经关闭。

图片

攻击及事件分析

首先,攻击者利用 Uniswap V3 通过 flash ,借入了 85.0085 WHITE 

图片

随后,攻击者将自己的2 000 MPH 转给了Zenterest,并 mint 了 751,165,762,743 / 1e18zenMPH ,即 MPH Token 的 underlying Token (价值 21200 MPH )。

图片

在 Compound 中, mintTokenAmount 为 mintAmount 除以exchangeRate(为underlying Token的价值) 

图片

exchageRate 的计算方式为

图片

其中, totalCash 为 2,130,237,755,166,997,669,234 ,

totalBorrows 为377,279,871,321,643,951,514,656 ,

totalReserves 为336,296,661,332,642,353,710,274 ,

totalSupply 为 1,527,610,653,739 。

故 exchangeRate 为 28,222,798,550.562313 。

图片

所以, mintToken 为 751,165,762,743 。

图片

图片

接着,攻击者将从 Uniswap 中 flash 闪电贷获得的 85 WHITE Token 转给了 Zenterest。 

图片

这里,攻击者是为了操纵 zenWHITE 的 borrowRate ,否则导致 borrowRate 过高,导致攻击失败。

图片

然后,攻击者利用 cToken 的 borrow 借出 zenWHITE 的所有余额。

图片

漏洞点就出现在 ZenterestPriceFeed 价格预言机上,

图片

我们可以看到 ZenterestPriceFeed 的代码如下:

图片

其价格是通过 updatePrice 和 updatePriceBatch 来更新的。

图片

我们可以看到,此价格预言机中的价格已经570天没有更新,所有价格均已过期,我们找到最近一次更新 MPH Token 价格的交易如下:

图片

最近的更新 MPH Token 价格的交易为:https://etherscan.io/tx/0x8938ec223516e0f09d904ee6187032f2038f3f768d754eb19b4f19450e7d185d

图片

其价格更新参数的数据结构为:

图片

所以,通过 Zenterest Price Oracle 获取的 MPH Token 的价格为 0x35b52f953f951 =944,836,858,607,953 ,而当前实际的价格为 0.4677 USD 。

图片

同时,我们可以看到获取的 WHITE Token 的价格为 66,570,137,662,599,764 ,而当前实际的价格为 4200 USD 。

攻击者投入 23200 MPH ,借贷 89.91 WHITE ,根据 Zenterest Price Oracle 获取的价格计算,

图片

所以,攻击者可以借出 89.91 WHITE ,攻击者归还从 Uniswap 借到的 85 WHITE 和 0.0085 WHITE利息,最终获利 4.9 WHITE ,价值 21000 USD 。 

总结

本次漏洞的成因是项目已经不再使用,但是 cToken 却没有暂停,且价格预言机的价格没有更新,导致标的资产价格失真,攻击者利用失真的价格来通过借贷进行获利,最终导致攻击者用极少的 MPH 掏空了项目方的 WHITE 代币。

Trending Cryptos

Related Reads

Real-life 'Black Mirror' Pumpfun Go: 40 Yuan to Lick Toilets, 14,000 USD for a Logo Tattoo on the Forehead

The article discusses the controversial new platform "Pumpfun Go," a bounty task platform launched by the meme coin platform Pump.fun. Its slogan is "Pay anyone to do anything." The platform allows users to anonymously post tasks with cryptocurrency rewards, which are held in escrow until completion and verification. The piece highlights extreme and disturbing tasks that have gained notoriety, such as licking a gas station toilet floor for roughly $5.63, eating live insects, getting a company logo tattooed on one's forehead for $14,000, and even a now-removed $700,000 bounty for suicide. These tasks are often linked to promoting specific meme coins by generating shocking, attention-grabbing content. While some tasks involve community-building or charity, critics, including New York Governor Kathy Hochul, condemn the platform for exploiting economic desperation and encouraging humiliating or dangerous behavior. They argue it mirrors dystopian narratives from shows like "Black Mirror" and movies like "Nerve," where online dares escalate for viewers' entertainment. Supporters and some participants counter that the platform provides much-needed income opportunities for the financially struggling. One user claimed the bounty money far exceeded his monthly salary. The article concludes by questioning the morality of a system where the wealthy pay for spectacle and the poor trade dignity for survival, reflecting a long history of public consumption of others' suffering. It suggests hope may lie in future technological abundance freeing people from such desperate choices.

marsbit7m ago

Real-life 'Black Mirror' Pumpfun Go: 40 Yuan to Lick Toilets, 14,000 USD for a Logo Tattoo on the Forehead

marsbit7m ago

Faked Trades, Clone Websites, 1105 Videos: Polymarket Under CFTC Scrutiny

The U.S. Commodity Futures Trading Commission (CFTC) has launched a wide-ranging investigation into prediction market platform Polymarket. The probe, triggered by a Wall Street Journal report, focuses on allegations of systematic marketing fraud. The report revealed Polymarket allegedly hired dozens of student content creators to post over 1,100 videos showing fake, profitable trades on cloned websites, without disclosing the paid relationships. These videos, with over 140 million views, were pivotal to user growth. Simultaneously, the National Association of Consumer Advocates (NACA) filed a lawsuit in Washington D.C., accusing Polymarket and its executives of deceptive advertising targeting college students. The suit details off-campus promotions and payments made through the CMO's personal PayPal account to influencers who failed to disclose sponsorships. The investigation places CFTC Chairman Michael Selig in a difficult position, as he has been a vocal advocate for prediction markets and is currently suing multiple states to assert federal jurisdiction over them. This case tests the CFTC's dual role as both promoter and enforcer. This marks Polymarket's second major clash with the CFTC. After a 2022 settlement and U.S. ban, it regained approval to operate in September 2025, secured a $20 billion investment, and saw its valuation soar. The current crisis, compounded by a recent $3.1 million front-end supply chain attack, represents the platform's most severe multi-front challenge since its founding.

Foresight News9m ago

Faked Trades, Clone Websites, 1105 Videos: Polymarket Under CFTC Scrutiny

Foresight News9m ago

Real-Life 'Black Mirror' Pumpfun Go: 40 Yuan to Lick a Toilet, $14,000 to Tattoo a Logo on Your Forehead

Pumpfun Go, a bounty task platform launched by the meme coin platform Pump.fun, is facing intense controversy. The platform's slogan "Pay anyone to do anything" has manifested in real-world tasks where participants perform increasingly extreme or demeaning acts for cryptocurrency rewards. These tasks range from licking a gas station toilet floor for roughly $5.63 to getting a permanent "bounty.fun" logo tattooed on one's forehead for $14,000. Other completed challenges include eating live insects and quitting a job on camera. The highest-value active bounty offers approximately $560,000 for climbing Mount Everest and placing a bet on a specified platform. While some tasks involve promoting meme coins or community events, the platform has drawn widespread criticism for incentivizing the exploitation of economic desperation. Participants, often citing "we need money" as their motivation, complete these tasks for sums that can far exceed their regular income. Critics, including New York Governor Kathy Hochul, have condemned Pumpfun Go as a dystopian system that commodifies human dignity and preys on the vulnerable. Supporters argue it provides a novel income opportunity for those in need. The debate highlights deeper societal issues around power, inequality, and the historical human fascination with spectacles of humiliation. The platform's existence raises questions about the ethical limits of anonymous online markets and the persistent reality where financial need forces individuals to trade their dignity for survival.

Odaily星球日报15m ago

Real-Life 'Black Mirror' Pumpfun Go: 40 Yuan to Lick a Toilet, $14,000 to Tattoo a Logo on Your Forehead

Odaily星球日报15m ago

Trading

Spot

Hot Articles

Discussions

Welcome to the HTX Community. Here, you can stay informed about the latest platform developments and gain access to professional market insights. Users' opinions on the price of ETH (ETH) are presented below.

活动图片