Skip to main content
Light Protocol consists of four core on-chain programs that work together to enable ZK compression on Solana. These programs handle state compression, validation, token operations, and access control.

Core Programs

Account Compression

Owns and manages Merkle tree accounts for compressed state

Light System

Validates compressed account operations and state transitions

Compressed Token

SPL Token-compatible program for compressed tokens

Registry

Protocol configuration and forester access control

Program Architecture

The programs follow a layered architecture:

Interaction Flow

  1. Application Layer: Your program or the Compressed Token program creates compressed accounts
  2. Validation Layer: Light System program validates state transitions and ZK proofs
  3. Storage Layer: Account Compression program manages Merkle trees and state
  4. Control Layer: Registry program handles access control and forester coordination

Program Responsibilities

  • Owns all Merkle tree accounts (state trees and address trees)
  • Performs tree operations (append, nullify, update)
  • Manages tree rollovers when capacity is reached
  • Handles batched operations for efficiency
  • Validates program access through registered program PDAs
  • Validates compressed account ownership and signatures
  • Verifies ZK proofs for state transitions
  • Manages CPI context accounts for cross-program calls
  • Enforces state transition rules
  • Coordinates with Account Compression for tree updates
  • Implements SPL Token-compatible interface for compressed tokens
  • Manages both compressed tokens (in Merkle trees) and CToken accounts (decompressed)
  • Handles compression/decompression operations
  • Supports Token-2022 extensions (metadata, transfer fees, etc.)
  • Manages rent for compressible accounts
  • Stores protocol configuration (epochs, fees, network parameters)
  • Manages forester registration and work tracking
  • Wraps Account Compression instructions with access control
  • Handles compressible config accounts for rent management
  • Coordinates decentralized tree maintenance

Program IDs

use solana_sdk::pubkey::Pubkey;

pub const ACCOUNT_COMPRESSION_ID: Pubkey = 
    solana_sdk::pubkey!("compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq");

pub const LIGHT_SYSTEM_ID: Pubkey = 
    solana_sdk::pubkey!("SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7");

pub const COMPRESSED_TOKEN_ID: Pubkey = 
    solana_sdk::pubkey!("cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");

pub const REGISTRY_ID: Pubkey = 
    solana_sdk::pubkey!("Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX");

Security

All Light Protocol programs have been audited:
  • OtterSec - Programs audit #1
  • Neodyme - Programs audit #2
  • Zellic - Programs audit #3
  • Reilabs - Circuits formal verification
View full audit reports in the Light Protocol repository.

Verifiable Builds

All programs are deployed with verifiable builds using solana-verify:
solana-verify verify-from-repo \
  --program-id compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq \
  -u mainnet \
  --library-name account_compression \
  --commit-hash 1cb0f067b3d2d4e012e76507c077fc348eb88091 \
  https://github.com/Lightprotocol/light-protocol

Next Steps

Build Custom Program

Learn how to build programs that use ZK compression

Program Examples

Explore example programs and templates

Build docs developers (and LLMs) love