被盗约2700万美元的加密资产,Penpie为何被黑客“血洗”?

链得得Published on 2024-09-04Last updated on 2024-09-04

2024年09月04日,据Beosin Alert监测显示,建立在 Pendle 上的 DeFi 协议 Penpie 遭到黑客攻击,被盗取约 2700 万美元的加密资产。Beosin安全团队第一时间对事件进行了分析,结果如下。

Penpie 是一个与 Pendle Finance 集成的 DeFi 平台,专注于锁定 PENDLE 代币以获得 Pendle Finance 内的治理权和增强的收益收益。Penpie 旨在为 Pendle Finance 用户提供收益和 veTokenomics 提升服务。

事件相关信息


●攻击交易0x56e09abb35ff12271fdb38ff8a23e4d4a7396844426a94c4d3af2e8b7a0a2813●攻击者地址0xc0Eb7e6E2b94aA43BDD0c60E645fe915d5c6eb84●攻击合约0x4aF4C234B8CB6e060797e87AFB724cfb1d320Bb7●被攻击合约0x6e799758cee75dae3d84e09d40dc416ecf713652

漏洞分析


本次事件主要是攻击者利用market合约中claimRewards函数重入质押以提高staking合约余额,再将staking合约中多余的代币和质押资产提取以获利。

攻击流程

攻击准备阶段:

1. 攻击者通过攻击合约调用用Penpie协议中的Factory合约创建了新的market以及Yield,其中将SY设置为攻击合约。
0xfda0dde38fa4c5b0e13c506782527a039d3a87f93f9208c104ee569a642172d2

2.攻击者进行闪电贷了四种代币,为后续抵押资金作储备。并调用staking合约中的batchHarvestMarketRewards函数对新创建的market进行奖励更新。 

3.在batchHarvestMarketRewards函数中,对market进行奖励更新时,会调用market合约中的redeemRewards函数。并且合约记录了redeemRewards函数前后的余额变化。 

4.在market的redeemRewards函数中,会调用到SY合约中的claimReward函数。然而SY合约是攻击合约,攻击合约通过这个函数完成了对Staking合约的重入,将闪电贷的资金抵押到Staking合约,共4次。 

5.这时回到Staking,由于redeemRewards函数前后余额差明显,触发了_sendRewards函数,_sendRewards函数最后调用的_queueRewarder会将多余的代币授权给market合约并记录为奖励。

6.攻击者领取记录的奖励。 

7.攻击者将质押的资产通过withdraw函数提取,并归还闪电贷进行获利。 

Pendle随后发布攻击分析报告:发现漏洞后立即暂停合约,使1.05亿美元资产免受进一步损失。

资金追踪

截止发文时,被盗资金约2700万美元,Beosin Trace追踪发现攻击者已将被盗资金全部转换为ETH,资金先存放在0x2f2dDE668e5426463E05D795f5297dB334f61C39地址。



截止发文,Penpie攻击者地址向Tornado Cash陆续转移了2900枚ETH(价值约690万美元)。
目前,Penpie 项目方也通过链上向黑客喊话,希望与黑客进行沟通返还被盗资金,如果返还可以支付赏金。并附上了联系方式。

总结

针对本次事件,Beosin安全团队建议:1.对合约的相关函数增加防重入修饰器;2.不使用白名单对传入代币进行校验的话,最好使用统一的包装合约重新生成代币;3.项目上线前,强烈建议选择专业的安全审计公司进行全面的安全审计,规避安全风险。

链得得仅提供相关信息展示,不构成任何投资建议

Related Reads

Warsh's First Day in Office, Markets Deliver a 'Wake-up Call': Rate Hike Expected This Year

On his first day in office, newly inaugurated Federal Reserve Chairman Warsh received a stark market warning, with expectations now fully pricing in a 25-basis-point interest rate hike this year. The shift was triggered by hawkish remarks from Fed Governor Waller, who stated that inflation is now the key policy "driver" and that the odds of a hike or cut are evenly split. This sent short-term Treasury yields higher. Waller signaled a significant pivot in his stance, citing disappointing inflation and labor data. He suggested removing "easing bias" language from Fed statements and did not rule out future rate increases if inflation fails to recede, though he noted immediate action isn't warranted without signs of unanchored inflation expectations. Chairman Warsh faces immediate pressure at his first FOMC meeting in June. With the preferred inflation gauge at a three-year high, analysts warn that failing to hike could be interpreted as an implicit easing of policy. The geopolitical situation in the Middle East is adding to existing price pressures. The market's expectation for a hike contrasts sharply with earlier forecasts for multiple cuts. While long-term Treasury yields have been contained by lower energy prices recently, analysts note they remain under structural upward pressure. Warsh's swearing-in at the White House highlights political scrutiny over Fed independence. However, the market has made it clear that inflation is the most urgent challenge, leaving the new chairman little time to settle in.

marsbit10h ago

Warsh's First Day in Office, Markets Deliver a 'Wake-up Call': Rate Hike Expected This Year

marsbit10h ago

Has Microsoft Lost Its Way in the AI Race, and Can Copilot Bring It Back on Track?

Microsoft, once seen as an early AI frontrunner due to its investment in OpenAI, is navigating a strategic shift amid increased competition. Its initial reliance on OpenAI’s GPT models has been complicated by OpenAI’s growing ambitions as a direct competitor, rapid advancements from rivals like Claude and Gemini, and the disruptive rise of AI agents, which challenge its traditional SaaS business model. These factors contributed to stock declines and slower-than-expected adoption of its flagship Copilot products. In response, CEO Satya Nadella has taken a hands-on role in product development, signaling the urgency of change. Microsoft is pivoting from a model-centric strategy to a "model-agnostic" enterprise platform approach. It aims to become the foundational layer connecting various AI models—from OpenAI, Anthropic, or its own new "Superintelligence" team—with enterprise workflows, data, security, and cloud services. Recent organizational changes merged consumer and enterprise Copilot teams to accelerate innovation, exemplified by new products like Copilot Tasks and Copilot Cowork. However, this transformation comes at a high cost. Microsoft faces massive capital expenditures, potentially reaching ~$190 billion by 2026, to support AI infrastructure. While its platform strategy shows early signs of traction with growing Azure AI revenue, it must balance startup-like agility with the reliability expected by enterprise clients. The core challenge is no longer being the sole AI winner but defending its position as the essential enterprise software entry point amidst rapid technological commoditization and the shift towards always-on AI agents.

marsbit10h ago

Has Microsoft Lost Its Way in the AI Race, and Can Copilot Bring It Back on Track?

marsbit10h ago

Trading

Spot
Futures

Hot Articles

How to Buy PENDLE

Welcome to HTX.com! We've made purchasing Pendle (PENDLE) simple and convenient. Follow our step-by-step guide to embark on your crypto journey.Step 1: Create Your HTX AccountUse your email or phone number to sign up for a free account on HTX. Experience a hassle-free registration journey and unlock all features.Get My AccountStep 2: Go to Buy Crypto and Choose Your Payment MethodCredit/Debit Card: Use your Visa or Mastercard to buy Pendle (PENDLE) instantly.Balance: Use funds from your HTX account balance to trade seamlessly.Third Parties: We've added popular payment methods such as Google Pay and Apple Pay to enhance convenience.P2P: Trade directly with other users on HTX.Over-the-Counter (OTC): We offer tailor-made services and competitive exchange rates for traders.Step 3: Store Your Pendle (PENDLE)After purchasing your Pendle (PENDLE), store it in your HTX account. Alternatively, you can send it elsewhere via blockchain transfer or use it to trade other cryptocurrencies.Step 4: Trade Pendle (PENDLE)Easily trade Pendle (PENDLE) on HTX's spot market. Simply access your account, select your trading pair, execute your trades, and monitor in real-time. We offer a user-friendly experience for both beginners and seasoned traders.

5.2k Total ViewsPublished 2024.03.29Updated 2025.03.21

How to Buy PENDLE

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 PENDLE (PENDLE) are presented below.

活动图片