Blockchain oracles explained: the infrastructure DeFi cannot live without

Blockchain oracles explained: the infrastructure DeFi cannot live without

In October 2022, a trader named Avraham Eisenberg walked into Mango Markets with a plan. He opened two accounts, used one to take massive positions in MNGO perpetual futures, and used the other to pump the MNGO spot price on a thin liquidity pool. The oracle feeding price data to Mango Markets read the manipulated price as real. Eisenberg borrowed $117 million against his inflated collateral. He walked away with the money. The protocol was drained.

That is the oracle problem in a nutshell. A smart contract is only as good as the data it receives. Feed it a wrong number and it will execute perfectly wrong instructions. Oracle manipulation cost DeFi projects over $400 million in 2022 alone. OWASP ranks price oracle manipulation as the number two smart contract vulnerability in 2025.

This article explains what blockchain oracles are, why they matter so much for DeFi security, how the major oracle networks work, and what separates the protocols that get exploited from the ones that do not.

What is a blockchain oracle?

Blockchains are walled gardens. They see on-chain data and nothing else. A smart contract on Ethereum has no clue what ETH is trading for on Coinbase. It cannot check if it rained in Tokyo. It cannot pull the S&P 500 close from yesterday. On its own, a smart contract is blind to the real world.

Oracles fix that. They grab real-world data, repackage it for the blockchain, and hand it to smart contracts. Prices, weather, sports results, interest rates, whatever lives off-chain but needs to drive on-chain logic.

This sounds simple but it is the most important piece of infrastructure in DeFi. When you borrow on Aave, the protocol needs to know the price of your collateral. That price comes from an oracle. When you trade perpetual futures on GMX, the execution price comes from an oracle. When a stablecoin protocol decides whether to liquidate a position, the trigger is an oracle price feed. Chainlink alone secures over $93 billion in total value across DeFi protocols and has enabled over $27 trillion in cumulative transaction value.

If the oracle is wrong, the protocol is wrong. And unlike a bug in application code, a bad oracle feed can drain an entire protocol in a single block.

blockchain oracle

The oracle problem: why this is hard

Here is the core tension. You built a decentralized protocol. No single entity controls it. Then you plug in one API from one exchange for price data. Congratulations, you just made that API the single point of failure for your entire system.

That is the oracle problem. One centralized oracle gets hacked? Your protocol loses everything. One API goes down? Positions cannot be liquidated. One data provider gets bribed? The numbers lie and the smart contract acts on lies.

Decentralized oracle networks exist because of this. Chainlink runs multiple independent nodes that each pull from multiple data sources. They agree on the number before posting it on-chain. Want to manipulate a Chainlink feed? You would have to compromise most of the nodes at the same time. Way harder than spoofing one API.

The catch is cost. Running a decentralized oracle network is expensive. Gas fees for pushing data on-chain add up. Some protocols go cheap, pick a single DEX pool as their price source, and end up on rekt.news three months later.

How oracle attacks actually work

Second most common DeFi attack vector. $403 million lost in 2022. $52 million in 2024. Around $70 million in 2025. The playbook barely changes.

Attacker grabs a flash loan. Millions in crypto, zero collateral, repaid in the same block. Takes that borrowed capital and dumps it into a DEX pool that some protocol is trusting for price data. Price spikes. Oracle reads the spike as real.

Now the attacker goes to the target protocol. Borrows against the inflated collateral. Or triggers liquidations on other people's positions. Or mints tokens against a fake price. However the exploit works, the oracle is the entry point.

Last step: repay the flash loan. Walk away with the difference. One transaction. One block. Done before anyone notices.

The Mango Markets attack was the most famous, but it was not unique. Inverse Finance lost $15.6 million to TWAP oracle manipulation. KiloEx lost $7 million in April 2025. Yellow Protocol lost $2.4 million because it relied on a single DEX pool for price data. A security researcher put it bluntly: any protocol using a single liquidity pool as its price oracle is "99.9% likely to be exploited."

Oracle attack Date Loss What went wrong
Mango Markets October 2022 $117M Single oracle source, thin liquidity pool manipulated
Inverse Finance 2022 $15.6M TWAP oracle on low-liquidity pair, frontrunning
Radiant Capital January 2024 $4.5M Flash loan exploiting rounding in Compound/Aave code
KiloEx April 2025 $7M Flash loan oracle manipulation
Yellow Protocol April 2025 $2.4M Single DEX pool used as price source

Chainlink vs Pyth vs RedStone: the oracle landscape

Three oracle networks matter in 2026. Each takes a different approach.

Chainlink is the incumbent. 63-70% market share by total value secured. Over 1,659 price feeds across 29 blockchains. 2,100 project integrations. It runs push-based oracle networks where nodes proactively update on-chain data on a schedule or when prices move by a set threshold. Chainlink's approach prioritizes security and decentralization. Multiple nodes, multiple data sources, consensus before delivery. The trade-off is speed and cost: pushing data on-chain constantly requires gas.

Chainlink also built CCIP (Cross-Chain Interoperability Protocol), which processed $18 billion in a single month in March 2026. Coinbase uses CCIP as its exclusive bridge for $7 billion in wrapped assets. Lido, Maple Finance, and Stellar adopted it. CCIP turns Chainlink from just a price feed provider into cross-chain infrastructure.

blockchain oracle

Pyth Network came from the Solana ecosystem and does things differently. It is pull-based: data sits off-chain until a user or protocol requests it, then it gets posted on-chain at the moment of use. This is cheaper and faster. Pyth gets its data directly from first-party sources, meaning exchanges and trading firms publish their own prices rather than relying on third-party scrapers. 2,828 price feeds across 113 blockchains. 48% of oracle-powered DEX trading volume globally flows through Pyth. The US Department of Commerce even ran a pilot using Pyth to distribute federal GDP data.

RedStone is the fastest-growing newcomer. Over $10 billion in total value secured. 110+ chains, 140 DeFi projects. RedStone specializes in yield-bearing collateral: liquid staking tokens, liquid restaking tokens, and BTC LSTs. During a $2 billion DeFi liquidation event in February 2024, RedStone pushed 119,000 price updates in 24 hours and delivered ETH/USDC updates 30% faster than Chainlink. It is the only oracle offering both push and pull models across chains.

Oracle TVS Price feeds Chains Model Specialty
Chainlink $93-95B 1,659 60+ Push (scheduled) Institutional adoption, CCIP cross-chain
Pyth $5.5-6.1B 2,828 113 Pull (on-demand) First-party exchange data, DEX volume leader
RedStone $10B+ Hundreds 110+ Push + Pull Yield-bearing collateral, fastest updates
API3 <3% share Limited Multiple First-party (Airnode) No intermediary nodes
Band Protocol Small Limited Multiple Push Cosmos-native, pivoting to AI+data

Types of blockchain oracles

Oracles are not one thing. Different jobs, different designs.

Price feeds are the bread and butter. Every lending protocol, every perpetual exchange, every stablecoin mechanism runs on price data. Aave needs to know what your collateral is worth. GMX needs execution prices. MakerDAO needs to know when to liquidate. Wrong price, wrong outcome. Every time.

Cross-chain oracles do more than deliver numbers. They send messages between blockchains. Chainlink CCIP processes billions in cross-chain transfers. Instead of trusting a small bridge multisig, the oracle network itself verifies every message. $18 billion in a single month through CCIP in March 2026.

Compute oracles crunch numbers off-chain and post results. Verifiable randomness for NFT drops and gaming. Automated contract execution based on time triggers or on-chain events. Data aggregation from dozens of sources into one clean number.

Hardware oracles connect the physical world. Temperature sensors for crop insurance. GPS data for shipping contracts. IoT readings for anything that happens in meatspace.

Human oracles are the manual fallback. Some data cannot be machine-verified: legal rulings, subjective event outcomes. Prediction markets use human consensus to resolve bets.

Any questions?

No. Chainlink has the largest market share (63-70% of total value secured) but competes with Pyth Network (dominant on Solana with 113 chains), RedStone (fastest-growing with $10B+ secured), API3 (first-party oracles), and Band Protocol (Cosmos-focused). The choice depends on which blockchain you build on, how much security you need, and whether you want push-based or pull-based data delivery.

The oracle problem is the tension between decentralized blockchains and centralized data sources. A blockchain achieves security through decentralization. But if a smart contract relies on data from a single centralized source, that source becomes a single point of failure. If the oracle goes down, the contract cannot execute. If the oracle is compromised, the contract executes on false data. Decentralized oracle networks like Chainlink solve this by aggregating data from multiple independent no

Most oracle attacks use flash loans. The attacker borrows millions in a single transaction, uses that capital to manipulate token prices on a DEX pool, and then exploits a protocol that reads the manipulated price as real. The attacker borrows against inflated collateral or triggers unfair liquidations, then repays the flash loan. Everything happens in one block. Protocols that use a single liquidity pool as their price source are the most vulnerable.

If you mean Chainlink, yes. The LINK token has a market cap of about $6.3 billion and trades around $8.65. Pyth Network has PYTH. RedStone has RED. Band Protocol has BAND. API3 has the API3 token. Each oracle network has its own token, usually used for staking, governance, and paying for data delivery. Oracle Corporation (the database company) is unrelated to blockchain oracles.

XRP Ledger uses several oracle options. Band Protocol has integration with XRP. Chainlink has expanded its oracle services to the XRPL ecosystem. For most DeFi applications built on XRP Ledger`s EVM sidechain, Chainlink price feeds are the standard choice. The specific oracle depends on which protocol you are using on the XRP network.

Without oracles, smart contracts cannot access any data from outside the blockchain. No prices. No weather. No sports scores. No real-world events. Every DeFi protocol that does lending, trading, insurance, or stablecoins depends on oracles for the data that triggers contract execution. Chainlink alone secures over $93 billion in DeFi value. If oracles stopped working, DeFi would stop working.

Ready to Get Started?

Create an account and start accepting payments – no contracts or KYC required. Or, contact us to design a custom package for your business.

Make first step

Always know what you pay

Integrated per-transaction pricing with no hidden fees

Start your integration

Set up Plisio swiftly in just 10 minutes.