Oracles: The Backbone Securing $137 Billion in DeFi

JonasJonas
/Jul 25, 2025
Oracles: The Backbone Securing $137 Billion in DeFi

Key Takeaways

• Nearly half of DeFi’s capital relies on Chainlink oracles.

• Oracles feed real-world data to smart contracts — powering lending, trading, and stablecoins.

• A faulty oracle can trigger liquidations, protocol failures, or exploits.

• Misconfigured oracles (like fixed stablecoin prices) hide serious risks.

• Oracles are critical, yet often overlooked — knowing how they work is essential.

As of July 2025, the total value locked (TVL) across the DeFi ecosystem stands at approximately $137 billion. But this capital doesn’t move on its own — behind it lies a critical, often overlooked piece of infrastructure: Oracle.

Among all oracle providers, Chainlink remains the most widely adopted decentralized oracle network. According to data from DeFiLlama, Chainlink alone currently secures over $51 billion in on-chain value — known as TVS (Total Value Secured).  

In other words, nearly half of DeFi’s capital depends on Chainlink price feeds to function properly which means:

If Chainlink were to fail or suffer a critical exploit, as much as $51billion worth of assets could be thrown into “blind mode” — where pricing becomes unreliable,liquidations fail to trigger properly, and disrupt lending market stability. — the consequences would be catastrophic.

This is the role of oracles — the invisible lifeline of DeFi.

They don’t predict the future. They don’t analyze the markets. They do one thing — and do it critically well: they bring real-world data on-chain.  

In this article, we’ll unpack how this indispensable piece of infrastructure works, why it matters so much to DeFi protocols, and how it ultimately affects the fate of your on-chain assets.

Oracles Don’t Predict the Future — They Broadcast Prices On-Chain

Let’s say Alice and Bob are betting on the Federal Reserve’s July 2025 interest rate decision via the on-chain prediction market Polymarket.  

  • Alice bets $100 that rates will stay the same.  
  • Bob bets $150 that they’ll drop by 25 basis points.

How does this bet actually work?  

First, we need to know what actually happened in the real world. Then we suppose the Fed keeps rates unchanged — that’s the outcome. Now, here’s the key part: We need a mechanism to deliver that real-world outcome to the blockchain. Once the smart contract on Polymarket receives that data, it can then automatically execute the logic — in this case, paying out Alice as the winner.  

Below is the market description from Polymarket:

The market description from PolymarketThe market description from Polymarket

We can see that the outcome of the bet is determined by the official announcement from the Federal Reserve website. Once the result is known, it is resolved on-chain — and this “resolve” mechanism is exactly what we mean by an oracle.  

Through this example, we can break down how oracles work into a few key components:  

  • Data Collection: The first step in any oracle process is gathering data from the off-chain world. This could include financial market data, weather conditions, sports scores — essentially anything not natively available on-chain.
  • Data Aggregation: Just like in scientific research, raw data isn’t used straight out of the source — it needs to be processed and cleaned. Oracles operate in a similar fashion: they rarely rely on a single data feed. For example, DeFi protocols often need asset prices from centralized exchanges (CEXs). An oracle will typically aggregate prices from multiple major CEXs, filter out outliers, and run internal consistency checks. Only when a group of trusted nodes (called validators or reporters) agree on a reliable price will that data move forward in the pipeline.
  • Data Posting: After aggregation, the final data is written to the blockchain in the form of a transaction. This makes the data verifiable, tamper-resistant, and accessible to any smart contract.
  • Data Consumption: Once published, this data can be queried by smart contracts via oracle interfaces. DeFi protocols use this data to execute logic — such as triggering a liquidation, pricing a trade, or resolving a prediction market.

DeFi Protocols Are Blind — Oracles Are Their Eyes

Now that we’ve explored how oracles work, it’s even more important to understand what role they actually play in the world of DeFi. Remember: smart contracts are, by design, completely isolated from the outside world — they’re like local machines on a closed network. They can’t see price charts. They don’t know what’s happening in real life. Even if ETH crashes from $3,000 to $1, they remain completely unaware.  

This means that whether you’re borrowing, trading, minting a stablecoin, or buying a derivative, if your action depends on a price or any off-chain data, an oracle is involved — either visibly or silently — determining the inputs that smart contracts rely on.  

In this section, we’ll explore how oracles influence nearly every decision you make when interacting with DeFi protocols.

Case 1: Lending — The Brain Behind Borrowing and Liquidation

In lending protocols, oracles act as both the underwriter and the liquidation trigger. They make critical decisions like:  

  • How much you’re allowed to borrow.

    You don’t just get to borrow however much you want. The protocol needs to assess the fair market value of your collateral — that price comes from the oracle. Whether you deposit wETH, wBTC, or something else, the protocol uses real-time prices from the oracle to calculate your maximum borrow limit based on a predefined loan-to-value (LTV) ratio.

  • Whether you’ve borrowed too much.

    Even after you borrow, your position is constantly monitored. As oracle feeds update asset prices, the protocol re-evaluates your collateral ratio in real time. If your LTV deteriorates, it’s the oracle data that decides whether you’re still safe — or skating on thin ice.

  • When you get liquidated.

    It’s not the market price that liquidates you — it’s the oracle update. When the oracle pushes a new price on-chain, and that triggers a breach of the liquidation threshold, the protocol enforces liquidation. No warnings, no delays.

Case 2: Stablecoin Collateral and Minting Logic

Stablecoin protocols rely heavily on accurate pricing to manage their core mechanism:

collateral → minting → redemption. To determine whether a user is eligible to mint new stablecoins — or is at risk of liquidation — the system must constantly track the real-time value of collateral assets like $ETH. That information comes directly from the oracle.  

Take Ethena’s USDe as an example: In this delta-neutral stablecoin design, the oracle plays multiple roles by:  

  • Calculating how much USDe can be minted based on the current price of ETH.
  • Determining redemption values during withdrawals.
  • Feeding data to delta-neutral hedging strategies to keep the stablecoin properly anchored.

Case 3: On-Chain Perpetuals and PnL Settlement  

Perpetual contracts are derivatives with no expiration date, and their prices need to closely track the spot market. Since most price discovery still happens on centralized exchanges (CEXs), on-chain perp DEXs rely heavily on oracles to fetch reliable spot prices. These oracle-fed prices are then used for multiple critical functions, including:  

  • Determining entry and exit prices
  • Calculating funding rates
  • Computing PnL (profit and loss)
  • Triggering liquidations

It’s worth noting that each perp protocol handles oracles differently — the source, update frequency, fallback mechanisms, and how prices are integrated can vary widely.  

Take HyperLiquid, one of the most popular perp DEXs today, as an example. In the UI for the BTC-USD pair, you’ll notice two prices: “Mark Price” and “Oracle Price”.

According to HyperLiquid’s official docs, here’s how the two prices are defined:   

  • Oracle Price

This is a weighted average of spot prices across major centralized exchanges (CEXs), including HyperLiquid’s own spot market. It’s used exclusively for funding rate calculations.  

  • Mark Price:

This goes a step further. It’s a composite of the oracle price, the HyperLiquid perp trading price, and external CEX prices. Because it reflects a broader pricing context, it’s considered more resilient — and is used for margin requirements, liquidations, PnL settlements, and triggering TP/SL orders.  

When the Oracle Turns Against You

In DeFi, oracles are the eyes of the protocol. They determine what you can borrow, when you get liquidated, and how much your collateral is worth. And when they go wrong — especially in lending protocols — things can unravel fast: soaring interest rates, margin calls, and wiped-out positions.  

These days, more and more DeFi users are turning to lending protocols to farm stablecoin yields — sometimes even looping leverage to maximize incentives. But here’s where things get tricky. Many of them use assets that trade at nearly the same value as both collateral and debt — like borrowing USDC using USDe, or borrowing wETH against wstETH. On the surface, these assets look like stable pairs — different forms of the same asset, trading at nearly the same price. It feels like there’s minimal risk involved. But in fact, this assumption can be fragile. Here are two ways it can fall apart:  

Scenario 1: Stablecoins aren’t so stable

The stablecoin you use as collateral might depeg due to poor liquidity, flawed redemption mechanisms, or even a protocol hack. When an oracle detects this depeg from off-chain sources, it feeds the updated price to the lending protocol — signaling that your collateral is declining in worth. As the depeg worsens, your loan-to-value (LTV) ratio rises, and eventually, your position gets liquidated.

Scenario 2: Too stable to fail

Some protocols, in an effort to reduce costs or simplify operations, treat certain stablecoins as if they could never depeg — a design that appears user-friendly on the surface but can hide serious risks underneath. The stablecoin issuer Usual provided a real lesson here.

In the lending protocol Morpho, there was a configuration where Usual’s stablecoin, USD0++, was treated as having a constant 1:1 value with USDC, regardless of what happened outside the protocol. This gave users the false impression that even if USD0++ dropped to zero elsewhere, their loan positions wouldn’t be affected — because the protocol simply refused to acknowledge the loss in collateral value.

But in reality, when the depeg occurs and the system pretends nothing happened, several risks emerge:

  • Liquidity providers rush to exit the pool
  • Utilization rate spikes, causing interest rates to skyrocket
  • Unpaid interest rapidly accumulates, driving up users’ LTV
  • Failure to repay can ultimately lead to liquidation

And beyond flawed design choices, oracles themselves are frequent targets of attackers. For example, in early 2025, decentralized exchange KiloEx suffered a $7.5 million loss after an attacker gained control over its oracle permissions and manipulate token prices.

End

Oracles aren’t the main characters in DeFi — but they often decide how the story ends.

Understanding their mechanics and limitations is key to staying ahead of liquidations.  

Disclaimer: This content is for educational purposes only and does not constitute financial advice. DeFi protocols carry significant market and technical risks. Token prices and yields are highly volatile, and participating in DeFi may result in the loss of all invested capital. Always do your own research, understand the legal requirements in your jurisdiction, and evaluate risks carefully before getting involved.

Secure Your Crypto Journey with OneKey

View details for OneKey ProOneKey Pro

OneKey Pro

Touch. Scan. Own It.

View details for OneKey Classic 1SOneKey Classic 1S

OneKey Classic 1S

Pocket-Light, Bank-Tight.

View details for OneKey SifuOneKey Sifu

OneKey Sifu

Crypto Clarity—One Call Away.

Keep Reading