Back to Whitepaper

Anatoly's Thinking

Анатолий — Systems Architecture Lead
Moscow, Russia

Russia Consensus & P2P Systems
Perspective

The Consensus Problem

Every blockchain is, at its core, a solution to a coordination problem: how do a group of machines that don't trust each other agree on a single version of truth? Bitcoin solved this with elegant simplicity — the longest chain wins. Proof-of-work makes it computationally expensive to create a fake chain, so the honest majority always controls the canonical history.

The Syrpts Network inherits this model but faces a unique challenge: we're not just tracking one currency. We're tracking thousands of custom tokens, each with their own supply, their own liquidity pool, and their own market dynamics. The consensus mechanism must validate not just "did this transfer happen?" but "is this trade price mathematically consistent with the constant-product formula?"

Design Decisions

Why Hybrid Architecture

Pure decentralization is an ideology. Practical decentralization is an engineering trade-off. I chose the hybrid Primary/Replica model because it gives us the best of both worlds:

Why a Primary Node?

Why Peer Replicas?

Architectural Principle: The primary node is a performance optimization, not a trust assumption. The peer network is the trust anchor. If you remove the primary, the network slows down but doesn't stop. If you remove all peers, the primary still works. Both must be compromised simultaneously to attack the network.
Difficulty Algorithm

The Syrpts DAA

Bitcoin adjusts difficulty every 2,016 blocks (roughly two weeks). This works for a mature network with stable hashrate, but it's dangerously slow for a young network where hashrate can fluctuate by 10x in a single day.

The Syrpts Difficulty Adjustment Algorithm adjusts every 10 blocks. The logic is intentionally simple:

if (actual_time < expected_time / 2) → harder if (actual_time > expected_time × 2) → easier otherwise → no change Floor: difficulty can never drop below 2

The 2× and ½× thresholds prevent oscillation. Without them, the difficulty would ping-pong between values on every adjustment. The thresholds create a "dead zone" where the difficulty stays stable unless there's a significant hashrate change.

I considered more sophisticated algorithms (ASERT, LWMA, weighted moving averages), but simplicity won. A simple algorithm is auditable. An auditable algorithm is trustworthy. A trustworthy algorithm is secure.

Chain Reorganization

Fork Resolution

When a peer node presents a longer valid chain, the primary must decide whether to adopt it. The resolveConflict() function implements the longest-chain rule with strict validation:

  1. The incoming chain must be strictly longer than the current chain (not equal)
  2. Every block in the incoming chain must pass the validator using the current live difficulty (not the difficulty recorded in the block headers)
  3. If validation passes, the current chain is replaced, the database is truncated and rebuilt, and the state is recomputed from scratch

Step 2 is critical. Early implementations validated each block against its own recorded difficulty, which allowed an attacker to submit a long chain of easy blocks. By validating against the current difficulty, we ensure that any reorganization requires the same computational effort as the honest chain.

Anatoly's Principle: "The security of a consensus algorithm is not measured by how hard it is to break. It is measured by how expensive it is to try."