Banana Swap Hack
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 Information
Market Context at Time of Hack
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.
What Auditors Should Check
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 TrialSecurity Audit History
- Audit Report 1 Report
Sources & References
-
01
Source 1 https://archive.is/FIt5T
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.