Skip to content

Latest commit

 

History

History
286 lines (200 loc) · 10.4 KB

File metadata and controls

286 lines (200 loc) · 10.4 KB
title FAQ
description Frequently asked questions about light token, PDA accounts, and use cases.
keywords
spl token vs light token comparison
token 2022 vs light token differences
rent exemption on solana explained
token account cost on solana
light pda vs compressed pda
rent free pda solana
solana pda cost
compressed accounts solana

import { CodeCompare } from "/snippets/jsx/code-compare.jsx"; import ExtensionsTable from "/snippets/extensions-table.mdx"; import CompressibleRentExplained from "/snippets/compressible-rent-explained.mdx"; import RentSponsorshipExplained from "/snippets/rent-sponsorship-explained.mdx"; import { RentLifecycleVisualizer } from "/snippets/jsx/rent-lifecycle-visualizer.jsx"; import { splCreateAtaCode, lightCreateAtaCode, } from "/snippets/code-samples/code-compare-snippets.jsx"; import RentSponsorshipCost from "/snippets/cost-tables/rent-sponsorship-cost.mdx"; import TokenCreationCost from "/snippets/cost-tables/token-creation-cost.mdx"; import CuPerformance from "/snippets/cost-tables/cu-performance.mdx"; import LightPdaCost from "/snippets/cost-tables/light-pda-cost.mdx"; import CompressedPdaCost from "/snippets/cost-tables/compressed-pda-cost.mdx";

Rent Sponsorship

Rent sponsorship is a built-in feature of the Light SDK’s that sponsors rent-exemption for all account types to reduce creation cost: mints, token accounts, and PDAs. This is dealt with under the hood in a way that doesn’t disrupt the UX of what your users are used to with SPL-token.

Set the payer parameter to the sponsor's public key on any Light Token instruction. The sponsor pays SOL for rent top-ups and transaction fees while the user only signs to authorize the transfer.

const ix = createLightTokenTransferInstruction(
  senderAta,
  recipientAta,
  sender.publicKey,
  amount,
  sponsor.publicKey, // sponsor pays rent top-ups and transaction fees
);

await sendAndConfirmTransaction(rpc, tx, [sponsor, sender]);

Light Token Program

Light token is a high-performance token standard that is functionally equivalent to SPL, but stores mint and token accounts more efficiently. This reduces account creation cost while being more CU efficient than SPL on hot paths.

Creation Cost

CU Performance

Yes! Light Token is live on Solana mainnet. Start integrating with the Quickstart and Toolkits.

For token distribution use cases (airdrops, claims), see Compressed Tokens, supported by leading wallets such as Phantom and Backpack.

No. The light-token-sdk methods are a superset of the SPL-token API — every SPL operation (transfer, approve, revoke, freeze, thaw, burn, close) plus unified balance aggregation, automatic load/decompress, wrap/unwrap, and cross-program dispatch. See "What does 'superset of the SPL-token API' mean?" below for details.

Light SPL
**Get/Create ATA** getOrCreateAtaInterface() getOrCreateAssociatedTokenAccount()
**Derive ATA** getAssociatedTokenAddressInterface() getAssociatedTokenAddress()
**Transfer** transferInterface() transferChecked()
**Get Balance** getAtaInterface() getAccount()
Side-by-side mapping of every Light Token instruction against its SPL/Solana equivalent.

The Light Token SDK covers every SPL Token operation and adds extra capabilities:

Category What it does
**Cross-program dispatch** `Interface` methods (e.g., `transferInterface`) auto-detect the token program and dispatch to SPL, Token 2022, or Light Token.
**Unified balance** `getAtaInterface` returns a unified balance for a given mint, aggregating Light Token (hot + cold), SPL, and Token 2022 sources.
**Wrap / Unwrap** For interoperability with applications that don't support Light Token yet, you can wrap / unwrap SPL or Token 2022 tokens into Light Token associated token accounts and back.
Side-by-side mapping of every Light Token instruction against its SPL/Solana equivalent.

Yes, light-token accounts can hold tokens from light, SPL, or Token 2022 mints.

SPL tokens can be deposited into light-token accounts and withdrawn back to SPL token accounts via the transferInterface method.

The token standard pays rent-exemption cost for you. To prevent griefing, "rent" is paid over time to keep an account in memory. This is dealt with under the hood in a way that doesn't disrupt the UX of what your users are used to with SPL-token.

The account is automatically compressed. Your tokens are cryptographically preserved as a compressed token account (rent-free). The account is loaded into hot account state in-flight when someone interacts with it again.

Light Token supports 16 Token-2022 extensions. Some have restrictions.

Additional extensions can be requested.

  • light-token: Solana account that holds token balances of light-mints, SPL or Token 22 mints.
  • Compressed token: Compressed account storing token data. Rent-free, for storage and distribution.

PDA Accounts

A standard Solana PDA with sponsored rent-exemption. Seeds, bump derivation, and invoke_signed work the same way. Your instruction handlers for reads, updates, and closes don't change.

A compressed account with a derived address. Programs invoke the Light System program instead of the System program to create and update compressed accounts. Compressed PDAs are always compressed and require a validity proof for every read and write.

Light-PDA Compressed PDA
Storage On-chain; auto-compresses when inactive Always compressed
Validity proof Not required Required for every read and write
Program changes Minimal changes. Leaves program logic mostly untouched. Custom Logic
Best for Shared state: DeFi pools, vaults, config, program-owned accounts Per-user state: profiles, credentials, DePIN nodes, nullifiers

<Card title="PDA accounts overview" icon="chevron-right" color="#0066ff" href="/pda/overview" horizontal

No. Add compression_info: CompressionInfo to your state struct, derive LightAccount and LightAccounts, and add #[light_program] above #[program]. Your instruction logic for reads, updates, and closes stays the same. The client prepends a load instruction if the account is cold.

<Card title="Light-PDA guide" icon="chevron-right" color="#0066ff" href="/pda/light-pda/overview" horizontal

The SDK sponsors rent-exemption for your Light-PDAs. After extended inactivity, the account compresses to cold state and the rent-exempt lamports return to the rent sponsor. The common path (hot accounts) has no extra overhead.

The account data is cryptographically preserved in compressed state. The client prepends a load instruction when someone interacts with it again — your program code doesn't change. Reads, updates, and closes work the same way regardless of whether the account is hot or cold.


I don't see the question I want answered

DM us @lightprotocol on X (Twitter) or Discord.

<Card title="Learn Core Concepts" icon="graduation-cap" href="/learn/light-token-standard"