How Do Decentralized Exchanges (DEXs) Serve as On-Chain Price Oracles?

Many DEXs, particularly those using Automated Market Makers (AMMs), inherently track the price of assets based on the ratio of tokens in their liquidity pools. Smart contracts can read this on-chain data directly, using the pool ratio as a real-time price feed.

While convenient, this method is vulnerable to manipulation if the pool has low liquidity or if the price is easily skewed by large trades or flash loans.

What Is the Role of “Oracles” in Connecting DeFi AMMs to Real-World Financial Data?
How Do ‘Oracles’ Contribute to the Functionality and Security of a DEX?
How Do Oracles Provide Necessary Data to an AMM for Accurate Derivatives Pricing?
How Do Oracles Provide Necessary Data for Decentralized Options Pricing?
Besides DEXs, What Other DeFi Protocols Are Vulnerable to Price Feed Manipulation?
What Is the Difference between an Order Book DEX and an AMM-based DEX?
What Is the Concept of “On-Chain Data Resolution” as an Alternative to Oracles?
Why Are Decentralized Exchanges (DEXs) Particularly Vulnerable to Price Manipulation?

Glossar