OnyxDAO Hack

Reported loss $3.8M
Ethereum
Flash Loan Attack

What happened

Onyx Protocol's Ethereum lending market was exploited through its NFTLiquidation contract. Onyx identified this as the primary vulnerability and said XCN staking and farming were unaffected. Its response proposed closing the Ethereum lending market and reimbursing suppliers.

Technical root cause

NFTLiquidation accepted untrusted input without sufficient validation, enabling manipulation of self-liquidation rewards. Halborn also identified a low-liquidity precision weakness, while Onyx stressed that the empty-market condition was not the primary cause.

How it happened

  1. The attacker used flash-loaned capital to interact with Onyx's lending markets.
  2. Halborn's analysis describes exchange-rate manipulation involving a low-liquidity market and precision errors.
  3. Insufficient input validation in NFTLiquidation also allowed the attacker to manipulate the self-liquidation reward and drain assets.
  4. Onyx's post-mortem emphasized the liquidation vulnerability as the primary issue.

Protocol details

Classification Borrowing and Lending / Protocol Logic
Protocol Type Farm
Implementation language Solidity
Protocol links Website @OnyxDAO

Understand the attack patterns

Build your security review skills

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