Reports are the primary data structure in SOON’s Oracle system. They contain price feed information and associated metadata.The JSON structure of a report is defined as follows:
Copy
Ask AI
{ "report": { "configDigest": <string>, // Configuration digest for the price feed "epochAndRound": <number>, // Current epoch and round number "extraHash": <string>, // Additional hash information "feedID": <string>, // Unique identifier for the price feed "validFromTimestamp": <number>, // Timestamp from which the report is valid "observationsTimestamp": <number>, // Timestamp when observations were made "nativeFee": <string>, // Fee in native token "tokenFee": <string>, // Fee in ERC20 token "expireAt": <number>, // Timestamp when the report expires "benchmarkPrice": <string>, // Main reference price "askPrice": <string>, // Ask price from aggregated sources "bidPrice": <string>, // Bid price from aggregated sources "signatures": <array[string]>, // List of validator signatures "recovery_ids": <array[number]> // Recovery IDs for signature verification }}
Price feeds are another crucial data structure in SOON. Each feed has specific attributes:
Copy
Ask AI
{ "name": <string>, // Name of the price pair (e.g., "BTC/USD") "feedID": <string>, // Unique hex identifier for the feed "decimals": <number>, // Number of decimal places (typically 18) "status": <string>, // Current status of the feed "timestamp": <number>, // Last update timestamp "configuration": { "heartbeat": <number>, // Update frequency in seconds "deviation": <number>, // Price deviation threshold "validators": <array[string]> // List of validator addresses }}
Account data structure on SOON follows the SVM (Solana Virtual Machine) format:
Copy
Ask AI
{ "lamports": <number>, // Account balance in lamports "owner": <string>, // Program that owns this account "data": <[string, string]>, // Account data and its encoding "executable": <boolean>, // Whether account contains executable code "rentEpoch": <number>, // Next rent collection epoch "space": <number> // Size of account data in bytes}