A smart wallet is a program deployed on-chain that provides secure, programmable wallet infrastructure. The signer is separate from the wallet and can be anything: passkeys, AWS KMS, MPC, or a multisig threshold. When a PDA owns tokens instead of a keypair, two things change:
| Standard wallet | Smart wallet (PDA) | |
|---|---|---|
| Create associated token account | createAtaInterface(rpc, payer, mint, owner) | createAtaInterface(rpc, payer, mint, walletPda, true) |
| Transfer | transferInterface(...) or createTransferInterfaceInstructions(...) | createLightTokenTransferInstruction(...) |
| Signing | Keypair signs directly | Smart wallet program signs via CPI |
transferInterface rejects off-curve addresses. Use createLightTokenTransferInstruction instead. It accepts any PublicKey, including PDAs. Pass allowOwnerOffCurve=true (5th argument) when creating the associated token account.
This pattern applies to any PDA-based wallet program. The examples below use Squads Smart Accounts.
The full example includes wallet creation, funding, sync transfer, and async governance flow with an integration test.
- Guide
- AI Prompt
Prerequisites
You need an existing smart wallet (PDA) and a ZK Compression-compatible RPC endpoint.Creating a new Squads smart account
Creating a new Squads smart account
If you don’t have a smart wallet yet, create one with Squads. Set
timeLock: 0 for sync execution, or a positive value to require async governance.rpc, payer, mint, settingsPda, and walletPda are defined. See the full example for runnable setup.Create the wallet’s token account
Derive the wallet PDA
The wallet PDA is derived by the smart wallet program. It is off-curve and cannot be used as a keypair.
Fund the wallet
Anyone can send Light Tokens to the wallet’s associated token account. No smart wallet approval is needed. You can usetransferInterface or createLightTokenTransferInstruction from any standard wallet:Send tokens from a smart wallet
Build the transfer instruction
Use
createLightTokenTransferInstruction to build the inner instruction. The wallet PDA is the owner. The optional 5th argument sets who pays rent top-ups. Pass walletPda so the wallet covers its own top-ups:Execute via the smart wallet
The smart wallet program wraps your instruction and signs via CPI using the wallet PDA’s seeds.Use sync when all signers are available and
timeLock=0. The transfer happens in a single transaction. Use async when you need multi-party governance (threshold > 1 or time lock).- Sync (single transaction)
- Async (proposal governance)
Check balance
Query the wallet’s token balance like any other account:Combine with gasless transactions
You can sponsor the outer transaction fee so that only the wallet PDA’s SOL is used for inner fees (rent top-ups). Set your application asfeePayer on the outer transaction and pass it as the first signer:Further reading
- Solana Smart Wallets : background on smart wallet concepts and account abstraction on Solana
Related guides
Basic payment
Send a single token transfer.
Gasless transactions
Sponsor fees so users never hold SOL.
Integration guide
Full wallet integration reference.