Nimbus DAO Hack

Reported loss $76K
BNB Chain
Flash Loan Attack

What happened

Nimbus Platform (Nimbus DAO) on BNB Chain lost about 278 BNB (around $76,000) on December 14, 2022, when an attacker used a flash loan to inflate the rewards paid by its GNIMB staking contracts.

The staking contracts paid rewards in GNIMB, and getReward() sized each payout using the NIMB price read directly from the NIMB / NBU_WBNB pool. With about 75,477 borrowed BNB, the attacker bought most of the NIMB out of that pool. SolidityScan reports that this pushed the NIMB-to-GNIMB ratio used for rewards to about 2,919.7:1. The attacker then claimed rewards on its own staking positions at the inflated rate, sold the GNIMB and NIMB back to BNB, and repaid the loan inside the same transaction.

**Block data**

  • Attacker: 0x86aa1c46f2ae35ba1b228dc69fb726813d95b597
  • Exploit transaction: 0x42f56d3e86fb47e1edffa59222b33b73e7407d4b5bb05e23b83cb1771790f6c1
  • Related earlier transaction listed by DeFiHackLabs: 0x7d2d8d2cda2d81529e0e0af90c4bfb39b6e74fa363c60b031d719dd9d153b012
  • Staking contract: 0x3aa2b9de4ce397d93e11699c3f07b769b210bbd5
  • Locked staking contract: 0x706065716569f20971f9cf8c66d092824c284584

How it happened

  1. The attacker held GNIMB staking positions in the fixed-APY staking contracts, so there were rewards to claim.
  2. It flash-borrowed WBNB (SolidityScan puts the total at about 75,477 BNB), converted it to Nimbus's wrapped BNB, NBU_WBNB, and swapped it into the NIMB / NBU_WBNB pool, buying most of the pool's NIMB and sharply raising the NIMB price.
  3. With the pool skewed, it called getReward() on its positions. The reward formula priced NIMB from that pool, so the GNIMB payout was far larger than normal.
  4. It swapped the NIMB and the reward GNIMB back to BNB, repaid the flash loans, and kept about 278 BNB.

Protocol details

Classification Other / Protocol Logic
Protocol Type Exploit/Flash Loan Attack
Affected asset / contract NBU
Implementation language Solidity
Protocol links Website @nmbplatform

Understand the attack patterns

Build your security review skills

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