What Is a Solana Nonce Account and When Do You Need One?
A Solana nonce account is a special type of account that stores a reusable blockhash, allowing you to construct and sign a transaction well in advance and submit it later without the transaction expiring. You need one when you cannot broadcast a transaction immediately - for example, when signing offline with a hardware wallet, coordinating a multi-signature transaction, or preparing a transfer that must happen at a specific future time.
How normal solana transactions work
Every Solana transaction must reference a recent blockhash, which is a cryptographic hash of the latest block header. The network rejects transactions whose blockhash is older than 151 blocks (roughly 60-90 seconds under normal conditions). This prevents replay attacks but creates a tight window: you must fetch a blockhash, sign the transaction, and submit it almost immediately.
If you are using a hot wallet connected to the internet, this happens automatically. The wallet requests a current blockhash, you sign, and the transaction is sent within seconds. Problems arise when the signing step is delayed - for instance, if you need to approve the transaction on a hardware wallet that is not connected at the moment, or if you are coordinating a transfer with another party who must also sign.
What a nonce account changes
A nonce account stores a durable blockhash (called a nonce) that does not expire after 151 blocks. You create the nonce account, generate a nonce, and then use that nonce to build and sign your transaction. The transaction remains valid until you advance the nonce (by using it in a transaction) or explicitly close the account.
Key properties of a nonce account: - It is owned by the system program. - It holds a single nonce value and a set of authorities (an authority that can advance the nonce, and optionally a separate fee-payer authority). - Only the authority can use the nonce to submit a transaction. - After the transaction is confirmed, the nonce advances to a new value. You must fetch the new nonce before building the next offline transaction.
When you actually need one
Offline Signing with a Hardware Wallet
If you keep your Ledger or other hardware wallet disconnected from your computer most of the time, you cannot fetch a current blockhash when you want to sign. The workaround: on a trusted online machine, create a nonce account and generate a nonce. Transfer the unsigned transaction (with that nonce) to your offline machine via USB drive. Sign it there. Then bring the signed transaction back to the online machine to submit. Without a nonce account, the transaction would expire while you are moving files.
Multi-Signature or multi-party transactions
When two or more people must sign the same transaction, coordinating a real-time broadcast is impractical. One person creates the nonce account, builds the transaction, and shares it. Each signer signs in turn. The last signer submits it. The nonce ensures the transaction does not go stale during the coordination.
Scheduled or conditional transfers
If you need a transaction to execute at a specific future time (e.g., after a vesting period ends), you can prepare the signed transaction in advance and submit it later. As long as the nonce has not been advanced, the transaction remains valid. Note that this is not a smart contract; you must still broadcast it manually.
How to Create and Use a Nonce Account
The process varies slightly by wallet, but the general steps are:
-
Create the nonce account. In Phantom or Solflare, go to the settings or developer menu. Look for "Create nonce account." You will pay a small rent-exempt fee (currently about 0.001 SOL, but check the current rent rate). The account must maintain a minimum balance to stay rent-exempt.
-
Fetch the nonce. After creation, the wallet displays the nonce value. Copy it.
-
Build the transaction offline. Using a tool like the Solana CLI or a script, construct your transaction with
--nonce <nonce value> --nonce-account <nonce account address>. Do not include a recent blockhash. -
Sign and submit. Sign the transaction on your offline device. Then, on an online device, submit it using the nonce account's authority. The network advances the nonce automatically.
Important Caveats
- A nonce account can be used only once per nonce. After the transaction confirms, you must generate a new nonce for the next offline transaction.
- If you lose access to the nonce account's authority, you cannot advance the nonce, and any pre-signed transactions become unusable. Keep the authority's key safe.
- Nonce accounts are not a privacy feature. The transaction details are still public on-chain.
- You can use the same nonce account repeatedly, but each use requires fetching a fresh nonce.
When you do not need one
If your wallet is always connected and you submit transactions within seconds of signing, you do not need a nonce account. The built-in blockhash expiry mechanism works fine. Nonce accounts add complexity and an extra account to manage. Use them only when the delay between signing and submission is unavoidable.
Not financial advice. gokuofsolana.xyz publishes market data and general information about Goku super saiyan. Crypto assets are volatile and you can lose everything you put in. Nothing here is a recommendation to buy, sell or hold, and we make no price predictions.
Prices are sourced from third parties and may be delayed or wrong. Verify anything you intend to act on against a primary source.