JavPriceAggregator

General Description

The JavPriceAggregator is a smart contract designed to manage and update price feeds securely and efficiently on the blockchain. It supports price validation using cryptographic signatures from authorized signers, ensuring data integrity and authenticity. This contract was created for the purpose of deploying a price feed oracle on a network where a traditional path is not available. It is especially suitable for decentralized applications requiring accurate and tamper-proof price data, such as DeFi platforms, derivatives trading systems, oracles, and more.

Key features include:

  • Secure handling of price updates.

  • Support for multiple authorized signers.

  • Fee-based system for managing price updates.

  • Admin control for managing signers and configuration parameters.

Features

User Features

  • Retrieve Latest Prices: Users can query the most recent price information by ID.

  • Query Fees: Users can calculate the total fees required for a set of price updates.

Integration Capabilities

  • Secure Price Updates: Integrators can submit price updates signed by authorized signers, ensuring trustworthiness.

  • Admin Configurations: Admins can manage authorized signers, update fees, and set parameters for price feed lifetimes.

  • The interface of this contract is fully consistent with the interface of the Pyth contract.

Functions

Price Update Functions

function updatePriceFeeds(bytes[] calldata updateData) external payable
  • Purpose: Submits and processes multiple price updates signed by authorized signers.

  • Access Control: Public payable.

  • Process:

    • Verifies signatures and timestamps.

    • Decodes and validates price update data.

    • Updates the stored price information.

  • Fee: Requires payment based on the number of updates submitted.

Last updated