Skip to main content

Payment flows on Solana include five core concepts:
  1. wallets for sender and recipient
  2. stablecoins as transferred asset type (USDC, USDG, …)
  3. token accounts to hold balances
  4. fees for transactions and account creation
  5. transactions to execute the transfer
Our token API’s optimize the account creation cost component. You typically create an account (1) when onboarding a new user, and (2) when the recipient does not hold the transferred token yet.
LightSPL / Token 2022
Transfer~$0.001~$0.001
Create Token Account~$0.001 (0.00001 SOL)~$0.30 (0.0029 SOL)
Transfer + Create Token Account~$0.001 (0.00001 SOL)~$0.30 (0.0029 SOL)
While transfer cost is identical, you can expect ~$0.30 total when creating a new token account using SPL/Token 2022. With Light Token, the total cost will be around $0.001, regardless of whether a new account is created. Your users use the same stablecoins, just stored more efficiently.
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.Rent-exemption: paid by a rent sponsor PDA.Top-ups: paid by the fee payer.The feePayer on the transaction bumps a small virtual rent balance (766 lamports by default) on each write to keep the account active (hot balance). Set your application as the fee payer so users never interact with SOL.Hot-Cold Lifecycle of Accounts.Accounts get auto-compressed (cold balance) when the virtual rent balance goes below a threshold (eg 24h without write bump). The cold account’s state is cryptographically preserved on the Solana ledger. Users only interact with hot accounts and load the cold balance in-flight when using the account again.
Account lifecycle
Account lifecycle
You can abstract fees entirely so users never interact with SOL. See gasless transactions to sponsor rent top-ups and transaction fees.

API Comparison

Transactions with Light Token API’s mirror SPL / Token 2022, so you can build transactions with a similar developer experience. For example, here is the creation of an associated token account:

Interoperability

The Light Token APIs cover every SPL Token operation and adds extra capabilities:
CategoryWhat it does
Cross-program dispatchInterface methods (e.g., transferInterface) auto-detect the token program and dispatch to SPL, Token 2022, or Light Token.
Unified balancegetAtaInterface returns a unified balance for a given mint, aggregating Light Token (hot + cold), SPL, and Token 2022 sources.
Wrap / UnwrapFor 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.

Token Extensions

Token extensions introduce optional features you can add to a token mint or token account through extra instructions. Light Token supports most Token 2022 extensions.

How Extensions work with Light Token

Start Integrating

Payment Skill for Agents

Use the payments agent skill to add light-token payment support to your project:
npx skills add Lightprotocol/skills
For orchestration, install the general skill:
npx skills add https://zkcompression.com

Payment Flows

Basic payment

Batch payments

Receive payments

Payment with memo

Get Balance and Transaction History

Verify Recipients Address

Configure Spend Permissions

Wrap and Unwrap to or from SPL / Token 2022

Nullifier PDA

Fee Abstraction

Gasless transactions

Signing

When using Privy Wallets

When using Wallet Adapter

Go to Production

Checklist


Didn’t find what you were looking for?

Reach out! Telegram | email | Discord