Gym Network Hack

TOTAL LOST $2.1M
Medium Deposit Function Exploit / Other bsc

Summarize with AI

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

Incident Overview

Gym Network has been exploited for $2.1M. The depositFromOtherContract() function is a wrapper for the _autoDeposit() function, where there is no transfer() function to transfer a user’s deposit to the contract, so a user can call deposit() and ‘create deposit record’ without actually transferring tokens.

Now function is resolved adding onlyBank() modifier.

Exploiter address (BSC): https://bscscan.com/address/0xb2c035ee…11d2e5

Exploiter contract (BSC): https://bscscan.com/address/0x7cbfd7bc…91b6ea

Victim contract: https://bscscan.com/address/0x0288fba0…34258a

Repaired contract: https://bscscan.com/address/0x7df0bc66…d8328b

Exploiter transactions example:

1) https://bscscan.com/tx/0x171a4481…705dd3

2) https://bscscan.com/tx/0x91f5e625…9f37dd

3) https://bscscan.com/tx/0x12970f39…f23d16

The attacker has created several contracts to perform these steps:

The attacker calls the depositFromOtherContract()  function with the deposit amount set to 8M GYMNET, without transferring money because there is no transfer function.

Next attacker calls withdraw() function to withdraw 8M GYMNET.

Then attacker swaps GYMNET tokens to BNB and sends them to this address: https://bscscan.com/address/0xb2c035ee…11d2e5

All funds were laundered via TornadoCache.

Incident Report

Protocol / Project Gym Network
Date of Incident
Affected Chain(s) bsc
Attack Technique Deposit Function Exploit / Other
Classification Protocol Logic / Gaming / Metaverse / Gaming / Metaverse / Gaming / Metaverse / Gaming / Metaverse / Gaming / Metaverse / Gaming / Metaverse / Gaming / Metaverse / Gaming / Metaverse / Gaming / Metaverse / Gaming / Metaverse / Gaming / Metaverse / Gaming
Primary Source View Post-Mortem

Protocol Information

Protocol Type Services
Affected Token GYMNET
Smart Contract Language Solidity
Official Website gymnetwork.io/
Protocol Twitter/X @GymNet_Official
Team Public / Doxxed
Source Code Verified On-Chain

Market Context at Time of Hack

Token Categories
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 deposit function exploit / other and Solidity and EVM internals
Capital Required Seed capital to cover gas and initial position setup
On-Chain Access Ability to interact with bsc smart contracts and deploy a custom exploit contract
Protocol Analysis Identification of the exploitable vulnerability in Gym Network's contract logic - root cause: protocol logic / gaming / metaverse / gaming / metaverse / gaming / metaverse / gaming / metaverse / gaming / metaverse / gaming / metaverse / gaming / metaverse / gaming / metaverse / gaming / metaverse / gaming / metaverse / gaming / metaverse / gaming
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 Deposit Function Exploit / Other audit checklist and test coverage
Audited by Certik — still lost $2.1M. Prior audits don't guarantee safety, especially after post-audit code changes.

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

  • Verify all logic paths related to Deposit Function Exploit / 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 Gym Network

The Gym Network 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