Rent Sponsorship
How does rent-exemption sponsorship work ?
How does rent-exemption sponsorship work ?
feePayer on the transaction bumps a small virtual rent balance (766 lamports by default)
on each write to keep the account active (hot balance).
If you’re building a wallet or dApp, set your application as the fee payer and your users never pay rent or top-ups.Light Token Program
What is light-token?
What is light-token?
Can I start using the Light Token Standard?
Can I start using the Light Token Standard?
Do I need to change my client code significantly?
Do I need to change my client code significantly?
light-token-sdk methods are a superset of the SPL-token API.
Find examples below.| Light | SPL | |
|---|---|---|
| Get/Create ATA | getOrCreateAtaInterface() | getOrCreateAssociatedTokenAccount() |
| Derive ATA | getAssociatedTokenAddressInterface() | getAssociatedTokenAddress() |
| Transfer | transferInterface() | transferChecked() |
| Get Balance | getAtaInterface() | getAccount() |
Can light-token accounts hold SPL tokens?
Can light-token accounts hold SPL tokens?
transferInterface method.Do light-token accounts require rent?
Do light-token accounts require rent?
- A rent sponsor PDA by Light Protocol pays the rent-exemption cost for the account.
- Transaction fee payers bump a virtual rent balance when writing to the account, which keeps the account “hot”.
- “Cold” accounts virtual rent balance below threshold (eg 24h without write bump) get auto-compressed.
- The cold account’s state is cryptographically preserved on the Solana ledger. Users can load a cold account into hot state in-flight when using the account again.
What happens if my light-token account runs out of rent?
What happens if my light-token account runs out of rent?
Does light-token support extensions?
Does light-token support extensions?
- MetadataPointer
- TokenMetadata
- InterestBearingConfig
- GroupPointer
- GroupMemberPointer
- TokenGroup
- TokenGroupMember
- MintCloseAuthority
- TransferFeeConfig
- DefaultAccountState
- PermanentDelegate
- TransferHook
- Pausable
- ConfidentialTransferMint
- ConfidentialTransferFeeConfig
- ConfidentialMintBurn
What is the difference between light-token and compressed token?
What is the difference between light-token and compressed token?
- 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
What is a Light-PDA?
What is a Light-PDA?
invoke_signed work the same way. Your instruction handlers for reads, updates, and closes don’t change.What is a compressed PDA?
What is a compressed PDA?
When should I use Light-PDA vs compressed PDA?
When should I use Light-PDA vs compressed PDA?
PDA accounts overview
Do I need to rewrite my Anchor program to use Light-PDA?
Do I need to rewrite my Anchor program to use Light-PDA?
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.Light-PDA guide
Do Light-PDAs require rent?
Do Light-PDAs require rent?
- A rent sponsor PDA by Light Protocol pays the rent-exemption cost for the account.
- Transaction fee payers bump a virtual rent balance when writing to the account, which keeps the account “hot”.
- “Cold” accounts virtual rent balance below threshold (eg 24h without write bump) get auto-compressed.
- The cold account’s state is cryptographically preserved on the Solana ledger. Users can load a cold account into hot state in-flight when using the account again.
What happens if my Light-PDA runs out of rent?
What happens if my Light-PDA runs out of rent?