Difficulty Specification

cASERT — Contextual Adaptive Stability & Emission Rate Targeting
Difficulty Adjustment

Unified consensus-rate control combining bitsQ primary controller, equalizer profiles, and anti-stall for ConvergenceX Proof-of-Work.

CONSENSUS | Integer-only arithmetic · Q16.16 fixed-point · Per-block retargeting

bitsQ Primary Controller

Exponential Foundation
EXPONENTIAL FOUNDATION (2020)

cASERT's bitsQ primary controller originally used an exponential moving average formula (half-life based), pioneered by Mark Lundeberg and Jonathan Toomim for Bitcoin Cash (November 2020 hard fork). Since block 5,175, bitsQ uses an avg288-based model: it compares the average of the last 288 block intervals against the 600s target. Since block 5,270, a dynamic cap scales with deviation (0% dead band at ±15s, then 0%/0.5%/1.0%/2.0%/3.0% max). Median removed from consensus (block 5,270+). The half-life exponential is preserved for pre-5175 blocks only. cASERT was designed by Neob for SOST (2026), extending the controller with equalizer profiles and anti-stall decay into a unified consensus-rate control system for ConvergenceX.

PropertyDetail
Core formulanext_bitsq = anchor_bitsq * 2^(-td / halflife)
Time delta (td)actual_time - expected_time (deviation from ideal schedule)
Exponential responseDifficulty doubles/halves every halflife period
SOST implementationInteger-only cubic polynomial approximation of 2^x
EncodingQ16.16 fixed-point arithmetic, no floating point in consensus
BITSQ mode (current)avg288-based (block 5,175+): avg of last 288 intervals vs 600s target. Dynamic cap (5,270+): 0% dead band (±15s), 0%/0.5%/1.0%/2.0%/3.0% max. Median removed from consensus (block 5,270+)
Median288HISTORICAL: median288 override with ±30 s dead band and 0.5/1.5/2.5/3% steps only for blocks 5,260–5,269; removed from consensus at block 5,270
Legacy half-lifeV1: 48h (genesis–1,449), V2: 24h (1,450–5,174). Preserved for historical blocks only
Legacy delta capV1: 6.25%, V2: 12.5% symmetric. Preserved for historical blocks only
TARGET_SPACING600s (10 minutes)
Key principle: For blocks < 5,175, the bitsQ controller is anchor-based (exponential half-life). For blocks ≥ 5,175, bitsQ is avg288-based: it compares the average of the last 288 block intervals against the 600s target, with a dynamic cap (block 5,270+) that scales with deviation. Median removed from consensus (block 5,270+). The anchor-based formula is preserved for historical blocks only.

CONVERGENCEX DIFFICULTY CONTROL = bitsQ + Equalizer. bitsQ regulates the numeric difficulty of the target; the Equalizer regulates the structural cost profile of each ConvergenceX attempt under the cASERT rules. Both are recomputed and verified by every node.

cASERT Architecture

cASERT is a unified three-layer consensus-rate control system: (1) the bitsQ primary controller provides difficulty adjustment (avg288-based since block 5,175, with dynamic cap since block 5,270), (2) equalizer profiles introduce discrete hardening levels when the chain runs ahead of schedule, and (3) anti-stall decay ensures liveness under sudden hashrate loss. ConvergenceX PoW has a stability_metric (gradient descent convergence) that can be tightened. cASERT monitors how far ahead of schedule the chain is and introduces discrete hardening levels to prevent fast-block attacks. The equalizer ceiling is height-gated: H13 pre-V12 (#5,750..#7,349), H20 from V12 (#7,350..#11,999), and H35 from V13 (#12,000+). Profiles H14–H20 activated at V12 #7,350; profiles H21–H35 activate at V13 #12,000 (full 43-profile range live from V13; margin=115).

Equalizer Profiles (E7–H35)
DIRECT LAG MAP (#5,323+)
ProfileH=ScaleKStepsMarginCompute
E7A-71112001
E6A-61121952
E5A-51221904
E4A-41231856
E3A-31331809
E2A-213417512
E1A-114417016
B0A014416516
H1A+114516020
H2A+215515525
H3A+315615030
H4A+416614536
H5A+525514050
H6A+625613560
H7A+726613072
H8A+826712584
H9A+927712098
H10A+10278115112
H11A+11288115128
H12A+12289115144
H13A+13299115162
H14A*+142910115180
H15A*+1521010115200
H16A*+1621011115220
H17A*+1721111115242
H18A*+1821112115264
H19A*+1921212115288
H20A*+2021213115312
H21A**+2121313115338
H22A**+2221314115364
H23A**+2321414115392
H24A**+2421415115420
H25A**+2521515115450
H26A**+2621516115480
H27A**+2721616115512
H28A**+2821617115544
H29A**+2921717115578
H30A**+3021718115612
H31A**+3121818115648
H32A**+3221819115684
H33A**+3321919115722
H34A**+3421920115760
H35A**+3522020115800

43 profiles E7(-7) through H35(+35). H10–H35 margin=115. Compute = scale × k × steps.
A = Active pre-V12 (#5,750..#7,349) — 21 profiles E7 through H13.
A* = Active from V12 (#7,350..#11,999) — 7 additional profiles H14 through H20 (V12 ceiling, 28 active total).
A** = Active from V13 (#12,000+) — 15 additional profiles H21 through H35 (V13 ceiling, full 43-profile range active; this closes the equalizer calibration started in V6).
R = Reserved — previously (pre-V13) the upper segment was reserved for future activation as network hashrate grows; from V13 / block 12,000 no equalizer profile remains reserved. 43-profile table since block 5,750 (before: legacy 40-profile E4–H35 table). Scale 1 for E7–H4, scale 2 for H5–H35.
Current selection (direct lag map, #5,323+): lag = (h−1) − floor((prev.time − genesis)/600), positive = chain ahead; target = B0 if lag ≤ 0, else min(lag, ceiling); up immediate, down at least 1 level/block. The validator recomputes the profile and the declared profile_index must equal it.
Relief ladder: current V12 triangular cascade (7,350+) — from 540 s elapsed, n = min(1+(elapsed−540)/60, 7), drop n(n+1)/2 = 1/3/6/10/15/21/28 levels, floor E7. HISTORICAL: V8 single E7 cliff at 605 s (5,750–6,549) → V9 staged drop 3/60 s from 540 s (6,550+) → V10 granular drop 1/60 s from 600 s (6,700+) → V11 linear (7,000) / triangular cap 21 (7,100).
V6 calibration (5,050): lag cap H ≤ lag, live lag (disabled at V10), anti-stall 60 min. bitsQ avg288-based (5,175+), dynamic cap (5,270+). V13 (12,000+) ceiling expansion to H35 completes the cASERT equalizer calibration.

BIDIRECTIONAL

Easing & Hardening

The equalizer operates bidirectionally: E7–E1 ease stability (via the V12 cascade during a slow block, or anti-stall after 6h extra at B0), B0 is the baseline, H1–H35 harden when blocks are fast. All 43 profiles defined. Pre-V12 (#5,750..#7,349): 21 active E7–H13, 22 reserved H14–H35. V12 (#7,350..#11,999): 28 active E7–H20, 15 reserved H21–H35. V13 (#12,000+): 43 active E7–H35, 0 reserved — full equalizer range live. Safety rules cap at B0 when behind schedule (lag ≤ 0). Current: up immediate, down at least 1 level per block (direct lag map, #5,323+). HISTORICAL: slew rate ±1 profile level per block (V6, blocks 5,000–5,322).

43 PROFILES

Independent Tuning

43 profiles E7(-7) through H35(+35). Each profile has independently tuned scale, k, steps, and margin. Higher profiles impose stricter stability_metric thresholds on ConvergenceX, making it progressively harder to produce fast blocks. E7–H4 use scale 1; H5–H35 use scale 2. H35 is the hardest profile (k=20, steps=20, margin=115).

ANTI-STALL

Decay Anti-Stall

If no block is found for an extended period, the cASERT level decays to B0 via zone-based rates. Activation: 3,600 s (60 min) without a block at current heights (since V5 #4,300; the 7,200 s / 2-hour floor is HISTORICAL, before #4,300). First drop immediate. Easing below B0 (−1 level per 1,800 s, down to E7) activates after 6 hours extra at B0. This prevents mining deadlock when hashrate drops suddenly. Note — Slingshot vs anti-stall: they are complementary, not duplicates. Slingshot is a fast, per-block relief that shoves bitsQ down the moment a block runs long; this anti-stall decay is the slow backstop that walks the equalizer profile back to B0 after a prolonged (60 min+) outage. They act on different variables.

ZONE-BASED DECAY TO B0

After activation, decay uses current level zone (not original):
H35→...→H7: FAST (600s/level = 10min/level) — 60 min
H6→H5→H4: MEDIUM (900s/level = 15min/level) — 45 min
H3→H2→H1: SLOW (1200s/level = 20min/level) — 60 min

First drop is immediate. Decay stops at B0. Easing below B0 (−1 level per 1,800s, down to E7) only after 6 hours extra at B0.

Slingshot Relief

Single-shot bitsQ relief
EMERGENCY LIVENESS LAYER (V11 #7,000 / V12 #7,350)

In plain terms: when a block is taking abnormally long to mine, Slingshot gives the difficulty one extra, bounded shove downward so the network finds the next block sooner — then immediately resets. Think of it as a separate emergency brake from the equalizer cascade and the anti-stall decay, built for one job: stop a run of bad luck from compounding into back-to-back stalls when the cascade is already sitting at its E7 floor.

Technically: Slingshot is a single-shot multiplier applied to bitsQ after the avg288 controller and the dynamic cap, then re-clamped to MIN_BITSQ. It is self-resetting — the next block re-evaluates fresh against avg288, so there is no compounding: three slow blocks in a row each receive their own single drop, never drop × drop × drop. It does not replace cASERT, the relief cascade, the DTD lottery or SbPoW.

V12 tier (block 7,350+)fires when current_elapsed >bitsQ drop
T11,200 s (20 min)−6.5%
T21,800 s (30 min)−12.5%
T33,600 s (60 min)−25%
T47,200 s (120 min)−37.5%
T510,800 s (180 min)−50% — catastrophic relief

Strict greater-than at each threshold; the highest crossed tier wins and is applied as a same-block drop. Short blocks never cross even T1, so no relief is given when the chain is already healthy.

V11 PATH · #7,000–7,349

Dual-gate, single tier

The original Slingshot (block 7,000) required two gates: the previous block was slow (prev_elapsed > 1,800 s, 30 min) and the current block is also taking long (current_elapsed > 600 s, 10 min). When both fire: bitsQ = bitsQ_avg288 × 0.875 (−12.5%). The second gate withheld “free relief” once the chain had already recovered.

V12 PATH · #7,350+

Single-gate, 5 tiers

From block 7,350 Slingshot is keyed on a single signal — current_elapsed — across the 5-tier ladder above. The same-block, single-gate design makes the V11 second gate structural: short blocks never reach T1, so relief is only ever given mid-stall. Emergency-only by construction.

SELF-RESETTING

No compounding

Every block re-derives Slingshot from the chain alone (stateless & deterministic — any two nodes compute the same drop). The drop is applied after the avg288 / dynamic-cap clamp and re-clamped to MIN_BITSQ, so it can never push difficulty below the global floor. An additional safety layer above cASERT, the cascade, the lottery and SbPoW — never a replacement.

Exponential Heritage

Properties Inherited from BCH Exponential Retarget
SHARED LINEAGE
PropertyDetail
Exponential moving average formula2^(-td / halflife) — same mathematical approach
Anchor-based calculationUses first block of epoch as anchor reference
Q16.16 fixed-point encodingSame integer representation, no floating point
Global difficulty clampsMIN_BITSQ / MAX_BITSQ bounds enforced
Per-block retargetingEvery block, not every N blocks
Epoch structureBLOCKS_PER_EPOCH = 131,553 blocks (~2.5 years)
Heritage note: cASERT's bitsQ controller originally built on BCH's exponential per-block retarget approach (V1: 48h half-life, V2: 24h half-life with 12.5% delta cap). Since block 5,175, bitsQ uses an avg288-based model with a dynamic cap (block 5,270+) that scales with deviation (0% dead band at ±15s, 0%/0.5%/1.0%/2.0%/3.0% max). Median removed from consensus (block 5,270+). The half-life exponential is preserved for historical blocks only. These changes, combined with the equalizer and anti-stall layers, make cASERT a unified system purpose-built for ConvergenceX.
cASERT Fork History
CONSENSUS UPGRADES
VersionBlockChanges
V1Genesis48h half-life, 6.25% delta cap, ±1 slew rate
V21,45024h half-life, 12.5% delta cap
V34,100Slew rate ±1 → ±3, lag floor (lag/8 minimum profile), improved equalizer responsiveness
V3.14,110Stored profile_index from BlockMeta (prevents slew rate bypass), anti-stall floor set to 7,200s
V44,170Ahead Guard (HISTORICAL, active #4,170–#4,999 only): clamps bitsQ downward change to 1/64 (~1.56%)/block when chain ≥16 blocks ahead. Hysteresis: enter ≥16, exit ≤8
V54,300Anti-stall activation 7,200 s → 3,600 s (60 min) — still current
V65,000Slew rate ±3 → ±1, H10–H35 scale=2 (V6 calibration), H35 hardest (k=20, steps=20, margin=115)
V7 avg2885,175bitsQ switches to avg288-based: avg of last 288 block intervals vs 600s target. Half-life exponential no longer used (preserved for historical blocks only)
V7 dyncap5,270Dynamic cap: 0% dead band (±15s), 0%/0.5%/1.0%/2.0%/3.0% max scaling with deviation. Median removed from consensus (block 5,270+). (5,260–5,269 HISTORICAL: ±30 s with median288 override)
Direct lag5,323Equalizer direct lag map replaces the PID/EWMA selector (now HISTORICAL): target = B0 if lag ≤ 0, else min(lag, ceiling); up immediate, down at least 1 level/block. No bitsQ change.
V8 cliff5,75043-profile table E7–H35 (was 40 profiles E4–H35). HISTORICAL single-step relief valve (5,750–6,549): profile drops to E7 after 605 s without a block. H13 ceiling (was H12). Removes H10/H11 dead-zones during stalls.
V9 staged6,550Staged relief cascade: drop 3 profile levels every 60 s starting at 540 s elapsed. Floor stays at E7. Future-drift cap MAX_FUTURE_DRIFT_STAGED=60 s.
V10 granular6,700Granular relief cascade: drop 1 profile level every 60 s starting at 600 s elapsed. Lag-advance disabled at this height — lag is computed strictly from chain.back().time, validation deterministic w.r.t. block.timestamp. Floor stays at E7. No supply / reward change.
V11 Slingshot7,000Slingshot single-shot bitsQ relief activates (dual-gate, single tier): when prev_elapsed > 1,800 s and current_elapsed > 600 s, bitsQ = bitsQ_avg288 × 0.875 (−12.5%). Self-resetting, no compounding. Additional liveness layer above the relief cascade — see the Slingshot Relief section. Equalizer relief cascade becomes linear (HISTORICAL).
V11 Phase 27,100Consensus surface upgrade alongside cASERT: SbPoW (Signature-Bound PoW) activation — every valid block requires a Schnorr-style signature from the miner identity key over the block header, making pool topologies that delegate work without sharing the key cryptographically self-defeating. DTD lottery activates simultaneously (bootstrap 2-of-3 cadence; the 1-of-3 cadence opens at V11_PHASE2_HEIGHT + LOTTERY_HIGH_FREQ_WINDOW = 7,100 + 5,000 = 12,100 and ran until #25,000 — since V15 the DTD draws on every block, 3-of-3). Equalizer relief cascade becomes triangular with cap 21 levels (HISTORICAL). No change to cASERT bitsQ math or to the equalizer profile table; cASERT continues to feed powDiffQ to ConvergenceX exactly as before. Anti-pool primary defense.
V127,350Equalizer hardening ceiling rises H13 → H20. Active profile set grows from 21 (E7..H13) to 28 (E7..H20). 15 profiles H21..H35 remain reserved for V13. validator_profile_ceiling_at(height) returns H20 from this height. Slingshot reworked to a single-gate 5-tier same-block ladder keyed on current_elapsed (T1 −6.5% @20 min → T5 −50% @180 min). V12 triangular cascade (current): from 540 s elapsed, n = min(1+(elapsed−540)/60, 7), drop n(n+1)/2 — 1/3/6/10/15/21/28 levels, floor E7.
V1312,000Coordinated hard fork combining four consensus-level changes. (1) cASERT equalizer ceiling rises H20 → H35 — the full 43-profile range E7..H35 becomes active for the first time, closing the equalizer calibration started in V6. (2) DTD lottery cooldown 5 → 6: lottery_exclusion_window_at(height) returns 6 for height ≥ V13_HEIGHT, restoring deterministic 2-firing exclusion under the 1-of-3 cadence that ran from block 12,100 (superseded at #25,000 by the every-block 3-of-3 cadence). (3) Future-timestamp drift cap 60 s → 30 s: max_future_drift_at(height) returns 30 for height ≥ V13_HEIGHT — NTP synchronisation strongly recommended post-V13; any host whose clock is more than 30 s ahead of true time will produce blocks that every validator rejects. (4) Beacon Phase II-A activates: BEACON_PHASE2A_ACTIVATION_HEIGHT = V13_HEIGHT. RC1 metadata signed (release_status = signed_metadata_only). DTD flip at 12,100 is automatic and verified.
V1415,000H3/H4 consensus hardening (already in deployed binaries — no node re-update needed). The spend-side Gold Vault governance bundle and the PoPC / Escrow automation once proposed for this height were deferred and never activated: Gold Vault and PoPC are now paused indefinitely / legacy, superseded by the DTD / DTD Jackpot architecture. No cASERT bitsQ or equalizer change.
V14.516,000Atomic-swap HTLC CLAIM/REFUND consensus fix (EVM leg). Functional gate for the on-chain HTLC path. No cASERT bitsQ or equalizer change.
V14.717,000Atomic-swap relay/policy flag-day — mempool relay and standardness rules for HTLC transactions. No cASERT bitsQ or equalizer change.
V1525,000DTD Jackpot goes live. The reserve already accumulated in the Gold Vault + PoPC addresses is redistributed to DTD winners on a 288-block cadence (~48 h), first jackpot at #25,290, base 100 / cap 500 SOST, rollover, draining over ~3 years — supply-neutral (no new emission). Constitutional reserve freeze: those outputs become spendable only by the canonical jackpot transaction (S13). Emission transition — the 25%+25% coinbase allocations now feed the DTD distribution. Atomic-swap dashboard; BTC HTLC code present but gated OFF. No cASERT bitsQ or equalizer change.
V1630,000DTD Jackpot V2. From this height the jackpot becomes an independent, node-gated, linear-PoW-weighted draw: eligibility = an active node identity (NODE_BIND + per-epoch heartbeats) with a valid SbPoW key and ≥3 SbPoW blocks in the last 5,000; win chance is linear in SbPoW blocks. No jackpot cooldown, no anti-dominance. Base 100 / cap 500 SOST, rollover, paid from the existing reserve (supply-neutral). First V2 draw #30,186. Normal DTD is unchanged and does not require any node bind. No cASERT bitsQ or equalizer change.

All forks are forward-only (no regenesis). Nodes enforce fork rules based on block height. Since V13, cASERT’s bitsQ controller and equalizer profile table are unchanged — V14 through V16 are consensus-surface upgrades (atomic swap, DTD Jackpot, DTD Jackpot V2) that add no new bitsQ or equalizer rule. The current cycle runs through V16 at block 30,000 (DTD Jackpot V2; first V2 draw #30,186). Gold Vault and PoPC spend-side governance proposed during the V13/V14 review were deferred and are now paused/legacy, superseded by the DTD / DTD Jackpot architecture.

What is New in cASERT

Novel Components
SOST-SPECIFIC
FeatureDescription
Anti-stall decayDecay activates after 3,600s (60 min, current; 7,200s HISTORICAL before #4,300) without a block — zone-based, proportional, no ceiling
Level systemDiscrete levels (not continuous) for deterministic consensus — any two nodes compute the same level
Floor at B0Chain always gets at least B0 stability requirements, even when behind schedule
Stateless recalculationAny node can compute the cASERT level from the chain alone, no extra state needed
ConvergenceX integrationcASERT adjusts the stability_metric threshold, not the PoW target directly
Contraction coefficientc = 7/10, ensuring d_final <= 0.7 * d_initial + margin
Anti-Stall Mechanism
DECAY PROTOCOL

The anti-stall decay ensures liveness under sudden hashrate loss. If no valid block arrives for DECAY_START seconds, the cASERT hardening is gradually reduced. This decay is deterministic and computed from the timestamp of the previous block, making it fully verifiable by all nodes.

ConditionResponse
Stall < activation thresholdNo decay — cASERT level applies at full scale
Stall >= activation thresholddecay_factor reduces cASERT scale progressively
ResultMining continues even if hashrate drops dramatically
Design rationale: Discrete levels (rather than a continuous function) eliminate consensus ambiguity from rounding differences between implementations. Every conforming node will compute exactly the same level for the same chain state.

Consensus Parameters

Parameter Table
IMMUTABLE CONSTANTS
ParameterValueDescription
BITSQ mode (current)avg288-based (5,175+)Compares avg of last 288 block intervals vs 600s target. Half-life exponential preserved for pre-5175 blocks only
BITSQ dynamic cap0%/0.5%/1.0%/2.0%/3.0% (5,270+)Dead band ±15s (0%), then 0.5% (15–60 s), 1.0% (60–120 s), 2.0% (120–240 s), 3.0% (>240 s). Median removed from consensus (block 5,270+)
Legacy HALF_LIFEV1: 172,800s (48h), V2: 86,400s (24h)Preserved for historical blocks: V1 genesis–1,449, V2 1,450–5,174
Legacy DELTA_CAPV1: 6.25%, V2: 12.5%Preserved for historical blocks: V1 genesis–1,449, V2 1,450–5,174
TARGET_SPACING600s10-minute target between blocks
BLOCKS_PER_EPOCH131,553Blocks per difficulty epoch (~2.5 years)
GENESIS_BITSQ765,730Initial difficulty in Q16.16 (11.6841, calibrated)
MIN_BITSQ65,536Minimum difficulty (1.0 in Q16.16)
MAX_BITSQ16,711,680Maximum difficulty (255.0 in Q16.16)
CASERT_H_MIN / H_MAX-7 / 35Profile range: E7 (deep easing) to H35 (max hardening); 43 profiles. Pre-V12 (#5,750..#7,349): 21 active E7–H13. V12 (#7,350..#11,999): 28 active E7–H20. V13 (#12,000+): 43 active E7–H35 (full range).
CASERT_K_R0.05Instantaneous rate gain (was 0.25) — HISTORICAL (PID/EWMA, bypassed since #5,323)
CASERT_K_L0.40Schedule lag gain — dominant (was 0.10) — HISTORICAL (PID/EWMA, bypassed since #5,323)
CASERT_K_I0.15Integrator gain (was 0.05) — HISTORICAL (PID/EWMA, bypassed since #5,323)
CASERT_K_B0.05Burst score gain (was 0.30) — HISTORICAL (PID/EWMA, bypassed since #5,323)
CASERT_K_V0.02Volatility gain (was 0.10) — HISTORICAL (PID/EWMA, bypassed since #5,323)
SLEW_RATE±1/block (V6+)HISTORICAL (V3: ±3, V6 block 5,000: ±1, until #5,322). Current: up immediate, down at least 1 level/block (direct lag map)
ANTISTALL_FLOOR_V6C3,600s60-minute stall before anti-stall decay activates (current; 7,200s HISTORICAL before #4,300)
SLINGSHOT reliefV11 #7,000 / V12 #7,350Single-shot bitsQ relief. V11: dual-gate −12.5%. V12: 5 tiers on current_elapsed — T1 −6.5% (20m), T2 −12.5% (30m), T3 −25% (60m), T4 −37.5% (120m), T5 −50% (180m). Applied after avg288/dynamic-cap, re-clamped to MIN_BITSQ; self-resetting
ANTISTALL_DECAYzone-basedFirst drop immediate, then H35–H7: 600s/lvl, H6–H4: 900s/lvl, H3–H1: 1200s/lvl. Decays to B0. After 6h at B0: −1 level per 1,800s down to E7.
Safety: behind schedulecap B0Never harden when chain is behind schedule (lag ≤ 0)
Safety: <10 blockscap B0HISTORICAL (PID era): require 10 blocks before any hardening
CX_C_NUM / CX_C_DEN7/10Convergence ratio for stability test
Source reference: All parameters are defined in include/sost/params.h and include/sost/pow/casert.h. These values are consensus-critical and immutable.
Implementation: cASERT is validated as part of the L2 block validation layer (header context checks). See include/sost/block_validation.h for the full consensus pipeline.
🎮