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
INSPIRED BY BCH ASERT (2020)

cASERT's bitsQ primary controller uses an exponential moving average inspired by BCH's ASERT algorithm (designed by Mark Lundeberg and Jonathan Toomim, November 2020 hard fork). cASERT was designed by NeoB for SOST Protocol (2026), unifying the exponential controller with equalizer profiles and anti-stall decay into a single 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_HALF_LIFE172,800s (48 hours)
Per-block delta cap6.25%
TARGET_SPACING600s (10 minutes)
Key principle: The bitsQ controller is anchor-based. The difficulty for any block can be computed directly from the anchor block and the elapsed time, without iterating through intermediate blocks. This makes it stateless and resistant to manipulation of intermediate timestamps.

cASERT Architecture

cASERT is a unified three-layer consensus-rate control system: (1) the bitsQ primary controller provides exponential difficulty adjustment, (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.

Equalizer Profiles (E4–H9)
5-SIGNAL EWMA CONTROLLER
ProfileH=ScaleKStepsMarginCompute
E4-41322806
E3-31332409
E2-213422512
E1-114420516
B0014418516
H1+114517020
H2+215516025
H3+315615030
H4+416614536
H5+525514050
H6+625613560
H7+726613072
H8+826712584
H9+927712098
H10+10376115126
H11+11377110147
H12+12387105168

17 profiles E4(-4) through H12(+12). Active: E4–H9 (CASERT_H_MAX=9). H10–H12 defined in code but capped at H9. Compute = scale × k × steps (relative CX work multiplier).

BIDIRECTIONAL

Easing & Hardening

The equalizer operates bidirectionally: E4–E1 ease stability (only after 6h extra at B0), B0 is the baseline, H1–H9 harden when blocks are fast. H10–H12 are defined but capped at H9. Safety rules cap at B0 when behind schedule or with <10 blocks. Slew rate: ±1 profile level per block.

17 PROFILES

Independent Tuning

17 profiles E4(-4) through H12(+12). 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. H10–H12 are defined in code but capped at H9.

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: dynamic — max(ahead × 600s, 2h). Easing profiles E1–E4 activate only after 6 hours extra at B0. This prevents mining deadlock when hashrate drops suddenly.

ZONE-BASED DECAY TO B0

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

Decay stops at B0. Easing E1–E4 only after 6 hours extra at B0.

BCH ASERT Heritage

Properties Inherited from BCH ASERT
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 is inspired by BCH ASERT's exponential approach but uses a 48h half-life (vs BCH's 24h) and a 6.25% per-block relative delta cap. These changes, combined with the equalizer and anti-stall layers, make cASERT a unified system purpose-built for ConvergenceX.

What is New in cASERT

Novel Components
SOST-SPECIFIC
FeatureDescription
Anti-stall decayDecay activates after max(ahead 00D7 600s, 7200s) without a block 2014 proportional, no ceiling
Level systemDiscrete levels (not continuous) for deterministic consensus — any two nodes compute the same level
Floor at L1Chain always gets at least L1 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_HALF_LIFE172,800s48-hour half-life for bitsQ exponential adjustment
BITSQ_DELTA_CAP6.25%Per-block relative delta cap for bitsQ adjustment
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-4 / 9Profile range: E4 (deep easing) to H9 (max hardening); H10–H12 defined but capped
CASERT_K_R0.05Instantaneous rate gain (was 0.25)
CASERT_K_L0.40Schedule lag gain — dominant (was 0.10)
CASERT_K_I0.15Integrator gain (was 0.05)
CASERT_K_B0.05Burst score gain (was 0.30)
CASERT_K_V0.02Volatility gain (was 0.10)
SLEW_RATE±1/blockMax profile change per block (prevents oscillation)
ANTISTALL_FLOOR7,200s2-hour minimum before anti-stall decay activates
ANTISTALL_DECAYzone-basedH9–H7: 600s/lvl, H6–H4: 900s/lvl, H3–H1: 1200s/lvl. Decays to B0. E1–E4 after 6h at B0.
Safety: behind schedulecap B0Never harden when chain is behind schedule (lag ≤ 0)
Safety: <10 blockscap B0Require 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.