Invarians

FOUNDATIONS

How Invarians measures blockchain infrastructure state, architecture, measurement method, calibration, and three output primitives (Attestation, Regime, Drift Signal).

00 Foundational Principle, Block-Level Truth

Post-PBS and MEV-Boost have fragmented mempool visibility. No single node observes all pending transactions, rendering mempool snapshots structurally unreliable. Invarians abandons mempool-based assumptions and measures only what is consensus-finalized: the block itself.

What we exclude by design

Mempool observations · raw price volatility · liquidity depth · transaction intent signals · gas market narrative.

What we include

τ texture (long-term structural regime, 5–13 h window) · π pressure (short-term operational friction, ~5 min window) · their divergence. The single exception on the demand side: the echo of activity (sigma, size, transaction count) measured on confirmed blocks, not on intent flow.

This principle was published in Post-PBS, blockchains need infrastructure metrics, not mempool illusions (November 2024). The data model lives up to it: the active raw measurements table (ans_invariants_v3) contains zero mempool, zero raw fees, zero intent — only block-level observations.

01 Architecture, Three Distinct Layers

Blockchain infrastructure is not one system. It is three structurally distinct layers, each with different operating constraints, different failure modes, and different measurement requirements. Invarians measures each layer independently.

L1
Base Chain
The consensus layer. Blocks are produced by a validator set operating under protocol rules. Structural anomalies manifest as rhythm disruptions and cadence deviations, often without any economic signature on fees.
τ structural · π demand
→ four regimes (SxDx)
L2
Rollup
The execution layer. A sequencer produces blocks at fixed cadence, the structural clock is architecturally constant. Measurement focuses on execution characteristics: activity intensity, transaction profile, and L1-anchored batch signals.
π demand · μ composition · σ adaptation
→ regime S1Dx (τ non-discriminant)
Bridge
Cross-Chain Connection
The transfer layer between L1 and L2. Operates on short time scales. State reflects current latency and backlog, binary and fast-moving, distinct in nature from the structural regimes of L1 and L2.
latency · backlog
→ two states (BS1 / BS2)
EIP-4844, Why L2 measurement is structurally distinct

Since the Dencun upgrade (March 2024), L2 rollups post batch data to Ethereum via blobs, a separate fee market that does not flow through L1 basefee. An L2 sequencer incident or batch posting gap now produces no economic signature on L1. Fee monitors watching L1 are structurally blind to it. Invarians measures L2 infrastructure state directly, from rollup block data and from L1-anchored batch signals.

02 Structure and Demand, The Two Measurement Axes

For L1 chains, infrastructure state is the product of two independent axes: a structural axis and a demand axis. The separation is critical, structural stress and demand pressure can occur independently, simultaneously, or in opposition. Reading both independently is what makes S2D1 detectable.

τ
Structural axis, rhythm and cadence
Measures the internal structural behavior of the chain: block production rhythm, consensus sequence integrity, validator cadence. Captures deviations that occur independently of economic activity. Key signal: rhythm_ratio, normalized departure from calibrated historical cadence.

Threshold S2: rhythm_ratio ≥ chain-specific calibrated value.
π
Demand axis, block space pressure
Measures pressure on block space: transaction volume, block size saturation, gas utilization relative to capacity. Captures elevated economic activity. Logic: 2-of-3 dimensions must exceed calibrated thresholds simultaneously.

Dimensions: sigma_ratio · size_ratio · tx_ratio
Each chain measures itself

There is no cross-chain normalization. Every threshold is derived from each chain's own multi-year historical distribution. What constitutes an anomaly on Ethereum is calibrated from Ethereum data. What constitutes an anomaly on Solana is calibrated from Solana data.

Primitive 1 — Attestation HMAC Integrity, the Trust Layer

Every panel response carries a cryptographic envelope: a SHA-256 hash of the canonical JSON payload, an HMAC-SHA256 signature over that hash, and a key identifier. The agent can independently verify (via POST /v2/verify) that the payload was produced by Invarians and has not been altered in transit.

What attestation proves

The data is what Invarians produced at computed_at. It is non-repudiable on the server side, integrity-protected end-to-end, and reproducible against the canonical JSON form (sorted keys).

What attestation does NOT prove

That the underlying observation is correct (calibration responsibility) · that the regime classification is appropriate for the agent's policy (interpretation responsibility) · that the chain is safe to act on (fitness-for-action responsibility, see Primitive 3).

On-chain anchor (May 2026)

The HMAC envelope includes "anchor": null in v2.0. Once the InvariansAnchor contract is deployed on Arbitrum, each canonical payload hash will be batch-anchored on-chain (Merkle root with epoch boundary). The anchor field will then contain { tx_hash, block_number, contract }, providing a permissionless integrity check independent of the HMAC server.

Primitive 2 — Regime Regime Classification, SxDx

The combination of the two axes produces four base regimes. The classification is discrete and unambiguous, each measurement window maps to exactly one regime. Four legacy regimes: S1D1 · S1D2 · S2D1 · S2D2.

Since 2026-04-29, the panel API also emits signed regime codes on chains with calibrated lower bounds. The four base codes are extended with direction suffixes on the demand axis (D2+, D2-, D2±) and on the structure axis (S2+, S2-). Total: 12 codes on L1 and 12 codes on L2 (since v2.0, L2 also reaches S2 thanks to sequencer_publish_latency). The legacy 4 codes remain valid as aliases. See section 03b below.

S1D1
τ nominal · π nominal
Infrastructure operating within its calibrated historical norms on both axes. All measured dimensions within baseline.
S1D2
τ nominal · π elevated
Infrastructure structurally sound. Demand above calibrated historical percentiles, high-activity period. DeFi Summer and NFT Mania periods were S1D2 on Ethereum.
S2D1
τ stressed · π nominal
Structural stress without economic signature. Not detectable by fee monitors. The Ethereum Merge, Shanghai Upgrade, Solana outages, and Polygon Reorg Storm were all S2D1.
S2D2
τ stressed · π elevated
Structural stress coinciding with elevated demand. Compounded pressure, both axes degraded simultaneously. Rarest documented regime.
S2D1, highest diagnostic value

S2D1 is the regime with the highest diagnostic value. It captures infrastructure events, validator behavior anomalies, timing disruptions, network-layer issues, that produce no fee signature. A fee monitor would report S1D1 during an S2D1 period. This is the core of the two-axis approach: the structural and demand layers must be read independently to detect it.

On L2 rollups, the structural axis (τ) is architecturally constant, the sequencer produces blocks at fixed cadence. Only the demand axis varies. L2 rollups are currently classified as S1D1 or S1D2. Full regime coverage (S2D1 · S2D2) requires alternative structural instruments under development (Phase D, April 2026).

Primitive 2 — Regime Signed Regime Codes: Extending the SxDx Grid With Lower Bounds

The 4-state grid above is one-sided: it only captures deviations above the calibrated nominal window. But several real-world signatures fall below nominal: cascading liquidations (composition concentrated, total tx_count drops), sequencer halts (rhythm slows AND tx drops), censorship of a transaction class (selective tx exclusion), agentic bundle dominance (size up, tx down). Adding lower bounds on each axis produces signed direction codes, extending the grid to 12 regimes on L1 and 9 on L2.

D2+
demand elevated
At least one demand ratio above its high threshold, none below. Legacy D2 alias. DeFi season, ETF events, organic activity surge.
D2-
demand depressed
At least one ratio below its low threshold, none above. Sequencer halt user-side, censorship of small transfers, mempool gel.
D2±
composition asymmetric
At least one above AND at least one below. Agentic concentration: bots dominating with bundled, complex transactions while regular activity drops. The rsETH 2026-04-18 cascade signature.
S2+
rhythm slowed
Blocks taking longer than baseline. Legacy S2 alias. Sequencer drift, validator outages.
S2-
rhythm accelerated
Blocks coming faster than the historical baseline. Rare but informative on L1. Disabled on L2 rollups (rhythm too tight to be informative).
S1, D1
nominal
Within calibrated bounds on both directions. Default state, ~88% of windows on Ethereum.
D2±, the agentic concentration signature

D2± captures composition asymmetry that the legacy 4-state grid misses. Size-up + tx-down (or vice versa) means the chain is processing fewer but larger transactions than baseline (the typical profile of a bot cascade on Aave or Compound, MEV searcher dominance, or stablecoin depeg arbitrage HFT). The first such pattern observed on Invarians was the rsETH cascade of 2026-04-18 on Ethereum: with signed codes active, the panel would have emitted S1D2- at 14h UTC instead of the legacy S1D1.

Activated chain by chain since 2026-04-29: ETH, POL on L1; ARB, BASE, OP on L2. SOL and AVAX scheduled for July 2026 calibration. ARB uses a multi-dim demand workaround (size + tx) because sigma_ratio is structurally degenerate on Arbitrum Nitro. See glossary and calibration_log Entries #029 to #032.

Primitive 3 — Drift Signal EMAs, Shifts, and Fitness-for-Action

Regime classification answers what is the substrate doing now. It does not answer is it safe to act in the next 30 minutes. The Drift Signal is the third primitive: it measures whether the chain is converging toward, diverging from, or stable around its long-term baseline.

Two EMAs, one shift

Each classifying observable carries two exponential moving averages: a short EMA (~10 h half-life) tracking the current state, and a long EMA (~30 d half-life) representing the chain's structural baseline. The shift = ratio_short - ratio_long measures how far the chain currently deviates from its 30-day pace.

Two trend signals per metric

The shift alone tells you the magnitude of deviation. Two derived fields tell you whether it is amplifying or reverting:

shift_delta = shift_now - shift_prev  — direction of the value movement between cycles.

shift_magnitude_delta = |shift_now| - |shift_prev|  — whether the deviation is growing (positive) or shrinking (negative), regardless of which side of the baseline.

Fitness-for-action

An agent that reads only the regime sees a snapshot. An agent that reads the Drift Signal in addition can distinguish:

  • Regime D2+, drift growing → demand surge active and accelerating, regime sticky
  • Regime D2+, drift shrinking → demand surge ending, return to D1 within hours
  • Regime D2-, drift growing → starvation deepening, depressed demand persists
  • Regime D2-, drift shrinking → starvation recovering, return to D1 likely

An agent making a 30-minute decision uses the regime + drift to estimate whether its operating context will hold long enough to execute. That estimate is left to the agent's policy — Invarians provides the data, not the threshold.

The Drift Signal is exposed in the panel API in ?include=diagnostic mode, with shift, shift_delta, shift_magnitude_delta per classifying metric and a composite drift object per axis (structural / demand). Two new structural observables join in v2.0: Beacon Chain participation rate on Ethereum, sequencer publish latency on each L2. These observables emit shift_available: false during their slow-EMA stabilization period (~30 days post-launch), then automatically activate.

Substrate-only by design — why bridges do not carry a Drift Signal

The Drift Signal is a substrate-physics concept. Chains evolve under sustained agentic load on the time scale of weeks: structural rhythm slowly shifts, demand baselines slowly migrate, validator participation slowly trends. The 10 h / 30 d EMA pair captures exactly that scale.

Bridges are operational pipelines, not substrates. Their fitness-for-action is fully captured by current state (BS1 / BS2), per-message latency P90 / P99, success rate, and crypto anchor verifiability — at the cycle granularity of the collector (10 min). Forcing a substrate-style drift onto operational latency would conflate two different physical phenomena. The three-primitive architecture therefore exposes Drift Signal on L1 and L2 entries only; bridge entries expose state, metrics, and crypto pointer without a drift block.

04 Bridge State, BS1 / BS2

The bridge layer operates on different time scales and with different signal characteristics from L1 and L2. Its state is binary and fast-moving, it reflects the current operational condition of the cross-chain transfer path, not a structural regime.

BS1
Bridge nominal
Transfer latency and message backlog within calibrated historical norms. Cross-chain path operating normally.
latency: within baseline
backlog: within baseline
BS2
Bridge congested
Elevated transfer latency or message backlog. Cross-chain path under stress, transfers pending or delayed.
latency: above threshold
backlog: above threshold
Why bridge state is not a regime

L1/L2 regimes (SxDx) reflect structural conditions, inertial, slow-moving, derived from multi-year calibration. Bridge state (BS1/BS2) reflects operational throughput, fast-moving, binary, measured in seconds to minutes. The distinction is architectural. Mixing them would distort both signals.

Bridge signal collection active since March 2026. Variable-latency bridges (CCIP, CCTP) classified with unified BS1 / BS2 nomenclature. Each bridge entry exposes a capability_level field indicating the depth of signal captured.

CCTP routes, capability_level: per_message_attested (since 2026-05-11)

Each CCTP message is captured individually: the source DepositForBurn event, the MessageTransmitter.MessageSent payload, the resulting messageHash, and the Circle ECDSA secp256k1 attestation signature (65 bytes). The signature is retrievable via GET /v2/cctp/attestation/{message_hash} and is independently verifiable against Circle's published attester public key, providing a cryptographic chain of trust distinct from the Invarians HMAC envelope.

Bridge entry exposes metrics.latency_p90_s, metrics.latency_p99_s, metrics.success_rate_1h computed on per-message latencies, plus crypto.anchor = "circle_ecdsa" and crypto.verifiable_via pointer. A pending queue handles the asymmetry between collector cycle (10 min) and source-chain finality (~13-19 min on Ethereum-anchored chains): messages whose Iris attestation arrives after their first observation are re-polled at each subsequent cycle until attested or 2 h expiry, with no message lost.

CCIP lanes, capability_level: per_message_attested

Each CCIP message is captured individually: source CCIPSendRequested on the OnRamp and destination ExecutionStateChanged on the OffRamp, matched per message by the bytes32 messageId. Real send-to-execute latency per lane per direction is derived from the match.

Bridge entry exposes metrics.execute_latency_p90_s computed on per-message latencies, plus metrics.sequence_gap and metrics.messages_confirmed_1h. RMN.isCursed() per chain remains a safety boolean. crypto.anchor is null today (no per-message cryptographic anchor captured yet for CCIP). Each captured message is retrievable via GET /v2/ccip/message/{message_id}.

A pending queue handles the asymmetry between collector cycle and CCIP end-to-end latency, mirroring the CCTP pending model.

05 Composite drift, per axis

Beyond discrete regime classification, the v2.0 panel exposes a continuous drift signal per axis. Regime answers "what is the substrate doing now?". Drift answers "is it moving toward a transition?".

drift composite (Primitive 3)

For every axis (structural, demand) the panel reports three numbers in a single drift object: magnitude, raw delta, and magnitude_delta. Magnitude is the maximum absolute shift across the axis observables (rhythm, continuity, beacon_participation on ETH; sigma, size, tx, complexity, gas_complexity on demand). Magnitude_delta tells whether that deviation is widening (positive) or shrinking (negative) between cycles.

Regime classification remains the primary output. The drift composite gives systems that require it a continuous fitness-for-action signal: substrate stable, mild drift, active drift, or imminent transition probable. Per-metric blocks (in diagnostic mode) expose the same triplet (shift, shift_delta, shift_magnitude_delta) at observable granularity.

06 Calibration

Every threshold is derived empirically. No assumption is introduced by design.

Data source
Multi-year historical calibration per chain
Ethereum: 34,697 hourly windows 2020–2024. Polygon: 28,744 windows 2020–2023. Solana: backtest 2021–2024 (partial). Each chain calibrated independently, no cross-chain normalization.
Method
Empirical threshold derivation
Thresholds are derived from each chain's own distributional behavior, structural and demand axes independently. Regime frequency validated to ensure statistical consistency across market cycles and network upgrades.
Baseline formation
Adaptive per-chain baseline
Each chain maintains a dynamic baseline using dual-speed exponential moving averages, a fast window for responsiveness and a slow window for structural stability. No manual recalibration required as network conditions evolve.
Integrity
Cryptographically anchored output
Input data is sourced from finalized, public on-chain data only. No mempool. No price feeds. Each attestation is HMAC-SHA256 signed and timestamped, independently verifiable via the /verify endpoint.
Chain τ structural π demand Regime coverage
Ethereum Calibrated, backtest 2020–2024 Calibrated, FPR 1.23% S1D1 · S1D2 · S2D1 · S2D2
Polygon Calibrated, backtest 2020–2023 Calibrated, TPR 100% (4/4 events), FPR 14.57% S1D1 · S1D2 · S2D1 · S2D2
Solana Calibrated, partial (τ FPR 1.77%) Pending, tx_count unavailable in dataset S1D1 · S2D1 (S1D2 · S2D2 pending)
Avalanche Empirical estimate, no BigQuery backtest Empirical estimate, confidence LOW Operational, confidence LOW
L2 Rollups, distinct measurement framework
Base τ non-discriminant (sequencer constant cadence) 30d statistical calibration v3 (2026-04-16), σ threshold 1.20 S1D1 · S1D2 (S2D1 · S2D2 pending Phase D)
Optimism τ non-discriminant (sequencer constant cadence) 30d statistical calibration v3 (2026-04-16), σ threshold 1.12 S1D1 · S1D2 (S2D1 · S2D2 pending Phase D)
Arbitrum τ compressed (P99/P50 = 1.086) π broken, gasLimit ≈ 2⁵⁰ (gas_complexity_ratio Phase B) Recalibration pending
07 Empirical Evidence

Validated on real incidents. Not synthetic data. Invarians has been calibrated and backtested against documented historical events, each one verified against independent sources.

ETH, March 2024

ETF speculation congestion, +12.2h advance over fee monitors

Invarians detected structural demand elevation 12.2 hours before gas P80 confirmed it. L1 structural regime (S1D2) was measurable from finalized block data alone, no mempool, no prediction.

FPR: 1.23%, 4 years of ETH data · TPR: 100%, all 4 major events detected
L2 sequencer, June 2024

37-minute batch posting gap — zero L1 signature

Batch posting stopped for 37 minutes. During the entire window, L1 ETH showed S1D1, structurally normal. Fee monitors: no signal. Invarians: BS2 bridge state, L2 regime S1D2 (×1649 block ratio).

L1 during incident: S1D1. The event had zero economic signature on L1, exactly what EIP-4844 predicts.
08 Three Primitives

The measurement chain — architecture, axes, classification, calibration — produces three distinct outputs in a single signed payload (since API v2.0, 2026-04-30):

Primitive 1
Attestation
The cryptographic envelope. HMAC-SHA256 over the canonical JSON payload, with key identifier and on-chain anchor slot reserved (May 2026). Independently verifiable via /v2/verify.

Answers: can I trust this data?
Details →
Primitive 2
Regime (SxDx)
The substrate state classification. 12 codes per chain via the structural × demand grid, with signed direction extension (S2+, S2-, D2+, D2-, D2±) on chains with calibrated lower bounds. L1 + L2 + Bridge state combined as a directional tuple.

Answers: what is the substrate doing now?
Details →
Primitive 3
Drift Signal
The trend signal. Per-metric shift, shift_delta, shift_magnitude_delta over short (~10 h) and long (~30 d) EMAs, plus composite drift per axis. Tells the agent whether the regime is persisting, amplifying, or reverting.

Answers: is it safe to act in the next 30 minutes?
Details →
The boundary

Invarians certifies what the infrastructure is and where it is drifting. It does not prescribe what the agent should do. Execution policy, thresholds, risk tolerance, fallback logic — belongs to the agent. The three primitives provide the factual basis for that policy. The decision does not.

Pattern Reference (the historical frequency of each (L1 × L2 × Bridge) combination) remains a complementary research output, exposed via /patterns and the pattern_frequency_snapshots dataset. It is an analytical reference, not part of the live signed payload.

09 Design Principles
Finalized blocks only
Post-PBS compatible. No mempool dependency.
No narrative
Measurement, not interpretation or advice.
Chain measures itself
Each chain calibrated against its own history.
No price feeds
Structural, not economic. Independent of market.
Integrity-certified
HMAC-SHA256 signed and timestamped. Verifiable via /verify.
Falsifiable by design
The instrument accepts its own failure modes.
10 Scope of measurement

Invarians tracks blockchain behavior under AI agent load and defines safe execution windows. Current monitoring scope:

Layer Coverage
L1 Ethereum, Solana, Polygon, Avalanche
L2 (Ethereum-anchored) Arbitrum, Base, Optimism
Chainlink CCIP lanes Bidirectional, L1 ↔ L1 and L1 ↔ L2
Circle CCTP routes Bidirectional, L1 ↔ L1 and L1 ↔ L2

Bridge classification scope is variable-latency surfaces only (Chainlink CCIP, Circle CCTP). Institutional RWA settlement moves stablecoins via CCTP and tokens via CCIP, both bidirectional.