On July 15, 2024, the decentralized trading platform Ostium was struck by an "invisible knife" targeting price data: the attacker did not touch the on-chain contract logic but bypassed to the off-chain price input infrastructure, fabricating quotes and creating abnormal market conditions. Subsequently, under distorted prices, they opened and closed large positions, siphoning 23,752,746 USDC from the LP funds pool, equivalent to approximately 23.75 million dollars. Even more contrastingly, Ostium officials repeatedly emphasized in subsequent statements that traders' collateral, margin, and positions were unaffected, indicating that all losses were locked within the LP funds pool used to provide liquidity and counterparties for traders—suggesting a deliberate juxtaposition of "user safety" and "fund pool hemorrhage." On July 19, Ostium announced preliminary investigation results, pointing fingers at the vulnerabilities in off-chain price infrastructure and data verification stages, rather than smart contract vulnerabilities. This also raised a more difficult question: under the narrative that everything is written on-chain, who should be held accountable for the 23.75 million dollar black hole concerning the off-chain price data considered as "infrastructure"?
Off-chain Prices Manipulated: LP Pool Turned ATM
The attack on July 15 did not tear a gap from the on-chain contract entrance; instead, it bypassed all "audited" code and reached directly into Ostium's price input source. The attacker targeted the off-chain infrastructure related to price—the system responsible for collecting, organizing, and submitting price reports to the protocol. By invading this stage, they successfully submitted a series of "forged but correctly formatted" price data that could pass the system's verification process while creating prices that severely diverged from the real market for key trading pairs.
Once the price was incorrectly written within the system, the ensuing script became brutally simple. Faced with manipulated prices, the attacker quickly opened large positions on Ostium and then closed them within a price range favorable to themselves, turning every price difference into a channel for withdrawing from the LP funds pool. As the counterparty and source of liquidity for all transactions, the LP funds pool could only settle at the incorrect price, using USDC assets to foot the bill for this "insider manipulation," resulting in cumulative losses of 23,752,746 USDC. Existing public information has not pointed to any smart contract code vulnerabilities; Ostium has also explicitly attributed the problem to the fragility of off-chain price infrastructure and data verification. This represents an attack occurring at the price data input stage, rather than a collapse of contract logic, yet similarly turned the LP funds pool into an unclaimed ATM in a short period.
From Flash Loans to Data Hijacking: A New Variant of Oracle Attacks
In the DeFi world, problems with oracle pricing are not a new story. Around 2023, multiple protocols faced financial losses due to abnormal oracle prices: attackers typically first used flash loans to create distorted prices on-chain, rapidly inflating or depressing the underlying assets in illiquid trading pools, then exploited this manipulated price being read into the protocol by the oracle, triggering erroneous liquidations, loans, or position pricing. The key to these attacks is "the on-chain price panel being distorted," with a clear trajectory documented on the blockchain. Abnormal capital flows, large flash loans, and extreme transaction prices can often be traced back after the event, prompting protocols to down-weight multi-source oracles, elongate time windows, and limit price volatility within single blocks.
In this instance, Ostium moved the battlefield one step forward—the attack did not occur the moment prices were on-chain but rather during the off-chain infrastructure stage between price data aggregation and submission to the chain. The attacker submitted "disguised as valid" price reports by invading the off-chain price infrastructure, bypassing the original verification processes meant to filter out abnormal data, allowing the incorrect prices to appear legitimate on the surface and then opened and closed large positions based on these abnormal prices, achieving arbitrage from the LP funds pool. For external observers, the interactions and contract logic on-chain appeared nearly normal; the real breakpoint was hidden within middleware that the protocol could not directly monitor. Hence, off-chain middleware is evolving into a new attack surface: it not only bears the critical responsibility of aggregating and verifying prices but also lacks transparent security auditing and real-time monitoring. Once compromised, all subsequent on-chain contracts relying on that data will run erroneous logic under seemingly "healthy" assumptions. This concealment forces the entire DeFi ecosystem to reconsider off-chain data as a safety boundary on par with contracts.
Traders Unscathed: Costs Shouldered Solely by LP
From the on-chain execution results, this attack resembles a "price script" being manipulated for a harvesting play. Ostium officials clearly stated that the traders' collateral, margin, and positions were unaffected, indicating a separation of user assets and the funds pool providing counterparties: after the forged prices were sent into the system, the attacker opened and closed positions under abnormal quotes to complete arbitrage, settling against the LP funds pool rather than ordinary users’ wallets or margin accounts. For the vast majority of traders, what they saw at that time were orders that executed normally at system prices; their positions and margins were not forcibly diverted, nor were there any additional deductions.
The real burden fell upon the LP funds pool responsible for market-making and providing positions. The confirmed loss of 23,752,746 USDC all originated from this funds pool, which, by design, serves as the underlying capital to "facilitate trades": regardless of whether positions are opened or closed, they ultimately bet against this pool of funds. When off-chain price input was compromised, this role instantaneously shifted from risk price setter to an innocently paying party, concentrating the losses on the LP side. According to currently available public information, no specific compensation plans or loss-sharing arrangements for the LP have been disclosed. The result of "traders unaffected, while LP alone bears the losses" certainly averts panic at the user level in the short term, yet it centralizes a trust deficit onto the protocol and potential LPs. Whether it can continue attracting sufficient funds to provide counterparties for the system has become one of the most critical uncertain variables following this incident.
Smart Contracts Are Not the End: Exposed Shortcomings of Off-chain Infrastructure
Returning to the Ostium incident itself, an easily overlooked detail is that current public materials have not pointed responsibility toward on-chain smart contract code, nor has there been any indication of auditing oversights. The real problem lies within the off-chain infrastructure related to price input. The attacker was not looking for overflow or permission mismatches in the contract logic; instead, they bypassed the contract and directly tampered with the price reports and data relay nodes, completing the preparation for forging prices off-chain. They then pushed this "certified" abnormal price onto the chain, allowing the contract to execute opening, closing, and settlement processes under seemingly legitimate inputs. In other words, the contract execution was normal, and the error was with the real-world data it trusted.
This also reveals a more widespread shortcoming: many DeFi protocols in security audits and risk control designs have focused their efforts on the contract body, permission structures, and capital flows, while regarding off-chain components as "outsourced infrastructure," failing to incorporate them into equally stringent threat models. However, since 2023, multiple incidents of protocol damage due to abnormal oracle prices and this Ostium incident's colossal LP losses driven by failures in off-chain price verification have charted a clear trajectory— as long as the protocol relies on external price data and oracles as key input stages, the signatures, verifications, and relay mechanisms of off-chain data sources themselves constitute part of the system's attack surface. If this aspect's design or implementation has flaws, even the most rigorous on-chain contract is merely an "executor following erroneous commands." Any DeFi protocol rooted in price inputs must address these off-chain risks as core security concerns on par with contract vulnerabilities.
Four Days of Investigation: The Next Steps for Ostium and DeFi
After the attack on July 15 targeting the off-chain price input infrastructure, Ostium completed a preliminary investigation in the following four days and released an event update on July 19, first acknowledging the LP funds pool loss of 23,752,746 USDC and emphasizing that traders' collateral and positions were unaffected. This explanation clarified the fundamental pattern of losses concentrating on the LP but deliberately left several blanks: no identity of the attacker was made public, nor any clues regarding addresses, and there was no update on whether the funds were recovered, if contact had been made with the attacker, or if legal actions were taken, nor any details about technical remediation plans. Whether the protocol has suspended or restored trading functions has also not been explained in the update, and the LP compensation arrangements remain in a vacuum. The outside world can only ascertain that "the problem lies within off-chain price infrastructure" but cannot determine Ostium's next steps in its protection and operational pace. For the larger DeFi ecosystem, this incident will continue to exert pressure on a focus that has already shown cracks—the security of price data is no longer just a matter of "which oracle to choose" but how to design and audit off-chain data sources, signatures, and relay processes as an integral part of the protocol itself: it will be worth watching who first incorporates off-chain infrastructure into public security commitments, clarifies LP risks and compensation mechanisms, and rebuilds user trust in the entire system with verifiable price pathways.
Join our community, let's discuss, and become stronger together!
AiCoin Exclusive Hyperliquid Benefit: https://app.hyperliquid.xyz/join/AICOIN88
AiCoin Exclusive Aster Benefit: https://www.asterdex.com/zh-CN/referral/9C50e2
On-chain Telegram Community: https://t.me/AiCoinWhaleData
On-chain Community: https://www.aicoin.com/link/chat?cid=N6OVMor5g
AiCoin On-chain Twitter: https://x.com/aicoinwhaledata
免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。




