Concepts › Price oracle
BTC/USD — BtcwPriceFeed
Contract 0x6E0687A5D5a5b98CC5fb05c4d8d742fBD75ba96c, Chainlink AggregatorV3Interface-compatible, 8 decimals.
- The feeder takes the median of 6 sources: Chainlink BSC, Chainlink ETH, Binance, Coinbase, Kraken, OKX.
- At least 3 sources must be live. It writes on-chain when the price deviates by at least 0.05% from the on-chain price, or at most every 30 seconds even if the price is unchanged.
- Price-jump guard: no single update may move the price more than 10% from the previous one (
PriceJumpTooLarge) — even a compromised feeder key cannot move the price far in one write. - Only the
updateraddress can write (NotUpdater); the Owner hasownerSubmitfor manual writes and can change the updater and the jump limit.
BtcwPriceFeed provides the BTC/USD price. BTCw price = this price × OracleAMM's peg ratio ratioWad (currently 1).
200 price-tracker tokens — PriceHub
Contract 0xE87FDdCC0b668564a20B23F3bE1EE108C805ecb4, 18 decimals. Each token's price is the median across multiple sources (at least 3, discarding any source more than 2% from the median) — if one source goes down, others remain. Each class has its own source set:
- Crypto (100): multiple major crypto exchanges.
- US stocks (100): 5 public quote sources — Robinhood, Yahoo Finance, CNBC, TradingView, Nasdaq. These are unofficial public APIs
of those sites and may change or be blocked. The price is the regular-session price ×
splitFactor; outside market hours and on weekends it is the latest close.
The feeder only prices tokens on each class's list — unknown tokens in the factory are skipped, never guessed from their symbol. It writes when the price deviates by at least 0.1%, or at most every 120 seconds. There is also a per-write jump guard; a blocked write emits a Rejected event instead of reverting the whole batch.
function latestRoundData(address asset) view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)
function prices(address[] assets) view returns (int256[] answers, uint256[] updatedAts)
Full signatures: Contract reference.
Staleness and when to stop
OracleAMM and OracleRebalancer stop trading when the price is older than 300 seconds. Your application should do the same:
- REST: check
staleandage_secondsin/api/price; for tokens,priceAgeSin/api/v2/pools. - On-chain: compare
updatedAtwith the block timestamp; do not use a price that is too old.
If the feeder stops (server failure, all sources failing at once), the price freezes — nothing on-chain updates it automatically.
Oracle risks
- The 10%-per-write jump guard limits speed, not direction: several consecutive writes can still move the price far.
- The Owner can change the updater and the jump limit, with no delay.