Skip to main content
Proof of Stake Voting (PoSV) is Viction’s innovative consensus mechanism that combines the security of Proof of Stake with a democratic voting system. It enables fast block times, low fees, and strong security guarantees.

Overview

PoSV is designed to overcome the limitations of traditional Proof of Work while maintaining decentralization:
  • 2-Second Block Time: Fast transaction confirmation
  • 150 Masternodes: Fixed validator set elected by VIC token holders
  • Double Validation: Enhanced security through paired validation
  • True Randomization: Fair validator selection process

Consensus Parameters

The PoSV consensus is configured with the following key parameters (from params/config.go):

Mainnet Configuration

Testnet Configuration

Testnet uses identical parameters to mainnet for consistency:
The Gap parameter creates a preparation period before the next epoch begins, allowing nodes to update their masternode lists.

Block Production Process

1. Masternode Selection

Masternodes take turns producing blocks in a deterministic round-robin order:
The turn calculation (from consensus/posv/posv.go:580-612):

2. Block Creation

When it’s a masternode’s turn:
  1. Prepare Header: Set timestamp, difficulty, and extra data
  2. Include Transactions: Select transactions from the mempool
  3. Execute State Transition: Process all transactions and update state
  4. Sign Block: Create cryptographic signature using masternode’s private key
  5. Broadcast: Propagate block to the network

3. Block Validation

Each block must pass multiple validation checks:

Basic Validation

  • Timestamp is valid (not in the future, respects period)
  • Difficulty matches expected value
  • Extra data contains proper signatures
  • No uncles (PoSV doesn’t support uncles)
  • Valid gas limit and usage

Creator Authentication

The block creator is verified by recovering the signer from the block signature:

Double Validation

Double validation is a key security feature that requires two masternodes to validate each block.

M1-M2 Pairing

  • M1 (Creator): The masternode that creates and proposes the block
  • M2 (Validator): The assigned masternode that validates and co-signs the block

Validator Assignment

Validator pairs are determined at each epoch and stored in checkpoint blocks:

Validation Process

  1. M1 creates block and signs it
  2. M2 receives the block and validates:
    • All transactions are valid
    • State transition is correct
    • Block follows consensus rules
  3. M2 adds validator signature to block header
  4. Block is considered valid only with both signatures
Blocks produced after epoch 2 (block 1,800) must contain a valid validator signature or they will be rejected.

Failure Handling

If M2 fails to validate:
  • Block is not propagated
  • M1 may be penalized if repeatedly creating invalid blocks
  • Network waits for next masternode’s turn
  • Failed validations count toward penalty calculation

Difficulty Calculation

Viction uses difficulty to prioritize blocks when forks occur:
In-turn difficulty: When it’s exactly your turn, difficulty is maximized (150 for 150 masternodes). Out-of-turn difficulty: When it’s not your turn, difficulty decreases based on how far you are from your turn.
Higher difficulty blocks are preferred during fork resolution, ensuring the correct masternode’s block is chosen.

Epoch System

An epoch is a fixed period of 900 blocks (~30 minutes with 2-second blocks).

Checkpoint Blocks

Every 900 blocks, a checkpoint block is produced:

Checkpoint Block Structure

Extra Data Format:
Special Fields:
  • Coinbase: Must be zero address for checkpoint blocks
  • Penalties: Byte array of penalized masternode addresses
  • Validators: Encoded M1-M2 validator pairs

Masternode List Updates

At checkpoint blocks:
  1. Retrieve New Masternodes: Query masternode smart contract
  2. Apply Penalties: Remove penalized masternodes from active set
  3. Update Snapshot: Store new masternode list in snapshot
  4. Encode in Header: Include masternode addresses in extra data

Penalty System

Masternodes that fail to perform their duties are automatically penalized.

Penalty Triggers

  • Missing block creation when it’s their turn
  • Failing to validate blocks as assigned M2
  • Creating invalid blocks
  • Extended downtime or network issues

Penalty Duration

Penalized masternodes are excluded for multiple epochs:

Penalty Recording

Penalties are recorded in checkpoint block headers:
Masternodes must maintain 99%+ uptime to avoid penalties. Repeated penalties can result in losing masternode status.

Reward Distribution

Block rewards are distributed at each checkpoint (every 900 blocks).

Reward Structure

  • Block Reward: 250 VIC per block
  • Distribution: Shared among masternodes and voters
  • Foundation: Portion allocated to foundation wallet

Reward Calculation

Rewards are calculated based on:
  • Number of blocks signed in the epoch
  • Validator participation
  • Voting weight
  • Penalties applied

Finality

Viction achieves fast finality through several mechanisms:

Soft Finality

  • After 1 Block: Very high confidence (~99%)
  • After 2 Blocks: Extremely high confidence due to double validation

Hard Finality

  • After Checkpoint: Absolute finality at epoch boundaries (900 blocks)
  • Snapshot Stored: State snapshot makes reorganization prohibitively expensive

Snapshot System

The consensus engine maintains snapshots for efficient operation.

Snapshot Contents

Snapshot Storage

Snapshots are stored:
  • In-Memory: Last 128 snapshots cached in LRU cache
  • On-Disk: Snapshots at checkpoint blocks persisted to database
  • Key Format: posv-{block_hash}

Snapshot Usage

  • Fast block validation (no need to replay history)
  • Quick masternode list lookup
  • Efficient sync for new nodes
  • Fork resolution

Security Considerations

Attack Resistance

51% Attack: Requires controlling 76+ of 150 masternodes (significant capital requirement) Nothing-at-Stake: Prevented by masternode staking and penalty system Long-Range Attack: Mitigated by checkpoint finality and social consensus DDoS Attack: Double validation means attacker must target both M1 and M2

Network Assumptions

  • At least 67% of masternodes are honest and online
  • Network latency is reasonable (<1 second for propagation)
  • Clock synchronization within acceptable bounds