Skip to main content

HyperSync Consensus

HyperSync is the consensus protocol powering Vexidus. It uses weighted leader rotation with Byzantine fault tolerance, where validators take turns proposing blocks based on stake weight and performance score.

How It Works

  1. Leader selection uses blake3(block_height + validator_set_hash) seeded randomness
  2. Weight = stake * performance_score (0.5-1.0 range)
  3. Leader proposes block containing up to 10,000 transactions
  4. Block is gossiped to all peers via GossipSub (QUIC transport, TLS 1.3)
  5. Validators verify proposer signature (Ed25519) and execute transactions
  6. Block finalized after gossip consensus

Block Production

  • 12-second block intervals (configurable via --block-time)
  • Pressure-aware micro-blocks: 2s normal, 1s high load, 500ms extreme
  • Up to 10,000 transactions per block (configurable via --max-txs-per-block)
  • Failover blocks: Non-leader validators produce empty blocks to maintain chain continuity

Validator Economics

ParameterValue
Minimum stake1,000 VXS
Unbonding period21 days
Max active validators100 (configurable)
Epoch duration300 seconds
Commission range0-50%

Block Rewards

~65M VXS emitted over 10 years (~4% of total supply):

PeriodAnnual EmissionPer-Block (at 12s)
Year 1-213M VXS/yr~4.94 VXS
Year 3-56.5M VXS/yr~2.47 VXS
Year 6-103.9M VXS/yr~1.48 VXS
Year 11+00

Transaction Fees

  • 100% of fees go to the block proposer (no burn -- fixed supply)
  • Gas price: 10 nanoVXS per gas unit (configurable via --gas-price)
  • Typical transfer cost: 0.00021 VXS ($0.0002 at $1/VXS)

No Slashing -- Jailing Instead

Vexidus does not slash validator stake. Misbehaving validators are jailed (removed from rotation after consecutive missed blocks). This protects delegators from losing funds while still incentivizing uptime.

  • Jailing threshold: 50 consecutive missed blocks
  • Jail duration: 5 minutes cooldown
  • Unjail: Submit vex_unjail after cooldown expires
  • Upgrade grace period: 100 blocks (~200s) after upgrade halt -- prevents jailing validators for upgrading

Bad actors lose opportunity cost (missed rewards) and reputation, not principal.

Reputation Scoring

Validator reputation uses a 7-factor, 100-point scoring system that affects leader selection weight and future reward multipliers.

FactorWeightMeasures
Uptime25 ptsBlock production consistency
Commission fairness15 ptsReasonable rates, stability
Self-stake15 ptsSkin in the game
Governance participation15 ptsUpgrade voting activity
Tenure10 ptsTime active on network
Delegator trust10 ptsStake attracted from others
Reliability10 ptsHistorical jail count, missed blocks

Reputation Grades

GradeScore Range
A+95-100
A90-94
B75-89
C55-74
D35-54
F0-34

New validators start at score 50 (neutral, "unproven"). A validator doing everything right reaches 80+ in ~7 days and 90+ in ~30 days.

Consensus Security

  • Byzantine Fault Tolerance: Tolerates up to 1/3 malicious validators
  • Block Proposer Signatures: Every block is Ed25519-signed by its proposer. Invalid signatures result in instant peer banning.
  • PeerGuard: Per-peer scoring system with replay detection (200-hash ring buffer), rate limiting, and validator allowlisting. Score drops to 0 = permanent ban.
  • Validator Set from State: No self-adding. Validators loaded from on-chain staking state only.

P2P Transport

  • QUIC: TLS 1.3 + multiplexing over UDP. Replaced TCP+Noise+Yamux.
  • GossipSub: Explicit peers for small networks, flood_publish enabled.
  • Bulk Sync: Custom SyncCodec with 64MB response limit, 60s timeout, batch size 10.
  • Bundle TTL: 120s default. Mempool rejects expired bundles on add, skips on drain.

Block Commit Pipeline

begin_block()
|
execute bundles + rewards
|
commit_block() (WriteBatch -- atomic)
|
recompute_state_root()
|
flush()

All block writes (accounts, validators, blocks, explorer indexes, intent status) are buffered during block scope and committed atomically via RocksDB WriteBatch. Crash-safe -- no partial state.

CLI Flags

FlagDefaultDescription
--validator-key <path>noneEd25519 signing key for block/vote signing
--block-time <secs>12Block production interval
--max-txs-per-block <N>10000Maximum transactions per block
--min-validators <N>1Minimum validators required
--gas-price <N>10Base gas price in nanoVXS/gas
--reject-unsigned-bundlesfalseReject unsigned transaction bundles
--no-leader-checkfalseDisable leader rotation (solo testnet only)