TwapOracle::configure_oracle (contracts/oracle/src/lib.rs) validates decimals > 38 but never validates max_staleness. If an admin sets max_staleness: 0, every submission becomes stale essentially immediately (get_twap_price's age <= config.max_staleness can basically never hold once even one ledger has passed), silently bricking the oracle for all readers — get_twap_price will return OracleStalePrice forever without any distinct error indicating the configuration itself is degenerate. A max_staleness == 0 check (mirroring the decimals guard) would surface this at configuration time instead.
TwapOracle::configure_oracle(contracts/oracle/src/lib.rs) validatesdecimals > 38but never validatesmax_staleness. If an admin setsmax_staleness: 0, every submission becomes stale essentially immediately (get_twap_price'sage <= config.max_stalenesscan basically never hold once even one ledger has passed), silently bricking the oracle for all readers —get_twap_pricewill returnOracleStalePriceforever without any distinct error indicating the configuration itself is degenerate. Amax_staleness == 0check (mirroring thedecimalsguard) would surface this at configuration time instead.