Skip to main content

What Is the “Oracle Problem” in DeFi and How Does It Relate to Price Feeds?

A TWAP is used to calculate the average price of an asset over a specific time interval, where each price point is weighted by the amount of time it was active. DeFi Oracles use TWAPs to provide a price feed that is resistant to flash loan attacks and momentary price spikes.

By smoothing out volatility, the TWAP ensures that smart contract executions, like liquidations or settlements, are based on a fairer, more representative market price.

How Does a Time-Weighted Average Price (TWAP) Help Defend against Price Feed Attacks?
How Does a Time-Weighted Average Price (TWAP) Oracle Mitigate Flash Loan Attacks?
What Is the Role of Time-Weighted Average Price (TWAP) in DeFi Oracles?
What Is the Difference between a Push and a Pull Oracle System?