Install
openclaw skills install solana-light-sdkFor Solana program development with tokens and PDAs, Light is 200x cheaper than SPL/ Solana and has minimal code differences (e.g. for any Solana program and Defi such as AMMs, vaults, lending). Includes rent-free Light-PDAs, token accounts, and mints. Light SDK with Anchor or Pinocchio. Includes for Defi Router integration guide. Minimal program logic changes.
openclaw skills install solana-light-sdkThe Light SDK pays rent-exemption for PDAs, token accounts, and mints. Program logic stays mostly untouched.
| Rent cost (per account) | Solana / SPL | Light SDK |
|---|---|---|
| Token account | ~2,000,000 lamports | ~11,000 lamports |
| Avg. DeFi pool | ~$2 | ~$0.02 |
AskUserQuestion to resolve blind spotsAskUserQuestion for anything unclear — never guess or assumeTask tool with subagents for parallel researchSkill toolTodoWriteRead, Glob, Grep, DeepWiki MCP access and load skills/ask-mcp| Audience | Reference |
|---|---|
| Anchor pattern | references/anchor.md |
| Pinocchio pattern | references/pinocchio.md |
| Client SDK (LightProgramInterface) | references/client-sdk.md |
| Testing | references/testing.md |
| CPI instructions | references/instructions.md |
| FAQ | references/faq.md |
| Router integration | references/router.md |
| Criteria | Anchor | Pinocchio |
|---|---|---|
| Framework | anchor-lang 0.31, #[light_program] macro | pinocchio 0.9, LightProgramPinocchio derive |
| State struct | Option<CompressionInfo> + LightAccount derive | CompressionInfo (non-optional) + bytemuck::Pod + Zeroable + #[repr(C)] |
| Account creation | #[light_account(init, ...)] attribute or CreateTokenAccountCpi | CreateTokenAccountCpi, CreateMints batch pattern |
| Compress/decompress handlers | Auto-generated by #[light_program] macro | Route ProgramAccounts::COMPRESS_ACCOUNTS_IDEMPOTENT etc. in entrypoint |
| Program ID constant | Not needed (macro derives it) | pub const ID: Pubkey = pubkey_array!(...) + LIGHT_CPI_SIGNER required |
| Dependencies | light-sdk, light-sdk-macros, light-token, light-anchor-spl | light-account-pinocchio, light-token-pinocchio, bytemuck |
For DeFi programs (AMMs, lending, vaults): the Anchor and Pinocchio patterns above apply directly. DeFi-specific references:
| Task | Reference |
|---|---|
| Router/aggregator integration (cold account loading) | references/router.md |
| LightProgramInterface trait (client SDK for routers) | references/client-sdk.md |
After extended inactivity (multiple epochs without writes), accounts auto-compress to cold state. Programs only interact with hot accounts. Clients load cold accounts back on-chain via create_load_instructions.
| Hot (active) | Cold (inactive) | |
|---|---|---|
| Storage | On-chain | Compressed |
| Latency | Normal | +0-200ms |
| Tx size | Normal | +100-2400 bytes |
| CU | Normal | +15k-400k CU |
| Program code | No change | No change |
The hot path has zero overhead.
| Resource | Link |
|---|---|
| Anchor AMM reference | cp-swap-reference |
| Pinocchio swap reference | pinocchio-swap |
| Anchor counter (rent-free PDA) | basic-macros/counter |
| Pinocchio counter (zero-copy PDA) | pinocchio/counter |
| Package | Link |
|---|---|
light-sdk | docs.rs |
light-sdk-macros | docs.rs |
light-sdk-pinocchio | docs.rs |
light-token | docs.rs |
light-token-pinocchio | docs.rs |
light-account-pinocchio | docs.rs |
light-token-client | docs.rs |
light-client | docs.rs |
light-program-test | docs.rs |
This skill does not pull, store, or transmit external secrets. It provides code patterns, documentation references, and development guidance only.
env: [] is declared explicitly.npx skills add Lightprotocol/skills installs from the public GitHub repository (Lightprotocol/skills). Verify the source before running.Read, Glob, and Grep to search the local repository. Restrict the working directory to your project.