IPPAN

L2 Architecture

Minimal L1, Smart Contracts on L2

IPPAN implements a minimal L1, smart contracts on L2 architecture that keeps the base layer ultra-fast while enabling arbitrary programmability. This design maintains L1's 1-10M TPS target while adding comprehensive L2 capabilities.

Design Philosophy

Core Principles

L1 = Deterministic Core

Focus on payments, handles, DHT, and validator operations. The base layer maintains ultra-fast performance for core blockchain functions while providing settlement guarantees and exit mechanisms.

L2 = Smart Contracts

Enable arbitrary programmability via ZK rollups, optimistic rollups, and app-chains. L2s can handle unlimited smart contract complexity without affecting L1 performance.

L1 Only Verifies

Verify succinct proofs/commitments and enable exits. The base layer focuses on verification rather than execution, maintaining its speed and efficiency.

Performance First

Maintain L1's 1-10M TPS target while adding L2 capabilities. This architecture ensures scalability without compromising on core performance.

Architecture Components

Core L2 System

L2 Transaction Types

L2CommitTx

l2_id: L2 network identifier
epoch: L2 epoch/batch number
state_root: Merkle root after applying batch
da_hash: Data availability hash
proof_type: ZK, optimistic, or external

L2ExitTx

l2_id: L2 network identifier
epoch: L2 epoch number
proof_of_inclusion: Merkle/zk membership proof
account: Recipient on L1
amount: Amount to exit

Proof Types

ZK Groth16

Zero-knowledge proofs

Finality: Instant (no challenge window)
Use Case: High-value, privacy-sensitive applications

Optimistic

Optimistic rollups

Finality: After challenge window expires
Use Case: High-throughput, cost-effective applications

External

External attestations

Finality: Based on external verification
Use Case: Hybrid systems, off-chain computation

Data Availability Modes

Inline DA

Store data directly in L1 transaction

Pros: Immediate availability, no external dependencies
Cons: Higher L1 costs, limited by block size
Max Size: Configurable (default: 16 KB)

External DA

Store only hash reference on L1

Pros: Lower L1 costs, unlimited data size
Cons: Requires external data availability
Use Case: Large data sets, cost-sensitive applications

Benefits

Why L2-on-Top Architecture

🚀

Scalability

L2s can handle unlimited smart contract complexity

Performance

L1 remains ultra-fast for core operations

🔧

Flexibility

Multiple proof systems and DA modes supported

🛡️

Security

L1 provides settlement guarantees and exit mechanisms

Getting Started

Quick Setup Guide

Build with L2 Support

Basic L2 support:

cargo build --features crosschain

With ZK proof support:

cargo build --features "crosschain zk-groth16"

Run L2 tests:

cargo test --test l2_commit_exit