Nereus Finance Hack
What happened
Nereus Finance, an Avalanche lending protocol that issues the NXUSD stablecoin, lost about $371,000 in a flash loan attack on September 6, 2022. The target was a recently added NXUSD market that accepted AVAX/USDC Trader Joe LP (JLP) tokens as collateral. Its oracle priced the LP token from the pool's live reserves, so for one block the attacker could make roughly $508,000 of collateral look large enough to borrow 998,000 NXUSD. After repaying a 51 million USDC flash loan from Aave, the attacker kept 371,406 USDC.
The borrowed NXUSD left about $500,000 of bad debt in the protocol. Nereus said it liquidated and paused the exploited JLP market, covered the bad debt with NXUSD from its treasury, said no user funds were at risk, and offered the attacker a 20% whitehat reward to return the funds. CertiK and PeckShield flagged the attack. The Block reported that the attacker bridged the proceeds to Ethereum, converted them to about 194 ETH and 15,800 DAI, and moved around 180 ETH through several addresses to an exchange.
Exploit transaction: 0x0ab12913f9232b27b0664cd2d50e482ad6aa896aeb811b53081712f42d54c026
CauldronV2 market: 0xc0a7a7f141b6a5bce3ec1b81823c8afa456b6930
DegenBox: 0x0b1f9c2211f77ec3fa2719671c5646cf6e59b775
JLP oracle: 0xf955a6694c6f5629f5ecd514094b3bd450b59000
How it happened
- The attack contract flash-borrowed 51,000,000 USDC from Aave.
- It swapped 280,000 USDC for WAVAX on Trader Joe, then added that WAVAX plus 260,000 USDC to the AVAX/USDC pool, receiving JLP tokens.
- It swapped the remaining 50,460,000 USDC for WAVAX in the same pool. This drained most of the WAVAX reserve and filled the pool with USDC.
- It called
updateExchangeRate()on the CauldronV2 market. The JLP oracle priced each LP token as(wavaxReserve * avaxPrice + usdcReserve * usdcPrice) / totalSupply, using the manipulated reserves, so the JLP collateral was overvalued. - It deposited its JLP through DegenBox and borrowed about 998,000 NXUSD against collateral worth about $508,000.
- It swapped the WAVAX back to USDC, swapped the NXUSD to USDC through Curve and other pools, repaid the flash loan plus a fee of about 25,000 USDC to Aave, and kept 371,406 USDC.
Protocol details
Evidence
- report Report archive.is
- report Report archive.is
- transaction snowtrace.io transaction 0x0ab1…c026 snowtrace.io
- address snowtrace.io address 0x0b1f…b775 snowtrace.io
- address snowtrace.io address 0x16b9…49d6 snowtrace.io
- address snowtrace.io address 0x6999…b1af snowtrace.io
- address snowtrace.io address 0x8ec7…8381 snowtrace.io
- address snowtrace.io address 0xe767…c060 snowtrace.io
- code NereusFlashLoanAttack.md (real-world-ethereum-hacks-remastered) github.com
- analysis DeFiLlama defillama.com
- analysis Avalanche flash loan exploit sees $371K in USDC stolen cointelegraph.com
- analysis Attacker scoops $370,000 profit in $51 million flash loan arbitrage on Avalanche theblock.co
- analysis Nereus Finance Flashloan Attack Analysed and Exploited faraz.faith
- analysis DefiLlama protocol catalogue: Nereus Finance defillama.com
Understand the attack patterns
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.