ApeRocket Hack

TOTAL LOST $1.3M
Medium Flashloan Incentive Rewards Exploit / Flash Loan Attack bsc

Summarize with AI

Affected Chain bsc Incident surface
Recovered - No recovery reported
All-Time Rank #786 By amount stolen
Auditors 1 Prior security audit

Incident Overview

The attacker's address:

https://polygonscan.com/address/0xfabd1c2f…82c19d

The transaction behind the attack:

https://polygonscan.com/tx/0x377fb92f…cf9d35

The attacker:

- borrowed 24M DAI and 54M MATIC of flash loans from Aave

- created 25M DAIMATIC LP

- deposited 10M LP to the DAI-MATIC LP vault. Got the majority share (99%) of the vault

- deposited 15M LP from the MiniApeV2 contract of ApeSwap to the DAI-MATIC LP vault of ApeRocket

- called withdrawAll() on the vault

- with the rather large amount of LP token added (deposited from ApeSwap’s MasterChef) by the attacker at step 3, it returned a large amount of profit. As a result, the system minted 2.5M pSAPCE as a reward to the attacker

- swapped the rewarded pSPACE token to ETH, repaid the flash loan

- taken out 521 ETH.

The deposit() function of ApeSwap Polygon's MiniApeV2 (a fork of SushiSwap's MiniChefV2) allows deposits to any address, which is not possible for a regular MasterChef v1, allowing the profit amount for everyone in the vault to be increased.

Even if the attacker owns the bulk of the vault, virtually all of the profit will be returned to the attacker.

Incident Report

Protocol / Project ApeRocket
Date of Incident
Affected Chain(s) bsc
Attack Technique Flashloan Incentive Rewards Exploit / Flash Loan Attack
Classification Ecosystem / Stablecoin / Yield Aggregator
Primary Source View Post-Mortem

Protocol Information

Protocol Type Yield
Affected Token pSPACE
Protocol Twitter/X @ApeRocketFi
Team Anonymous
Source Code Unverified

Market Context at Time of Hack

Token Categories
Toncoin 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 flashloan incentive rewards exploit / flash loan attack and Solidity and EVM internals
Capital Required Flash loan capital (borrowed atomically, zero upfront cost)
On-Chain Access Ability to interact with bsc smart contracts and deploy a custom exploit contract
Protocol Analysis Identification of the exploitable vulnerability in ApeRocket's contract logic - root cause: ecosystem / stablecoin / 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 Flashloan Incentive Rewards Exploit / Flash Loan Attack vulnerabilities in code review
Audited by Audit Report 1 — still lost $1.3M. Prior audits don't guarantee safety, especially after post-audit code changes.

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

  • Verify all logic paths related to Flashloan Incentive Rewards Exploit / Flash Loan Attack are guarded by proper access controls and input validation - see the Flash Loans Attacks attack class for patterns
  • 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

Security Audit History

Related Attack Classes

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

See all Flash Loans Attacks examples →

Sources & References

Learn to Prevent the Next ApeRocket

The ApeRocket 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