Skip to content

Enhancement: TwapOracle::submit_price has no upper-bound sanity check on price #226

Description

@Jaydbrown

contracts/oracle/src/lib.rs::submit_price accepts any u64 price with no sanity ceiling. A price submission that's orders of magnitude too large (fat-fingered or malicious admin key) would corrupt the TWAP window until enough correct observations roll it out. A configurable max-deviation-from-last-price check (or an absolute ceiling in OracleConfig) would catch this at submission time instead of propagating into get_twap_price/calculate_fiat_stream_payout.

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