Skip to main content

What Are the Trade-Offs between Using a Median Price versus an Average Price?

A median price is the middle value in a set of data, which is highly resistant to extreme outliers or single malicious data points. It is simpler to calculate and robust against a small number of bad actors.

An average price (like VWAP) incorporates volume and reflects liquidity better but can be slightly more susceptible to a large, coordinated attack. The median prioritizes security against outliers, while the average prioritizes market representation.

What Is the Advantage of Using Ed25519 over Secp256k1?
How Does a TWAP Oracle Differ from a Volume-Weighted Average Price (VWAP) Oracle?
Are All Blockchains Susceptible to This Form of Transaction Reordering?
How Does the Calculation of the Reference Rate Prevent Price Manipulation?