feat: add Class A validator with four CEX adapters - #5
Open
AK-APRIORIT wants to merge 3 commits into
Open
Conversation
AK-APRIORIT
force-pushed
the
feat/class-a-validator-cex-adapters
branch
from
August 28, 2026 18:34
39d81d0 to
af4ef99
Compare
AK-APRIORIT
force-pushed
the
feat/n-of-m-oracle-contract
branch
from
August 31, 2026 10:12
bc5ccb8 to
1298962
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Class A observes the same four CEX venues as the mainnet allowlist, derives CORE prices under the pinned parameter register, fail-closes on a bad candidate, and signs only frozen
PACK(payload)bytes with a testnet key.Minimum 3 matches the security baseline (≥3 healthy independent venues) and the availability rule that loss of one approved CEX must not block a healthy CORE update. Two remaining observations fail closed (
INSUFFICIENT). Outlier exclusion is allowed only when three venues remain.Binance/OKX XTZ and BTC routes stay USDT-quoted and are scaled by the same-round
USDT_USD. Kraken and Coinbase are direct USD. Coinbase has no XTZ-USDT product; CORE uses CoinbaseXTZ-USD. A syntheticXTZ/USDT = XTZ/USD ÷ USDT/USDhelper exists for a later register row and is not the current CORE route.Validator implementation (
src/validator/)USDT_USDfirst (direct USD only), thenXTZ_USD/BTC_USDwith USDT conversion;median_lower; integerhalf_away_from_zero; oldest contributing observation time.evidence_digest; signer-local record without secrets.PACK(payload)only;TEZORACLE_SIGNER_SECRET_KEYfrom runtime config; local per-group round tracking. Golden vectors GV-01…GV-08 match the stored test-only ed25519 signatures.npm run validator -- derive|verify|sign. CI path uses deterministic fixtures (tests/validator/fixtures/cex-core.json).Tests added
--help, fixture derive, refuse a bad candidate)initial_phasevenues, and a well-formedpolicy_hash