Skip to content

[INFRA] Build Multi-Chain Live Gas Price & Historical Fee Indexer #608

Description

@mijinummi

Labels: high-difficulty, infrastructure, oracle
Difficulty: High
Module: apps/api/src/gas-oracle/


🧠 Concept

Construct an automated background service in the Nest.js backend that indexes real-time gas prices and native token rates ($ETH, XLM, OP, ARB$) across 10+ supported networks.

⚠️ Problem

Static gas estimates become outdated as token prices and network base fees fluctuate daily. Live price indexing ensures monetary savings calculations remain accurate.

📁 Implementation Scope

  • apps/api/src/gas-oracle/fee-indexer.service.ts
  • apps/api/src/gas-oracle/price-feed.service.ts

🛠️ Requirements

  1. Query real-time RPC gas fees (EIP-1559 base/priority fees, Soroban resource fees) every 30 seconds.
  2. Fetch native token prices via cached market feeds.
  3. Expose dynamic conversion APIs used by the diagnostic engine to compute accurate USD values.

🎯 Acceptance Criteria

  • Maintains real-time gas fee and token price states in Redis.
  • Falls back gracefully to cached baseline values if price APIs experience downtime.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions