githubEdit

Pull Model

The Pull-Based Oracle is ideal for latency-sensitive use cases where developers want control over when and how data is retrieved and fed into smart contracts.

How It Works

In this model, developers:

  1. Fetch data from Block Scholes off-chain via WebSocketarrow-up-right or RESTarrow-up-right APIs.

  2. Relay this data into any smart contract of choice.

  3. Verify its authenticity using EIP-712 signatures.

Verification via EIP-712

To ensure that the data originates from Block Scholes and is not tampered with, every data payload is signed using EIP-712. Developers must implement signature verification logic in their contracts to check the integrity of this data.

An open-source example for verifying strike.iv feeds is available herearrow-up-right

You can adapt this verification flow for other feed types by changing the structs and type hashes accordingly.


Feed-Specific Structs and Type Hashes

Below are the Solidity structs and EIP-712 type hashes for each supported feed. Replace the definitions in the example repoarrow-up-right accordingly.


1. Interest rate

Interest rate term structure for given currency

Structs

Type Hashes

2. Mark price

Mark price for any option strike for a given expiry.

Structs and Type Hashes

Additional optional fields may be included to represent first-order Greeks in value structs

Future mark price

When querying futures mark prices, the structure is simplified. Instead of returning arrays or multiple buckets, the response contains only a single value per sid.

Structs

Type Hashes

3. Model params

Calibrated SVI model parameters defining the implied volatility smile for a specific expiry.

Structs

Type Hashes

4. Settlement and Index Price

Settlement Price: Time-weighted average of the spot index price at a specified expiry. Designed for robust and manipulation-resistant settlement of derivatives contracts (including futures and options).

Index Price: Block Scholes index price for the given asset.

Structs

Type Hashes

5. Implied Volatility Surface (IV)

IV datapoints are supported in different formats:

  • Strike-based IV — Implied volatilities at different strikes

  • Moneyness-based IV — Implied volatilities at different forward-moneyness levels

  • Delta-based IV — Implied volatilities at different delta levels

  • IV Index (BSIV) - Weighted expectation of IV across all strikes on the smile

Strike, Moneyness & Delta types follow the same struct and EIP-712 signature pattern — only the bucket field name changes depending on the dimension used.

Solidity structs

Type Hashes

For generic usage:

For concrete implementations, replace bucket with the actual field:

Example: Strike-based IV

Index IV

Type hashes

Last updated

Was this helpful?