fix(oracle): validate fresh quorum and contain hub spot manipulation (#1391) #1412
No reviewers
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
code/cl8y-dex-terraclassic!1412
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/1391-oracle-integrity"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Invalid CEX prices and expired historical averages could affect public USD marks and script sizing. This change rejects invalid inputs, requires a named two-source quorum, expires current prices, and bounds canonical hub spots with independent priced-leg depth and persistent references. Financial scripts validate source, age and quality again before transaction preparation; live numeric price overrides are rejected.
Implements #1391. Hub spots remain explicitly non-oracle-grade. Fresh CEX observations mean recent local fetches and agreement, not authenticated market timestamps. Fixed references cannot prove fair value or prevent manipulated bootstrap/within-bound changes.
Acceptance and verification:
Validation: full aggregate PASS twice (372 Rust test executions, 38 Python test cases), followed by final mixed-flag historical repair regression 11/11 twice (394 Rust executions total); Node 24 types and all commit hooks pass. Overall PASS with explicit chain/deployment skips; no executed assertion failure was waived.
Commands/outcomes, revision and UTC scope are in the verification receipt. Review/reproduction and explicit agent skip permission are in the checklist and the agent playbook. Every runnable assertion must pass; unavailable checks may be recorded as SKIP and implementation verification may report overall PASS with skips. A skip never proves deployment and an executed failure stays FAIL until fixed and retested.
SQLx migrations add certified oracle state/history and durable hub references. Legacy history stays uncertified; old hub/economic marks lacking provenance are unavailable. Deploy the new indexer API before updated scripts: old price-only payloads fail closed. Intentional repricing needs reviewed reference maintenance, never automatic reanchoring. No contract migration is required.