Penpie Hack

TOTAL LOST $27.0M
High #187 All-Time Reentrancy ethereum

Summarize with AI

Affected Chain ethereum Incident surface
Recovered - No recovery reported
All-Time Rank #187 By amount stolen
Protocol Type Yield Target category

Incident Overview

On September 3, 2024, the yield protocol Penpie was exploited for $27 million through a reentrancy vulnerability in its smart contracts.

The attacker exploited a reentrancy vulnerability by creating valueless versions of Pendle’s yield-bearing tokens (Standardized Yield, SY) and linking them to valuable assets. They deployed five malicious contracts mimicking legitimate liquidity pools, tricking Penpie’s rewards system. Using these fake SY tokens, they claimed real yield and executed three attack transactions between 6:25 PM and 6:42 PM UTC, siphoning $15.7 million in the first transaction and $5.6 million in the other two.

The attacker stole various assets including 695 rswETH, 4,101 agETH, 2,723 wstETH, and 2.52 million sUSDe. Pendle’s team managed to pause the contracts three minutes after the final attack, preventing further exploitation.

Exploiter:

https://etherscan.io/address/0x2f2dde66…f61c39

https://etherscan.io/address/0x69751b7e…cdeb52

https://etherscan.io/address/0x28e3fd9e…c74769

https://etherscan.io/address/0x7a2f4d62…a61d1b

Incident Report

Protocol / Project Penpie
Date of Incident
Affected Chain(s) ethereum
Attack Technique Reentrancy
Classification Protocol Logic / Yield Aggregator
Primary Source View Post-Mortem

Protocol Information

Protocol Type Yield
Smart Contract Language Solidity
Official Website www.magpiexyz.io/earn
Protocol Twitter/X @Penpiexyz_io
Team Anonymous
Source Code Unverified

Market Context at Time of Hack

Token Categories
Ethereum Ecosystem Arbitrum Ecosystem BNB Chain Ecosystem

What the Attacker Needed to Succeed

Understanding the prerequisites for this type of attack helps auditors identify protocols that are most at risk and helps developers build better defenses.

Technical Knowledge Deep understanding of reentrancy and Solidity and EVM internals
Capital Required Seed capital to cover gas and initial position setup
On-Chain Access Ability to interact with ethereum smart contracts and deploy a custom exploit contract
Protocol Analysis Identification of the exploitable vulnerability in Penpie's contract logic - root cause: protocol logic / yield aggregator
Execution Speed Precise transaction ordering and timing to exploit the vulnerability within a single atomic block
Obfuscation Plan A strategy to launder and move stolen funds - typically through mixers, cross-chain bridges, or decentralized DEX swaps to resist tracing

What Auditors Should Check

Could this have been caught in audit? Yes — skilled auditors routinely flag Reentrancy vulnerabilities in code review

If you're auditing a protocol with similar architecture to Penpie, these are the critical security checks that could have prevented this incident (September 2024).

  • Verify all logic paths related to Reentrancy are guarded by proper access controls and input validation - see the Reentrancy attack class for patterns
  • Check that all state-changing functions follow the Checks-Effects-Interactions (CEI) pattern to prevent reentrancy and logic ordering bugs
  • Review privileged functions (owner, admin, governance) for potential abuse vectors - centralization risks should be documented and bounded with timelocks or multi-sigs

Master these auditing techniques with hands-on labs and real exploit scenarios in the Smart Contract Hacking course.

Free Trial

Related Attack Classes

The technique used in this hack maps to these vulnerability classes in our security curriculum:

See all Reentrancy examples →

Proof-of-Concept Exploits

1 PoC available

Sources & References

Learn to Prevent the Next Penpie

The Penpie hack is one of many attacks that skilled auditors are trained to detect before deployment. Master real exploit patterns and defense techniques with hands-on Web3 security training.

Recreate exploit patterns safely Free Trial