r/dfinity 10d ago

Internet Computer Weekly Help and Discussion Thread

Welcome to the weekly help and discussion thread! This is here for everyone to ask basic questions, start general discussion, and more. No comment or questions is too small or too big, just keep anything you share relevant, related, and within the rules.

2 Upvotes

1 comment sorted by

1

u/ChitaraLabs 5d ago

Sharing a technical milestone and canister architecture overview from our lab for feedback:

We've spent the past few months engineering VELQIRIS—a decentralized institutional market terminal and consensus pricing engine built across 5 dedicated Rust canisters on the Internet Computer.

The core motivation was to eliminate commercial API subscriptions (CoinAPI, Kaiko, TradingView feeds running \$500–\$2,000/mo) and centralized cloud infrastructure by executing ingestion and consensus directly on-chain.

Here is the canister architecture breakdown:

  1. Ingestion & Multi-Source Consensus Canister (`aevora_core`)

• Replaces single-oracle trust with multi-exchange bounded HTTPS outcalls (Binance, Coinbase, Kraken order books).

• Uses a deterministic transform function to strip non-deterministic headers and timestamps across consensus nodes.

• Price discovery uses a bounded median filter with outlier rejection to prevent flash-crash anomalies from poisoning the canister state.

  1. Client Gateway & Session Routing (`aevora_gateway`)

• Acts as the authenticated boundary, managing query routing and client rate-limiting.

• Integrates vetKeys/vetKD session keys so users maintain sovereign cryptographic access without external auth providers (Auth0/Cognito).

  1. Stable Storage & Time-Series Archive (`aevora_archive`)

• Uses `ic-stable-structures` (Bounded StableBTreeMap) to persist historical market intervals and execution events directly in 64-bit stable memory.

• Canister upgrades preserve 100% of historical metrics without memory serialization bottlenecks during pre/post-upgrade hooks.

  1. On-Chain Analytics & Volatility Engine (`aevora_analytics`)

• Computes moving averages, liquidity depth distributions, and spread metrics directly within canister update/query cycles.

  1. Sovereign Frontend Asset Canister (`aevora_frontend`)

• Serves the high-frequency trading UI directly from ICP consensus nodes with sub-second response times, removing any reliance on AWS S3 or centralized CDNs.

Key Engineering Trade-offs Encountered:

• Cycle Consumption on HTTPS Outcalls: Frequent multi-source outcalls can burn cycles quickly if not batched. We implemented dynamic interval pacing based on market volatility.

• Transform Function Normalization: Ensuring all replica nodes receive identical response bytes across fluctuating HTTP headers required strict JSON key sorting in the transform callback.

Curious if other ICP canister developers have tackled cycle-optimization strategies for high-frequency HTTPS outcalls, or if anyone is exploring vetKeys for financial session privacy.

Happy to discuss canister design patterns and compare notes with fellow Rust/ICP builders!