Gym Network Hack

TOTAL LOST $2.1M
Medium Deposit Function Exploit bsc

What happened

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. Tx
  2. Tx
  3. Tx

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.

Case & protocol details

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
Protocol Type Exploit/Other
Affected asset / contract GYMNET
Smart Contract Language Solidity
Official Website gymnetwork.io/
Protocol Twitter/X @GymNet_Official

Security review history

  • CertiK 2022-05-06 No public report

Evidence & learning

Sources and on-chain records

Practice this exploit pattern safely

Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.