Skip to main content

Signed quotes

Problem​

Option pricing with jump diffusion and GARCH (Pricing methodology) is too heavy to run in a contract, and needs market data the chain does not have. Yet the contract must not accept an arbitrary price from the buyer.

Approach​

The quote service prices off chain and signs the terms with an ed25519 pricing key. The contract verifies the signature over a digest that binds:

tag, pool contract, hedger, pool_id, notional, tenor_days, structure, strike_above, spot, strike, cap, fair_rate, quote_timestamp, quote_nonce

It also requires the quote to be at most 120 seconds old and its nonce unused. The pool's markup and fees are applied on chain to fair_rate, and the buyer's max_cost and deadline bound what they pay and when.

Why​

  • The contract enforces that the price came from the engine, for this buyer, for these terms, recently.
  • Markups and fees cannot be altered by the quote service: they are read from the pool.
  • Replay is impossible: each nonce works once.

Trade-offs​

  • Key management. The pricing key is held by the pricing service and can be rotated by the contract owner at any time; buyers are protected by max_cost.
  • Liveness. If the quote service is down, no protection can be sold.