Overview
zkCompression integrates Light Protocol to enable ZK Compression on Solana, allowing you to compress SPL tokens and reduce storage costs by up to 5000x.How It Works
- Compress: Regular SPL tokens are converted to compressed tokens stored in a Merkle tree state.
- Store: Only the Merkle root is stored on-chain, dramatically reducing costs.
- Decompress: Compressed tokens can be decompressed back to regular SPL tokens at any time.
Cost Comparison
| Operation | Regular SPL | Compressed |
|---|---|---|
| Token Account | ~0.002 SOL | ~0.00002 SOL |
| Transfer | ~0.000005 SOL | ~0.000001 SOL |
| Storage per token | ~165 bytes | ~0.165 bytes |
Terminal Commands
Show Help
Compress SOL
Decompress SOL
Create Compressed Token
Mint Compressed Tokens
Transfer Compressed Tokens
Check Balance
Account Info
Airdrop
View Token Portfolio
API Reference
Compress SOL
Decompress SOL
Create Compressed Token
Get Account Info
Technical Details
Light Protocol Integration
zkCompression uses the following Light Protocol packages:Wallet Security
zkCompression implements wallet mutex locking and private key zeroization for security:- Mutex locking prevents concurrent wallet access
- Private keys are zeroized from memory after use
- Automatic retry polling for RPC indexer sync
- Auto-create Associated Token Account during decompression
RPC Configuration
zkCompression uses Helius RPC with Light Protocol extensions:Error Handling
| Error | Cause | Solution |
|---|---|---|
Account not found | ATA doesn’t exist | Auto-created during decompression |
Insufficient balance | Not enough tokens | Check balance with zk tokens |
RPC indexer sync | Indexer lag | Automatic retry polling handles this |