Oracle strategies

Pools that follow a signed market price instead of a fixed one. Not available yet. This page explains the status, the oracle payload, and the design in progress.

Warning: > No live strategy uses an oracle. Every strategy template quotes the fixed prices you set. Market data only helps you choose those prices.

Why oracle pools

A fixed-price pool doesn't follow the market: when the price moves, you reprice by hand (rebalance). An oracle pool would quote around a signed market price instead, for example "buy 0.5% below and sell 0.5% above the BCH/USD price", and stay in the market on its own.

The oracle payload

The Mesh server already signs price messages, at GET /api/v1/oracle/payload?pair=BCH_USD:

Bytes Field Encoding
0–3 timestamp uint32, little-endian
4–7 pair id uint32, little-endian (1 = BCH_USD, 4 = pUSD)
8–15 price uint64, little-endian, × 10⁸

Why the old covenant isn't offered

The V1 OracleStrategyCovenant must not hold funds:

The server refuses it.

The design in progress

MeshPoolOracleV3 keeps everything that makes V3 pools safe:

The hard problem is freshness. Bitcoin Cash scripts can enforce "not before" a time, but not "not after", so a timestamp alone can't stop an old price from being reused. The proposed fix: the oracle signs the price together with the pool's current outpoint, so a signature is valid for one pool state only and dies at the next fill. On top of that, the pool would have required price bounds and a per-fill size cap, which limit the damage from a bad or compromised feed.

Planned templates: oracle peg (stablecoin ↔ BCH that follows BCH/USD), oracle spread (market making around the live price), and oracle recycle.

Risks to understand (when it ships)