Signed forex and gold price feeds flowing into smart contracts on Optimism

Blog ·

Forex and Gold Price Oracle on Optimism: Signed Feeds for Smart Contracts

Stablecoins, tokenized gold and on-chain FX products all need one thing: a trustworthy reference price inside the smart contract. Our price oracle on Optimism delivers signed prices for the most used forex pairs and precious metals, ready to verify on-chain.

Feeds available

EUR/USD, GBP/USD, USD/JPY, USD/CHF, AUD/USD, USD/CAD, EUR/GBP and USD/SGD for forex, plus XAU/USD (gold) and XAG/USD (silver). Every feed has a permanent ID, keccak256(symbol), and prices use 8 decimals. The current list is always at our oracle page.

How it works: a pull oracle

  1. Your backend requests a fresh EIP-712 signed report from our API.
  2. Your transaction submits it to the verifier contract, which checks the signature, the expiry and the circuit breaker.
  3. In the same transaction your contract reads the price with a freshness requirement.

Because the report is fetched right before use, your contract always works with the current price, and you pay gas only for your own updates. Full details are in the oracle documentation.

Built for real-world assets

  • Market status in every report: OPEN, CLOSED (official last price at weekends) or HALTED, so tokenized assets can apply forward pricing instead of trading on stale prices.
  • Short validity: reports expire after about a minute; nobody can hoard a favourable price.
  • Circuit breakers: an abnormal jump pauses a feed until it is reviewed.
  • Several sources: prices can be the median of independent brokers, with outliers removed.

Why Optimism

Low fees make frequent, verifiable price updates affordable: a batch of several feeds typically costs a fraction of a cent. A testnet deployment on Optimism Sepolia lets you integrate and test for free before going live.

Getting started

Create an account, generate an API key with the read:oracle scope, and follow the Solidity and JavaScript examples in the documentation. Questions about your use case? Contact us.

Try the market price API

1000 free credits after sign-up.

Get a free API key

More articles