Medianizer Mechanisms
A medianizer is a specialized smart contract component used in decentralized finance protocols to determine a single, reliable price feed from multiple independent data sources called oracles. Instead of simply averaging the inputs, which can be skewed by a single malicious or malfunctioning node, the medianizer selects the median value from the set of reported prices.
This approach significantly enhances security because it effectively ignores extreme outliers, protecting the protocol from flash loan attacks or data manipulation attempts that might try to force an artificial price. By requiring a consensus among multiple providers, the mechanism ensures that the final price used for liquidations, margin calculations, and collateral valuation remains robust.
It serves as a critical defense layer in maintaining the peg of stablecoins and the solvency of lending platforms. This mechanism operates continuously, updating the system state whenever new data points are validated by the protocol.
Its reliability is foundational to the integrity of decentralized derivative markets.