DomFiDomination Finance

Oracle

How the DomFi oracle computes dominance, publishes it on-chain, and protects trades from bad prices.

DomFi's oracle computes each pair's dominance from live exchange trades and verified supply data, and publishes a signed value on-chain that every trade, trigger and liquidation settles against.

DomFi has no order book. Each pair's price is the oracle price, and every execution starts from it. The price impact spread is applied on top.

Methodology

The oracle uses three inputs:

  • Exchange trades and order books from 15 major exchanges, across about 3,500 spot markets quoted in USD, USDT or USDC.
  • Stablecoin rates from direct USDT/USD and USDC/USD markets, so a price quoted in a stablecoin converts to dollars at that stablecoin's market rate, not at an assumed $1.
  • Circulating supply from the blockchains and issuers themselves where they publish it, cross-checked against independent market-data providers.

Each asset's price is built from its latest trades on every exchange that lists it, combined into a volume-weighted median. No single exchange can dominate an asset's price, and an exchange whose price strays from the rest is left out. Each market cap is that price times a circulating supply cross-checked between independent sources. The pair's value is its asset's market cap divided by the total of the Top-200.

The result is the dominance value defined on Dominance.

Update Cadence

The oracle recomputes every pair continuously, many times a second.

Publishing

When you open or close a position, or remove collateral, the protocol requests a fresh price. The oracle answers with the first price it publishes after your request, and your action settles at that price. A transaction cannot choose its own price, which prevents frontrunning. The round trip takes about a second.

The oracle also publishes every 60 seconds, so the on-chain price stays current between trades.

The contract accepts a price only when it carries a valid signature from a registered signer. DomfiVerifier checks every signature on-chain.

PRICE PATH
TRADER
ON-CHAIN
ORACLE
01ACTIONTRADER
You open or close a position, or remove collateral.

Freshness and Staleness

Every value the oracle signs expires after a short validity window. An expired value is never published.

On-chain, market orders and collateral removals accept only a price published after the request, so they never settle at an older price. Limit orders, stop orders, take-profit, stop-loss and liquidations execute at a recent price published for the pair.

ActionWhen no fresh price arrives
Market open or closeThe order waits for the next published price. If none arrives within the order timeout (about 6 seconds), you can cancel it: a cancelled open returns your collateral, and a cancelled close leaves your position open.
Limit order, TP or SL triggerThe trigger executes only at a recent published price. If the price it was waiting for doesn't arrive, the trigger clears after its timeout (about 6 seconds) and the order stays in place.
LiquidationDecided and executed at a recent published price, the same way as a trigger.
Remove collateralThe request waits for the next published price. If none arrives before the timeout, the request lapses and your collateral stays in the position.

A price is rejected if it is not signed by a registered signer, belongs to another pair, is not the price the order is waiting for, or is older than the value already stored. The oracle also never signs a value outside 0–100% or one that fails the checks below. A rejected price is never used: the order keeps waiting for a valid one, and the timeouts above apply.

Safeguards

Sanity checks

CheckThresholdOn breach
Exchange outliersAn exchange's price falls outside a band around the volume-weighted median, set by the asset's sizeThat exchange is left out of the asset's price
Exchange concentrationOne exchange would carry too much of an asset's weightIts weight is capped
Exchange coverageToo few live exchanges for a pair's own assetNo fresh price; the pair is not published until enough exchanges return
Stale pricesA pair's own asset has no fresh price for more than a few secondsThe pair is not published
Stale index shareToo much of the index rests on stale pricesThe pair is not published
Supply confirmationAn asset's supply sources disagree, or its figure jumps without confirmationThe last agreed figure is held; once it is too old, the pair is not published
Value rangeDominance outside 0–100%The value is not signed or published
SignatureA price not signed by a registered signerRejected on-chain by DomfiVerifier

Circuit breakers

  • Automatic, per pair: a pair stops publishing the moment its value fails any check above, and resumes on its own with the next value that passes.
  • Manual, protocol-wide: DomFi can pause new trades and resume them. Closing positions stays available while new trades are paused.

What Reads the Oracle

ActionReads the oracle?Which price
Market openYesThe first price published after your order
Market close (full or partial)YesThe first price published after your order
Limit and stop order triggerYesA recent published price decides that the target is crossed, and the order fills at that price with price impact applied
Take-profit and stop-loss triggerYesA recent published price decides the trigger, and the position closes at that price with price impact applied
LiquidationYesA recent published price decides that a position is liquidatable
Remove collateralYesThe first price published after your request
Update take-profit or stop-lossNo price requestThe new level applies at once. It can trigger only on the price that was current when you set it, or a later one
FundingNoFunding accrues from open interest over time, not from the price
Vault accounting (open PnL at each epoch boundary)NoThe vault samples its accumulated open PnL, which each trade updates at its own oracle price

Adding collateral does not read the oracle. It executes immediately with no price lookup and no oracle fee. Updating a take-profit or stop-loss also executes immediately, without a price request, and charges the oracle fee.

Supported Pairs

The oracle publishes a price for every pair live in the app. The pair selector always lists them. Integrators can list them in code; see Oracle Feeds › Discovering Pairs.

Operation

DomFi operates the oracle and the infrastructure that publishes prices.

If the oracle stops, no new prices are published. Market orders and collateral removals wait for the next price, and you can cancel a market order after its timeout.