NEAR Intents said a smart-contract deposit bug enabled an attacker to create internal balances not backed by real tokens and withdraw about $3.8 million. The project later recovered the funds within 36 hours, but the exploit exposed a serious accounting flaw.
The core issue was a mismatch between what the contract recorded and what it actually held. In cross-chain systems, that kind of drift can be especially dangerous because deposits, failed calls, and settlement logic often span multiple contracts and chains.
The main defense is simple in principle: internal balances must always reconcile with custody balances. Systems should fail closed whenever the records and held assets disagree, and monitoring should compare both user balances and contract-held tokens.
This case is a reminder that cross-chain infrastructure needs more than uptime monitoring. It needs invariant checks, automatic pausing, and careful testing of failure paths, especially when third-party calls are involved in deposit flows.