2.5k
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
3 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill solana-rent-free-dev- _meta.json471 B
- skill.md31.4 KB
Overview
This skill provides a complete toolkit for building rent-free Solana programs and clients using Light Protocol primitives. It covers TypeScript and Rust client development plus Rust program work across Anchor, native Rust, and Pinocchio, with focused patterns for DeFi, payments, airdrops, and nullifier-based ZK apps. Use it to dramatically lower account creation cost and runtime compute for token and PDA workflows while keeping standard program logic.
How this skill works
The skill exposes client SDKs and program helpers that swap traditional SPL/mint/PDA patterns for Light Token, Light-PDA, Compressed Token, and Compressed PDA primitives. Clients perform mint/ata creation, transfers, and sponsored rent flows; programs are annotated to derive light accounts and pay rent sponsorship via the Light System. Accounts automatically compress when inactive and can be loaded back on-demand via create_load_instructions.
When to use it
- Launch a token or payments system that must minimize per-account rent and CU costs
- Migrate DeFi program state (AMM pools, vaults) to rent-sponsored PDAs with minimal code changes
- Run large airdrops or token distributions without upfront rent costs using Compressed Token
- Implement per-user nullifiers for privacy-preserving payments or ZK applications
- Test and debug light-enabled programs locally on devnet/localnet before mainnet rollout
Best practices
- Prefer Light Token for general-purpose tokens; use Compressed Token only for airdrops/distribution
- Use Light-PDA for shared program state like pools and vaults; avoid Compressed PDA for shared/config accounts
- Annotate state structs and accounts (LightAccount/LightAccounts) and mark programs with #[light_program] to keep instruction logic unchanged
- Resolve all user intent and permissions before execution; ask questions rather than guessing
- Test on devnet/localnet workflows that involve compression/decompression and sponsored-rent expiration
Example use cases
- A payments backend that mints, transfers, and tracks balances with rent-free token accounts and nullifiers to prevent double-spend
- A DeFi AMM migration that replaces PDAs with Light-PDA to cut storage cost by ~98% without changing instruction handlers
- Large-scale airdrop or token distribution that leverages Compressed Token to avoid paying rent per recipient
- A privacy-preserving ZK application using Compressed PDA nullifiers to record spent tokens without permanent rent
- Streaming account state and load-on-demand flows for low-cost, high-throughput mobile wallet integrations
FAQ
Light Token is functionally equivalent for common token operations but stores mints and token accounts more efficiently; use Light Token for most cases and SPL compatibility remains supported where needed.
When should I use Compressed PDA versus Light-PDA?
Use Light-PDA for shared program state like pools and vaults. Use Compressed PDA for per-user state, nullifiers, DePIN nodes, or stake accounts—not for shared/config accounts.