NEAR Intents
Why it happened
Attack class: Logic errorA failed deposit notification left the credit in place after the refund, so unbacked balances were withdrawn as real USDT.
What would have stopped it
- Solvency check on total user balances
- Automatic pause on a failed invariant
Not scored before the exploit
BlackHart had not scored NEAR Intents before this exploit.
NEAR Intents lost about $3.8 million in USDT on BNB Chain after an attacker created balances inside the Intents contract that had no tokens behind them and withdrew them through the Omni bridge. The team first called it an Omni bug, and its later post-mortem placed the flaw in the Intents contract's deposit notification step. NEAR paused services, patched the contract and compensated affected users. Per NEAR, the full amount was returned by October 2 after tracing and negotiation.
The attacker made deposit notifications fail in the NEAR Intents contract, then withdrew the unbacked balances through the Omni bridge from the bridge vault on BNB Chain, starting with this withdrawal and ending with this one. The attacker wallet later contacted the recovery team.
Attack flow
All 4 on-chain stepsThe attack in 3 steps. Step 1, Ghost balance: NEAR Intents contract (source). Step 2, Withdrawal: Omni bridge vault on BNB Chain (bridge), about $3.8M reached this step. Step 3, Recovery: Bitcoin and exchange deposits (exit).
Step 1: Ghost balance
- SourceNEAR Intents contractdeposit credit kept after refundbalances with no tokens behind them
Step 2: Withdrawal
- BridgeOmni bridge vault on BNB ChainUSDT paid out to the attackerabout $3.8M in five withdrawals0x233c5370...4Cb4Cd
Step 3: Recovery
- ExitBitcoin and exchange depositsproceeds traced to Bitcoin and KuCoinreturned per NEAR on October 2
Why each step worked
- Failed deposit callback kept the creditthird-party notification call in the custody contract
- Monitoring compared bridge vaults onlymissing controltotal user balances were never checked against holdings
- No solvency invariantmissing controlwithdrawals continued for about 40 hours
- Rapid tracing by exchanges and analystsalerts and an identification post led to the return
Full forensic detail
Step-by-step reconstruction, root cause, counterfactuals, remediation, and disclosure timeline.
Exploit anatomy
Root cause
Per NEAR's post-mortem, the flaw was in the NEAR Intents smart contract, not in the Omni bridge as first reported. When a deposit arrived, the contract credited the user and then called a third-party contract to notify it. An attacker made that notification fail in a way that caused the deposit to be refunded while the credit inside Intents stayed in place. This produced balances that were not backed by tokens, which the attacker then withdrew as real assets through the Omni bridge. Monitoring only compared the bridge's vaults to token supply on NEAR, which still matched, and nobody checked whether the sum of user balances inside Intents matched what the contract actually held. NEAR also reports the same callback feature had a bug-bounty report earlier in the year and a further report after the incident, and removed the feature.
Prevention analysis
An invariant that total user balances equal the contract's holdings, which NEAR added after the incident, would have flagged unbacked credits at the first withdrawal.
A contract that pauses itself when balances diverge would have stopped the withdrawals within minutes, not about 40 hours.
Removing third-party callbacks from the custody contract, as NEAR later did, removes the path that created the ghost balance.
Similar incidents
A forged deposit was credited on one side and withdrawn as real value on another.
Balances with no reserve behind them were honored at the bridge exit.
Remediation
Timeline
Get your protocol scored across 12 dimensions, or request ongoing coverage.