pallet-price-oracle

A Substrate pallet implementing a modular on-chain price oracle for DeFi and runtime-level financial primitives.

Features

  • On-chain price feeds: Stores and updates asset price data directly in runtime storage
  • Configurable sources: Supports multiple price providers with aggregation logic
  • Deterministic execution: Fully runtime-native, no off-chain dependencies required
  • Lightweight integration: Designed for easy composition with other pallets

Technical Highlights

  • Built using FRAME with configurable Config trait for extensibility
  • Implements fixed-point arithmetic for precise financial calculations
  • Uses storage maps optimized for frequent read access
  • Designed for composability with DEX and lending pallets

Why On-Chain Oracles?

DeFi primitives require deterministic and verifiable price inputs. Embedding oracle logic directly in the runtime ensures trust-minimized execution while maintaining full composability with other runtime modules.