L2PS (Layer 2 Privacy Subnet) Framework
L2PS is a privacy-preserving transaction layer that enables encrypted transactions on the Demos Network. Unlike public L1 transactions, L2PS transactions are encrypted client-side and only decrypted by authorized network participants.Key Features
Client-Side Encryption
Transactions are encrypted with AES-GCM (32-byte key, 12-byte IV, authentication tag) in your browser before leaving your device.
Batch Rollups
Multiple L2PS transactions are bundled into a single L1 transaction per block.
ZK Proofs
PLONK zero-knowledge proofs verify batch validity without revealing content.
Authenticated History
Only address owners can access their private transaction history via cryptographic signatures.
How It Works
Transaction Flow
1
Client Encrypts
Transaction is encrypted with the shared AES-GCM key (32 bytes) and IV (12 bytes) in the browser before transmission.
2
L2PS Node Decrypts
Node receives encrypted blob, decrypts, validates signature and balance.
3
Batch Aggregator
Bundles up to 10 transactions per L1 block with ZK proof.
4
L1 Submission
Single L1 batch transaction submitted to blockchain.
Privacy Model
Transaction Lifecycle
Every L2PS transaction progresses through three stages:Executed
Instant - Local node decrypts, validates against L1 state, reserves balance.
Batched
Per L1 block - Transaction included in batch with ZK proof generated.
Confirmed
Final - L1 block confirmed, transaction is immutable on blockchain.
Transaction Fee
Each L2PS transaction costs 1 DEM. This creates a deflationary mechanism while ensuring fair access to privacy features.
Architecture Components
Network Participation
To participate in an L2PS network, nodes must:- Have the shared AES-GCM key (32 bytes / 64 hex chars) and IV (12 bytes / 24 hex chars)
- Be configured with the correct L2PS UID
- Store and sync the L2PS mempool with other participants
Next Steps
Transaction Handling
Learn how L2PS transactions are processed
Quick Start
Set up L2PS from scratch
POC App
Interactive demo app for testing L2PS