🧵 DeFi lending is built on oracles. Get them wrong and you'll get hacks, bad debt, or drained pools. 💀 Here’s how most DeFi oracles fail and how Gearbox built a system that fixes the problem. ⚙️
✌️Two ways to price anything in DeFi: 🧩 Fundamental price: based on how much an asset's backing is worth. Vaults', LRTs shares are usually minted at that price 💹 Market price: based on what people actually pay on exchanges. Both sound fine… until you use them for lending.
1️⃣ Fundamental Oracles: They tell you what something should be worth, like the NAV of a vault. ✅ Stable and predictable ✅ Borrowers are willing to pay more and take higher leverage ❌ Can be way off when redemptions are delayed or funds get stuck
⚠️ Risk scenario: A vault share trades for $0.50 on the market, but its fundamental oracle says $1. If a lending protocol uses that oracle, someone can: 📉 Buy cheap ($0.50) 📈 Borrow against the “$1” value 🤓 Take liquid assets and leave LPs as exit liquidity
2️⃣ Market Oracles: They track realized DEX or CEX prices. ✅ Fast and reactive: market sets the price, not an algorithm full of assumptions ❌ Easy to manipulate in low liquidity ❌ Can cause liquidation cascades
Each pricing method has trade-offs. Most protocols pick one and pray it works. Gearbox made them cooperate instead. ⚙️
🏆The Dual-Oracle System Every collateral has: 🧩 Main Feed → used for liquidations 🛡️ Reserve Feed → backup check for safety Safe Price = min(Main, Reserve) This simple rule changes everything.
⚖️ Borrow like it’s bull season, lend like it’s bear season. 🟢 Main = Fundamental 🟡 Reserve = Market → Stable collateral pricing. Loopers can go degen → No “buy cheap, borrow expensive” exploits
💰 Yield feels safest… right up until it doesn’t. 🟢 Main = Market 🟡 Reserve = Fundamental → Fast reaction to real market drops. LPs get maximum safety → Fake pumps don’t fool the fundamental feed …but it has one hidden danger 👇
When the market tanks fast, mass liquidations can overshoot, selling assets far below their true value. That’s how bad debt forms. Gearbox has a fix: Aliased Loss Policy 🧯
If liquidation at market price would cause bad debt, the protocol checks again using the fundamental price. If the position would be healthy under that valuation → 🚫 liquidation doesn’t go through Basically, a safety net when markets go nuts.
Permissionless risk curation leveled up 🧠 In the past months 7 curators have launched on @GearboxProtocol : @cp0xdotcom @tulipacapital @invariantgroup @kpk_io @Re7Labs @hyperithm @ultrayieldapp Across 5 chains: @ethereum @plasma @etherlink @hemi_xyz @LiskHQ 🌍
