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

深潮Опубліковано о 2024-09-04Востаннє оновлено о 2024-09-04

9 月 4 日,建立在 Pendle 上的 DeFi 协议 Penpie 遭到黑客攻击,被盗取约 2700 万美元的加密资产。

撰文:Beosin

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.项目上线前,强烈建议选择专业的安全审计公司进行全面的安全审计,规避安全风险。

Пов'язані матеріали

Why Did Zhipu Surge Nearly 30% in a Single Day?

"Global AI Model Unicorn" Zhipu's stock surged nearly 30% in a single day, reaching a new market cap high. The catalyst was the launch of its GLM-5.1-highspeed API, boasting a generation speed of **400 tokens per second**, setting a new global benchmark. This speed, roughly 3-5 times faster than industry leaders like OpenAI's GPT-4o and Anthropic's Claude, is achieved **without compromising the full-scale model's capabilities**. In the era of AI Agents requiring dozens of self-calls, such latency reduction is critical, transforming speed from a system metric into a determinant of intelligence limits. The breakthrough stems from a three-layer technical overhaul: 1. **TileRT Inference Engine**: Compiles the entire model into a continuous, always-on computation pipeline using "Warp Specialization," minimizing GPU idle time by having different processor groups handle data loading, computation, and communication in parallel. 2. **Heterogeneous Parallelism for MLA**: To efficiently run the GLM-5.1 model using the MLA attention mechanism, TileRT employs a heterogeneous strategy. One GPU handles sparse indexing/routing, while the others perform dense computation, optimizing for MLA's unique workflow. 3. **ZCube Network Architecture**: Replaces the standard Spine-Leaf (ROFT) network topology with a flat, dual-group interconnect. This design creates a single optimal path between any two GPUs, eliminating network congestion at scale and reducing latency. The business impact is significant: a 15% increase in cluster throughput (free extra capacity), a 40.6% reduction in tail latency (improved stability), and a one-third cut in networking hardware costs. Long-term, this innovation challenges the dominance of NVIDIA's integrated hardware-software stack (GPU+NVLink+InfiniBand), potentially benefiting manufacturers of high-density Leaf switches and optical modules while lowering the software barrier for domestic AI chips like Huawei's Ascend. The innovation proves that more can be achieved with the same compute, reshaping the infrastructure beyond just GPUs.

marsbit27 хв тому

Why Did Zhipu Surge Nearly 30% in a Single Day?

marsbit27 хв тому

Bidding Farewell to the 'Gray Gambling Game'! Polymarket Charges into the Compliance Track—How Will This Impact the Entire Crypto Industry?

From Gray to Regulated: How Polymarket’s Compliance Journey Reshapes Crypto The evolution of Polymarket, a decentralized prediction market platform, illustrates a critical trend in crypto: innovative, high-value sectors ultimately integrate into regulatory frameworks. Founded in 2020, Polymarket quickly gained traction by leveraging low-cost Layer 2 blockchain technology for event-based trading, notably during the 2024 US presidential election where its markets outperformed traditional polls. However, its "build first, comply later" approach led to a 2022 CFTC enforcement action, resulting in a $1.4 million fine and a ban from the US market. A pivotal shift occurred in 2025 under a new US administration. Polymarket strategically acquired CFTC-licensed derivatives exchange QCX for $112 million, securing a regulated pathway back into the US. This move coincided with a regulatory reversal, as the CFTC withdrew a prior proposal to ban political event contracts. The platform’s successful "regulatory acquisition" strategy, avoiding a lengthy independent licensing process, highlights a viable compliance path for crypto-native projects. Its journey from regulatory target to a CFTC-recognized entity—bolstered by a major data partnership and investment from Intercontinental Exchange (ICE)—signals the maturation of prediction markets from a "crypto novelty" into acknowledged financial infrastructure. The story underscores that genuine utility provides negotiating power with regulators and that embracing compliance does not necessarily mean sacrificing core technological advantages.

marsbit45 хв тому

Bidding Farewell to the 'Gray Gambling Game'! Polymarket Charges into the Compliance Track—How Will This Impact the Entire Crypto Industry?

marsbit45 хв тому

Торгівля

Спот
Ф'ючерси

Популярні статті

Як купити PENDLE

Ласкаво просимо до HTX.com! Ми зробили покупку Pendle (PENDLE) простою та зручною. Дотримуйтесь нашої покрокової інструкції, щоб розпочати свою криптовалютну подорож.Крок 1: Створіть обліковий запис на HTXВикористовуйте свою електронну пошту або номер телефону, щоб зареєструвати обліковий запис на HTX безплатно. Пройдіть безпроблемну реєстрацію й отримайте доступ до всіх функцій.ЗареєструватисьКрок 2: Перейдіть до розділу Купити крипту і виберіть спосіб оплатиКредитна/дебетова картка: використовуйте вашу картку Visa або Mastercard, щоб миттєво купити Pendle (PENDLE).Баланс: використовуйте кошти з балансу вашого рахунку HTX для безперешкодної торгівлі.Треті особи: ми додали популярні способи оплати, такі як Google Pay та Apple Pay, щоб підвищити зручність.P2P: Торгуйте безпосередньо з іншими користувачами на HTX.Позабіржова торгівля (OTC): ми пропонуємо індивідуальні послуги та конкурентні обмінні курси для трейдерів.Крок 3: Зберігайте свої Pendle (PENDLE)Після придбання Pendle (PENDLE) збережіть його у своєму обліковому записі на HTX. Крім того, ви можете відправити його в інше місце за допомогою блокчейн-переказу або використовувати його для торгівлі іншими криптовалютами.Крок 4: Торгівля Pendle (PENDLE)Легко торгуйте Pendle (PENDLE) на спотовому ринку HTX. Просто увійдіть до свого облікового запису, виберіть торгову пару, укладайте угоди та спостерігайте за ними в режимі реального часу. Ми пропонуємо зручний досвід як для початківців, так і для досвідчених трейдерів.

342 переглядів усьогоОпубліковано 2024.12.12Оновлено 2025.03.21

Як купити PENDLE

Обговорення

Ласкаво просимо до спільноти HTX. Тут ви можете бути в курсі останніх подій розвитку платформи та отримати доступ до професійної ринкової інформації. Нижче представлені думки користувачів щодо ціни PENDLE (PENDLE).

活动图片