Cubiq Logo

Architecture

Cubiq Network Architecture

Cubiq introduces a revolutionary modular architecture that separates computation, validation, and consensus, enabling mobile devices to participate as first-class citizens in blockchain networks.

Architecture Highlights

Mobile-Native Design
Offloaded Computation
Zero-Knowledge Security

High-Level Architecture

Cubiq Network Architecture

Cubiq's architecture consists of three primary layers that work together to enable mobile-native blockchain participation while maintaining security and decentralization.

Execution Layer

EVM-compatible runtime environment supporting Solidity smart contracts with modifications for ZK constraint compatibility.

Proving Layer

Based on Plonky3, this layer handles proof generation in a cloud-based prover network, enabling scalable zero-knowledge computation.

Consensus & Networking Layer

Lightweight Delegated Proof of Stake (DPoS) consensus managed by mobile-based validators ("Qubes") with gossip-based P2P networking.

Design Principles

Cubiq is guided by five core principles that shape every architectural decision:

Minimal Trust

Every component is verifiable through cryptographic proofs. No black boxes or trusted intermediaries.

Device Inclusivity

Designed to work on low-end Android and iOS phones with limited resources.

Modular Stack

Pluggable consensus, proof systems, and APIs allow independent evolution of components.

Security via ZK

All offloaded computation is verifiable through zero-knowledge proofs.

Key Components

Qubes (Mobile Nodes)

Qubes are lightweight mobile nodes that form the backbone of Cubiq's decentralized network. Each Qube performs several critical functions:

  • Proof Verification: Validates zero-knowledge proofs using optimized WASM verifiers
  • Block Propagation: Participates in gossip-based block distribution
  • Consensus Voting: Votes on block validity through DPoS mechanism
  • Staking: Stakes QUBE tokens to participate in consensus

Performance Specifications

RAM Usage:
< 400 MB
Storage:
< 200 MB
Bandwidth:
< 500 MB/month
Verification:
< 500ms

Cloud Prover Network

The Cloud Prover Network handles computationally intensive zero-knowledge proof generation:

  • Plonky3 Integration: Uses recursive STARK proofs for efficient verification
  • Horizontal Scaling: Multiple provers can work in parallel
  • Geographic Distribution: Provers deployed globally for low latency
  • Proof Bundling: Aggregates multiple transactions into single proofs

Execution Layer

The execution layer provides full EVM compatibility while being optimized for zero-knowledge proof generation:

zkEVM Implementation

  • Solidity Compatible: Supports Solidity 0.8.x with standard EVM opcodes
  • ZK-Optimized: Opcodes restricted to those efficiently provable in Plonky3
  • State Management: Uses sparse Merkle trees for efficient state proofs
  • Gas Model: Modified gas pricing to account for proof generation costs

Smart Contract Execution

Smart contracts on Cubiq execute in a modified EVM environment:

// Example: ZK-compatible smart contract
pragma solidity ^0.8.19;

contract CubiqVoting {
    mapping(address => bool) public hasVoted;
    mapping(uint256 => uint256) public votes;
    
    // ZK-friendly: simple state transitions
    function vote(uint256 proposalId, bool support) external {
        require(!hasVoted[msg.sender], "Already voted");
        
        hasVoted[msg.sender] = true;
        votes[proposalId] += support ? 1 : 0;
        
        emit VoteCast(msg.sender, proposalId, support);
    }
    
    event VoteCast(address voter, uint256 proposalId, bool support);
}

Proving Layer

The proving layer is responsible for generating zero-knowledge proofs that validate state transitions:

Plonky3 Architecture

  • Recursive Proofs: Enables proof composition and aggregation
  • Fast Verification: Optimized for mobile device constraints
  • Small Proof Size: Typically under 2MB per block
  • Parallel Generation: Multiple proofs can be generated simultaneously

Proof Generation Workflow

  1. Block Proposal: Qube proposes a new block with transactions
  2. Execution Trace: Cloud prover simulates all transactions
  3. Circuit Generation: Execution trace is encoded into Plonky3 circuits
  4. Proof Creation: Zero-knowledge proof is generated
  5. zkURL Publication: Proof is published via zkURL protocol

Consensus Layer

Cubiq uses a lightweight Delegated Proof of Stake (DPoS) consensus optimized for mobile participation:

DPoS Mechanics

Validator Selection

  • • Stake-weighted random selection
  • • Minimum 1000 QUBE stake required
  • • Delegation support for smaller holders
  • • Reputation-based bonuses

Consensus Process

  • • 12-second block times
  • • 2/3+ supermajority required
  • • BFT-style finality
  • • Slashing for malicious behavior

zkURL Protocol Design

The zkURL protocol is Cubiq's innovation for decentralized proof distribution:

Protocol Format

zk://[proverID]@[domain_or_hash]/[proof_id]#[metadata]

Example:

zk://prover01@prover.cubiq.org/block/8472934#v1

Security Features

  • Cryptographic Signatures: All proofs signed by registered provers
  • Content Addressing: Proofs identified by cryptographic hashes
  • Replay Protection: Timestamps and nonces prevent replay attacks
  • Fallback Mechanisms: Multiple sources ensure availability

Proof Lifecycle

Understanding how proofs flow through the system:

Proof Flow Diagram

1
Transaction Submission

User submits transaction to mempool

2
Block Proposal

Qube validator bundles transactions into block

3
Proof Generation

Cloud prover generates zkProof using Plonky3

4
zkURL Publication

Proof published to zkURL endpoint for distribution

5
Qube Verification

Mobile Qubes fetch and verify proof locally

6
Consensus & Finality

2/3+ Qubes vote to finalize block

Prover Network Architecture

The Cloud Prover Network is designed for scalability, reliability, and decentralization:

Infrastructure Components

LayerTechnologyPurpose
Execution LayerRust zkEVM emulatorTransaction simulation
Circuit LayerPlonky3 custom circuitsProof generation
Compute LayerGPU-accelerated instancesParallel proving
Storage LayerIPFS / Arweave / CDNProof distribution

Scalability Considerations

Cubiq's architecture is designed to scale to billions of mobile participants:

Horizontal Scaling

  • Prover Parallelization: Multiple provers can work on different blocks simultaneously
  • Geographic Distribution: Provers deployed in multiple regions for low latency
  • Load Balancing: zkURL requests distributed across multiple endpoints
  • Caching Layers: CDN and edge caching for proof distribution

Performance Metrics

Throughput
1000+ TPS

Theoretical maximum with parallel proving

Latency
12s

Block time with instant finality

Participants
6.9B+

Potential mobile device participants

Future Architecture Evolution

Cubiq's modular design enables continuous evolution without breaking changes:

Planned Enhancements

  • Interoperability Bridges: Connect to Ethereum, Polygon, and other chains
  • Advanced Proof Systems: Integration with newer ZK technologies
  • Sharding Support: Horizontal scaling through state sharding
  • AI Integration: Machine learning for network optimization
The architecture described here represents the foundation of Cubiq Network. As the ecosystem grows, new components and optimizations will be added while maintaining backward compatibility and the core principle of mobile-native participation.