Skip to content

[config] testnet.toml missing Chapel Chainlink feed address list and no startup warning when feeds absent #237

@obchain

Description

@obchain

PR: #51 (feat/23-testnet-config)
File: config/testnet.toml (new), crates/charon-cli/src/main.rs line 148
Refs #51

Problem

The PR does not include a [chainlink.bnb_testnet] section in testnet.toml. This means PriceCache is constructed with zero feeds. The scanner falls back to Venus protocol oracle for prices.

Chapel's Venus PriceOracle contains test prices that are either synthetic, stale, or set by test-account calls. These prices do not reflect real market conditions.

Additionally, the startup log at line 148-152 only iterates fresh_feeds (which will be empty) — it emits nothing to indicate the degraded state. An operator watching startup logs will not notice the absence of price feeds.

Impact

The Grafana demo produces bucket classification data based on junk prices. Operators calibrating thresholds (liquidatable_threshold, near_liq_threshold) against testnet data will get misleading signal.

Fix

  1. Add Chapel Chainlink feed addresses to testnet.toml. Chapel feeds known to exist (verify on data.chain.link selecting BSC Testnet): BNB/USD, BTC/USD, ETH/USD, USDT/USD.

  2. Add a startup warning when price_feeds.is_empty():

if price_feeds.is_empty() {
    warn!(chain = %chain_name, "no chainlink feeds configured — bucket classification uses protocol oracle prices (may be synthetic on testnet)");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlayer:rustRust crates (core / scanner / protocols / executor / cli)priority:p2-polishNice-to-have / polishstatus:readyScoped and ready to pick up

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions