Oracle Quotes Overview

Overview

Oracle Quotes represent a paradigm shift in how oracle data is delivered on Solana, eliminating write locks and reducing costs by 90%. With the new Ed25519 signature verification, Oracle Quotes now require only 485 compute units for single feed verification, making them the most cost-efficient oracle solution on Solana.

πŸš€ No Data Feed Accounts Required

Unlike traditional oracle solutions, Oracle Quotes require ZERO setup:

  • ❌ No need to create data feed accounts

  • ❌ No need to fund accounts with SOL

  • ❌ No need to manage account permissions

  • βœ… Just fetch a feed hash and start using prices immediately!

Why are Oracle Quotes faster than other oracle solutions?

Traditional Approach (Higher Cost):
Oracle β†’ Feed Account (write) β†’ Your Program (read)
         ↑ Write Lock Required

Oracle Quotes Method (90% Lower Cost):
Oracle β†’ Oracle Quote β†’ Your Program (direct use)
         ↑ No Write Lock!

Key Benefits

Feature
Oracle Quotes (Ed25519)
Traditional Feeds

Transaction Cost

~0.00015 SOL

~0.002 SOL

Update Latency

<1 second

2-10 seconds

Write Locks

None

Required

Setup Time

Instant

5-10 minutes

Parallel Access

Unlimited

Limited

Compute Units

~70 CU

50,000+ CU

How Oracle Quotes Work

The Oracle Quotes method consists of two key components working together:

1. Client-Side Oracle Quote Fetch

2. On-Chain Signature Verification

Your program receives the Ed25519 instruction and validates the oracle signatures:

3. Ultra-Fast On-Chain Verification

The Ed25519 verification process uses advanced optimizations for minimal compute cost:

Oracle Quote Architecture Deep Dive

Ed25519 Signature Verification Optimizations

The Oracle Quotes system leverages several advanced optimizations:

  1. Batch Signature Validation: All oracle signatures are validated in a single Ed25519 instruction

  2. Zero-Copy Parsing: No memory allocation during verification

  3. Precompiled Operations: Uses Solana's native Ed25519 precompile for maximum efficiency

  4. Optimized Account Layout: Minimal account reads through strategic data organization

Performance Comparison

Operation
Oracle Quotes
Traditional Feeds
Improvement

Signature Verification

485 CU

3,000+ CU

6x faster

Data Access

Direct read

Account + deserialize

4x faster

Total Transaction Cost

~0.00015 SOL

~0.002 SOL

90% cheaper

Security Model

Oracle Quotes maintain the same security guarantees as traditional feeds:

  • Multi-Oracle Consensus: Requires signatures from multiple independent oracles

  • Slashable Security: Oracles have economic stake that can be slashed for misbehavior

  • Freshness Validation: Built-in staleness checks prevent replay attacks

  • Cryptographic Integrity: Ed25519 signatures ensure data authenticity

Getting Started

1. Quick Start (30 seconds to first price)

2. Integration Steps

  1. Install SDK: npm i @switchboard-xyz/on-demand

  2. Add Rust Crate: cargo add switchboard-on-demand

  3. Fetch Oracle Quote: Use fetchUpdateBundleIx() client-side

  4. Verify On-Chain: Use QuoteVerifier in your program

  5. Access Data: Extract verified feed values for your logic

3. Complete Integration Example

Real-World Examples

DeFi Lending Protocol

Perpetual DEX

Migration from Traditional Feeds

Oracle Quotes are designed to be a drop-in replacement for traditional feeds:

Before (Traditional Feeds)

After (Oracle Quotes)

Frequently Asked Questions

Q: Do Oracle Quotes work on all Solana networks? A: Yes! Oracle Quotes work on Mainnet, Devnet, and Testnet with the same API.

Q: Can I batch multiple feeds in one Oracle Quote? A: Yes! You can include multiple feed hashes in a single fetchUpdateBundleIx() call.

Q: What's the maximum number of feeds per Oracle Quote? A: The limit depends on transaction size constraints, but typically 10-20 feeds per quote.

Q: How fresh is the oracle data? A: Oracle Quotes are typically updated within 1 second of price changes, with built-in staleness validation.

Q: Are Oracle Quotes more secure than traditional feeds? A: Yes! Same security model but with additional Ed25519 cryptographic verification and no write lock attack vectors.


Ready to get started? Check out our complete integration examples and start building with Oracle Quotes today!

Last updated