CalixOracle is a Chainlink AggregatorV3Interface-compatible price feed with multi-feeder median aggregation and TWAP support. Any Chainlink-aware protocol works with it out of the box.
minSubmissions are received.maxDeviationPct (default 10%) from the current answer, the breaker trips and submissions are paused until the owner calls resetCircuitBreaker.latestRoundData() and getRoundData(), so it slots into any protocol that reads a Chainlink feed.| Function | Access | Description |
|---|---|---|
submitPrice(int256 price) | feeder | Submit price for the current round |
twap(uint256 window) | public | Return time-weighted average price over window seconds |
latestRoundData() | public | Chainlink-compatible latest answer + metadata |
getRoundData(uint80 id) | public | Historical round data by ID |
resetCircuitBreaker() | owner | Resume submissions after a circuit-breaker trip |
addFeeder(address) | owner | Approve a new price feeder address |
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
AggregatorV3Interface feed = AggregatorV3Interface(oracleAddress);
(, int256 price,,,) = feed.latestRoundData();
// price is scaled by 10 ** feed.decimals()
// Get 1-hour TWAP
ICalixOracle oracle = ICalixOracle(oracleAddress);
int256 twapPrice = oracle.twap(3600);
minSubmissions to at least 3 for production feeds. A single feeder can be compromised or go offline; majority agreement provides meaningful manipulation resistance. Use the circuit breaker threshold as a secondary safety net, not the primary one.resetCircuitBreaker() â a compromised feeder should be removed via removeFeeder first.