Banana Swap Hack

TOTAL LOST $110K
Low Other

Summarize with AI

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

Incident Overview

Banana Swap was exploited for the total amount of 110,105 in $BUSD due to contract vulnerability.

Banana Swap is a simple DEX intended for trading the $DDC token. Due to security issues of the project's smart contracts, an attacker was able to manipulate the price of the $DDC token. The attacker used a contract function to manipulate the internal price of $DDC.

The attacker broke the price calculation mechanism in the project's contract. The attacker swapped 23 $DDC for 110,105 $BUSD using a malicious smart contract. Consequently, stolen assets were distributed between 3 team-related EOA addresses.

Attacker address:

https://bscscan.com/address/0x5b69f9c6…24fdef

Attacker contract:

https://bscscan.com/address/0x8aec5edb…fd7abb

Affected contract:

https://bscscan.com/address/0x4efdcaba…e32bb0

Transaction:

https://bscscan.com/tx/0xd08cfb22…75f054

Malicious contracts:

https://bscscan.com/address/0x7aa5bf87…8b65a4

https://bscscan.com/address/0xf3038244…3d4c47

https://bscscan.com/address/0x8672cfb5…d5c93c

https://bscscan.com/address/0xe932fb81…dc9b53

https://bscscan.com/address/0x2f0908ab…55ce2f

https://bscscan.com/address/0x4efdcaba…e32bb0

https://bscscan.com/address/0xe1a5f7cb…255d4d

Incident Report

Protocol / Project Banana Swap
Date of Incident
Attack Technique Other
Classification Exchange (DEX),Token
Primary Source View Post-Mortem

Protocol Information

Protocol Type Dexs
Affected Token DDC
Official Website pandaswapsol.io/
Protocol Twitter/X @wannaswapamm
Team Anonymous
Source Code Verified On-Chain

Market Context at Time of Hack

Token Categories
Solana 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 other and Solidity and EVM internals
Capital Required Seed capital to cover gas and initial position setup
On-Chain Access Ability to interact with smart contracts and deploy a custom exploit contract
Protocol Analysis Identification of the exploitable vulnerability in Banana Swap's contract logic - root cause: exchange (dex),token
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? Likely — with a thorough Other audit checklist and test coverage
Audited by Audit Report 1 — still lost $110K. Prior audits don't guarantee safety, especially after post-audit code changes.

If you're auditing a protocol with similar architecture to Banana Swap, these are the critical security checks that could have prevented this incident (August 2022).

  • Verify all logic paths related to Other are guarded by proper access controls and input validation
  • 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

Sources & References

Learn to Prevent the Next Banana Swap

The Banana Swap 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