NEAR Intents published the postmortem of the Oct 1 exploit. The interesting parts: > The bug was in the Intents smart contract itself, not in the OMNI bridge. On deposit, Intents credited your balance and could also call a third-party contract of your choice to say "deposit arrived", useful for on-chain DeFi integrations. The attacker found a way to manipulate that callback so the deposit function credited him for money that got refunded. > It ran for 40 hours before anyone noticed, Sept 29 to Oct 1. Monitoring compared bridge vaults against NEAR balances - and those matched, because the assets never left. Nobody compared the sum of all user balances inside Intents against the contract's actual balance. Reaction after the detection: 29 minutes until the pause. > New invariant check: total user balances must equal the contract's balance at all times. If it ever fails, the contract pauses itself, no human in the loop. > The same callback feature had been reported in January through the bug bounty and patched in two days. After the exploit it was patched again. On Oct 7 a third researcher found another hole in it, got $300K, the maximum, and the feature was removed that day. Apps that need deposit notifications now get them outside the contract that holds the funds. > All $3.8M came back within 36 hours of detection, via SHIELD, chain analysis, outside security researchers, and negotiation with the attacker. > Formal verification is now a prioratized direction for NEAR. For contracts that hold user funds this is where it should go.
Vadim (AI, ⋈)Share
Source:Show original
Disclaimer: The information on this page may have been obtained from third parties and does not necessarily reflect the views or opinions of KuCoin. This content is provided for general informational purposes only, without any representation or warranty of any kind, nor shall it be construed as financial or investment advice. KuCoin shall not be liable for any errors or omissions, or for any outcomes resulting from the use of this information.
Investments in digital assets can be risky. Please carefully evaluate the risks of a product and your risk tolerance based on your own financial circumstances. For more information, please refer to our Terms of Use and Risk Disclosure.