Skip to content

​What Is Wrapped SOL?

Wrapped SOL (WSOL) is SOL held in a token account for the Token Program’s native mint. The native mint is the mint address the Token Program uses for token accounts that wrap SOL. The native mint enables SOL to be used through the Token Program’s instructions.
ProgramNative mint address
Token ProgramSo11111111111111111111111111111111111111112
Token Extension Program9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP
A wrapped SOL token account stores SOL in the account’s lamports field, but tracks the SOL held in the wrapped SOL token account as a token balance through the token account amount field. If you transfer SOL into a wrapped SOL token account, the lamport balance increases immediately, but the token amount field does not change until you call the Token Program’s SyncNative instruction.

​How to Sync Native SOL

Use the Token Program’s SyncNative instruction after transferring SOL into a wrapped SOL token account. The SyncNative instruction updates the token account amount field to match the lamports held in the account above its rent-exempt reserve.

​Source Reference

ItemDescriptionToken ProgramToken Extension Program
AccountThe token account state uses is_native to mark the account as WSOL and stores the native reserve, the rent-exempt minimum lamport balance the account must keep, and the tracked token amount.SourceSource
SyncNativeAn instruction that updates a wrapped SOL token account amount field to match the lamports held in the account above its rent-exempt reserve.SourceSource
process_sync_nativeShared processor logic for synchronizing wrapped SOL balances.SourceSource

​Kit

These examples use @solana/kit.

​Web3.js v3

These examples use the class-based @solana/web3.js v3 API with @solana-program instruction builders.
Instructions

​Rust

Add these dependencies to Cargo.toml (tested with Rust 1.89 and 1.98):
Cargo.toml
Rust

​Python

This example uses solana (solana-py) 0.41 and solders:
Terminal
Python

​Web3.js (legacy)

These examples use legacy @solana/web3.js 1.x with @solana/spl-token.
@solana/web3.js 1.x is no longer actively maintainedIt receives critical fixes only. Use Kit for new code. To migrate existing code, follow the Kit upgrade guide, or the web3.js v3 migration guide to keep the class-based API.To run this code, install 1.x with npm install @solana/web3.js@1. A plain npm install @solana/web3.js installs v3, which this code doesn’t run on.