Oracle

Every uplong price comes from its own oracle. It decides your entry, your exit, and when a position is liquidated.

Live oracleConnecting…
BTC
–
ETH
–

Waiting for the first price

How a price is made

  1. Streams, not polling. The oracle keeps live connections to several independent spot markets and receives every change to their best bid and ask as it happens.
  2. One mid per source. Each source’s price is the midpoint between its best bid and best ask.
  3. The average. The oracle price is the average of the sources’ mids, recomputed on every update from any of them, so a move on even one source moves the price. A source more than 0.05% away from the others is left out, so one wrong, slow, or briefly pushed book can’t move it.
  4. USDT markets. The oracle follows each market’s BTC/USDT and ETH/USDT books, the most liquid and most watched BTC and ETH prices, so the uplong price matches what traders see on the big exchanges. Balances and payouts are in USDC, so when USDT trades away from USDC, uplong prices move with it.

When the oracle trusts a price

  • A market has a price only while at least three sources are live, each having reported within the last 3 seconds.
  • A source that disconnects drops out until it’s back, and the average uses the rest.
  • If too few sources are live, the price is stale: blocks stop recording a price and new transactions wait until it’s fresh again, so nothing fills at an old price. The trade page says so while it lasts.

Live price and block price

Live priceBlock price
UpdatesWhenever it changes, and at least once a secondEvery block, every half second
Used forThe chart and the price you seeFills, PnL at close, liquidations
WhereThe prices WebSocket channelA price update transaction at the start of every block

Your trade fills at the block price of the block that includes it, so the chart can be up to half a second ahead of your fill. Liquidations are checked against each new block price before anything else in the block.

Checking it yourself

  • Every block starts with a Price update transaction holding that block’s BTC and ETH prices. Open any block in the explorer to see it.
  • GET /prices/history returns the recorded block prices over a time window; the trade chart is drawn from it. See the API.
  • Because prices are part of the chain, replaying the blocks gives the same fills and liquidations.

Limits

Leaving out sources that stray protects against one bad source, not against all of them moving together. If the wider market moves sharply, the oracle follows it, and a position can be liquidated in a single block. Which markets feed the oracle isn’t published, which makes targeting it harder. See Risks.

Wallet

Deposit USDC

Withdraw