The currency circle is now wrong about the oracle Obviously nothing was predicted
"Oracles: How to Control the $130 Billion Lifeline of DeFi?" As of July 2025, the total value locked (TVL) in the entire DeFi ecosystem is approximately $137 billion. This capital does not operate in a vacuum; it relies on an extremely important yet often overlooked infrastructure: Oracles. Among them, Chainlink is currently the most widely used decentralized oracle network. According to data from DefiLlama, the total value secured (TVS) of on-chain assets supported by this single oracle provider has already exceeded $51 billion. In other words, nearly half of all DeFi assets depend on Chainlink for price feeds to function properly. This also means that: If Chainlink experiences a major failure or is attacked, the $51 billion in on-chain assets could enter a "blind operation" state—resulting in price distortions, liquidation errors, and mismatched loans, with dire consequences. This is what oracles are: the invisible lifeline of DeFi. They do not predict the future or interpret trends—they only do one thing: convey off-chain reality to on-chain. This article will break down this indispensable on-chain infrastructure: how does it work? How important is it to DeFi protocols? And how does it determine the fate of your assets? "Oracles are not fortune tellers; they are the pricing broadcast stations on-chain." Suppose Alice and Bob are betting on the Polymarket prediction market regarding the Federal Reserve's interest rate decision in July 2025. Alice bets $100 that it will remain unchanged, while Bob bets $150 that it will drop by 25 basis points. The process of realizing this bet is very simple: first, we need to know the actual result in reality; let's assume the result is that the interest rate remains unchanged. Then we need to convey this result to the on-chain smart contract through "some mechanism," which will execute the corresponding logic based on the informed result, allowing Alice to profit. The following image describes the corresponding market on Polymarket: We can see that the outcome of the bet will be based on the result published on the Federal Reserve's official website, and once the result is confirmed, it will be promptly "resolved on-chain"; the term "Resolve" in the description refers to what we call "some mechanism." This mechanism refers to the oracle. From the above example, we can deconstruct the operation of oracles into several parts: > Data Collection: The first step in the operation of an oracle is to collect data from the off-chain world. This data can be traditional financial market data, weather data, sports results, etc. > Data Aggregation: Just like in scientific research, the data obtained is generally not used directly but requires a lot of cleaning and processing. Oracles work similarly; we do not use a single information source directly. For example, in DeFi, we often need asset prices from centralized exchanges (CEX) as a reference, but oracles typically aggregate prices from multiple mainstream CEXs, monitor and eliminate abnormal data, and only when multiple trusted parties selected by the oracle agree that the price is reliable can it be used subsequently. > Data On-Chain: The aggregated data is written to the blockchain in the form of transactions for contracts to read. > Data Usage: After the data is on-chain, any contract can call the oracle's interface to obtain the desired data information. "DeFi protocols are blind to prices; oracles are their eyes." After understanding the mechanism of oracles, we need to know what role they play in the DeFi world. Don't forget that on-chain contracts are entirely "local network creatures"—they cannot see price fluctuations and are unaware of real-world events. Even if ETH drops from $3000 to $1, they remain oblivious. This means that whether you are borrowing, trading, minting stablecoins, or purchasing derivatives, as long as your actions depend on "external prices" or "external data," oracles are either in the foreground or background, guiding the decision-making basis of the contracts. Therefore, in this section, we will share how oracles control every move you make in DeFi protocols. Scenario 1: Various Uses in Lending In lending protocols, oracles serve as both the assessment system for lenders and the trigger for liquidation machines. They can determine many things. For example: > How much you can borrow: In a lending protocol, you cannot simply "borrow as much as you want." The protocol must know the "fair value" of your collateral, which is obtained from the oracle. Whether you are collateralizing wETH or wBTC, the oracle will provide the latest market price, and the protocol will calculate how much you can borrow based on the set collateral ratio (LTV). > Are you over-leveraged?: Just because you have borrowed does not mean you are in the clear, as the on-chain protocol will continuously update your current liabilities based on the oracle's prices to determine if you are over-leveraged. If the collateral ratio drops, it is up to the oracle to judge whether you are over-leveraged. > Will you be forced to repay?: What truly causes you to "liquidate" is not the market price itself, but the moment the oracle updates. When it feeds the latest price on-chain, and the protocol system finds that you have fallen below the liquidation threshold, the protocol will execute liquidation. Scenario 2: Minting and Collateral Assessment of Stablecoins The core mechanism of stablecoin protocols is "collateral → minting → redemption." In this closed loop, the system must continuously know the current market price of the collateral asset (such as ETH) to determine whether the user qualifies for minting and whether redemption conditions are triggered. This critical price information comes from interactions with oracles. Taking Ethena's USDe as an example, in the design of this Delta-Neutral stablecoin, the oracle will calculate based on the price of the collateral asset (like ETH): > The amount of USDe the user can mint > The settlement during redemption > Managing the data of the Delta-Neutral position to ensure stable anchoring Scenario 3: Profit Settlement of On-Chain Perpetual Contracts Perpetual contracts are a type of contract product without an expiration date, and their prices need to continuously align with spot prices. Currently, the pricing power of the vast majority of assets is held by CEXs, so when designing on-chain perpetual contract exchanges, it is necessary to rely on oracles to obtain reliable spot prices. The prices obtained may be used for the following purposes: > Determining opening/closing prices > Calculating funding rates > Calculating PnL > Liquidation of positions It is important to note that different on-chain perpetual contract exchanges have diverse choices and usage methods for oracles. Next, we will take the currently popular "HyperLiquid" as an example. The following image shows its UI display interface, where we can see that the BTC-USD perpetual contract has two prices: "Mark Price" and "Oracle Price." In the official documentation, it is explained: In simple terms, the "Oracle Price" is the weighted average of the spot prices from all mainstream exchanges (including HyperLiquid's spot price). This price is only used for calculating funding rates. The "Mark Price" is a reprocessed version of the "Oracle Price." It is the average of the "Oracle Price," "trading price on HyperLiquid," and prices from various CEXs. This price is more robust than a single "Oracle Price," so it is used for margin calculations, liquidations, PnL settlements, and handling TP/SL triggers. "Oracles could cost you your life." In DeFi, oracles are the "eyes" of the protocol, and core operations such as lending, liquidation, and pricing rely on their price inputs. Especially in lending scenarios, even a slight deviation from the oracle can trigger a chain reaction: soaring interest rates, position liquidations, and asset wipeouts. Nowadays, more and more users enjoy using lending protocols for stablecoin mining, even cycling leverage to boost incentives and returns. But here comes the problem: many people use "two assets with almost identical prices" to collateralize and borrow from each other, such as using USDe to collateralize for USDC or using wstETH to collateralize for wETH. Everyone thinks that these assets are essentially "stable pairs" and cannot go wrong—after all, isn't it just a different packaging? In reality, you may encounter two situations: Situation 1: "Stablecoins are not stable at all." The stablecoin you use as collateral may become unpegged due to various factors such as liquidity, redemption mechanisms, or protocol hacks. When the oracle receives an "unpegging" signal from off-chain, it will inform the protocol: "The value of the user's collateral is continuously decreasing." As the degree of unpegging expands, the user's borrowing position will be liquidated due to the rising LTV caused by the depreciation of the collateral. Situation 2: "Stablecoins are too stable." Some protocols may default that certain stablecoins will never unpeg for reasons such as improving efficiency or reducing costs, seemingly safeguarding users. However, for users, this still poses significant risks. The stablecoin issuer Usual has provided a lesson for everyone. In the lending protocol Morpho, there is a setting that states: "Regardless of what happens outside the protocol, the USD0++ issued by Usual as collateral will always be treated as having a 1:1 value ratio with the borrowed asset USDC." This creates an illusion for users: even if USD0++ drops to 0 outside the Morpho protocol, their borrowing position will not be liquidated due to the depreciation of the collateral. In reality, once unpegged, and the protocol still maintains a 1:1 pegged relationship as if nothing happened, it will lead to: > Borrowers withdrawing large amounts of liquidity; > Rapidly rising liquidity utilization rates, causing interest rates to soar; > Accumulating large amounts of unpaid interest, continuously increasing LTV levels; > Not repaying loans will face the risk of liquidation. In addition to the risks in mechanism design and usage, oracles are also frequent victims of hacking. For example, in early 2025, the decentralized exchange KiloEx suffered a hack where the oracle's permissions were compromised, leading to arbitrary manipulation of token prices and ultimately resulting in a loss of $7.5 million. "Conclusion" Oracles are not the protagonists of DeFi, but they are the key players that determine the story's outcome. Understanding their mechanisms and limitations is essential to prepare for potential liquidations in advance. Disclaimer: The content of this article is for knowledge dissemination and educational purposes only and does not constitute any investment or financial advice; DeFi protocols carry high market and technical risks, and the prices and yields of digital assets can be highly volatile. Participating in digital asset investment and DeFi protocols may result in the loss of the entire investment amount; readers should understand and comply with local laws and regulations before participating in any DeFi protocols, conduct risk assessments and due diligence, and make cautious decisions.
Show original
The content on this page is provided by third parties. Unless otherwise stated, OKX is not the author of the cited article(s) and does not claim any copyright in the materials. The content is provided for informational purposes only and does not represent the views of OKX. It is not intended to be an endorsement of any kind and should not be considered investment advice or a solicitation to buy or sell digital assets. To the extent generative AI is utilized to provide summaries or other information, such AI generated content may be inaccurate or inconsistent. Please read the linked article for more details and information. OKX is not responsible for content hosted on third party sites. Digital asset holdings, including stablecoins and NFTs, involve a high degree of risk and can fluctuate greatly. You should carefully consider whether trading or holding digital assets is suitable for you in light of your financial condition.