Staking

How Unstaking SOL Works: Epochs, Cooldown and Lost Stake

Cover image for How Unstaking SOL Works: Epochs, Cooldown and Lost Stake

How unstaking SOL works: stake accounts, the epoch cooldown of up to about 2 days, stake vs withdraw authority, forgotten stake accounts, and liquid staking.

By 8 min read1826 words

Key takeaways

  • Unstaking native SOL takes two transactions: a deactivate instruction, then a withdraw once the stake account becomes inactive at the next epoch boundary.
  • A Solana epoch lasts about two days (432,000 slots), so unstaking SOL takes anywhere from a few minutes to about two days depending on when in the epoch you deactivate.
  • Staked SOL lives in a separate stake account owned by the Stake program, controlled by a stake authority and a withdraw authority, not in the wallet's own balance.
  • A forgotten Solana stake account is not lost: the SOL stays in the account until the withdraw authority signs a withdrawal, however long that takes.
  • Liquid staking tokens such as mSOL and jitoSOL are SPL tokens, not stake accounts, and are exited by swapping them or unstaking through their own protocol.

The short answer#

Unstaking native SOL is two steps: you deactivate the stake account, wait for the current epoch to end, then withdraw the SOL to your wallet. An epoch lasts about two days, so the wait ranges from a few minutes to about two days depending on when you press the button. The SOL never leaves your control during that time, and it keeps earning until the epoch boundary.

How does native staking on Solana work?#

Native staking on Solana works by moving SOL into a separate stake account and delegating that account to a validator. A stake account is a 200-byte account owned by Solana's Stake program that holds the staked SOL and records who controls it and which validator it is delegated to. Your wallet address is not where the staked SOL lives. It is written inside the stake account as the authority.

Delegating is not the same as sending. The validator receives voting weight from your stake and shares the rewards, minus its commission, but it never has custody of the SOL and cannot move it. Rewards are credited to the stake account itself at each epoch boundary, so the balance grows and compounds without any action from you.

Two other facts explain most of the confusion later. A stake account has its own address, unrelated to your wallet address. And one wallet can control any number of stake accounts, created by different apps at different times.

What are the states of a Solana stake account?#

A Solana stake account is always in one of five states: not delegated, activating, active, deactivating or inactive. Changes between them only take effect at epoch boundaries.

StateWhat it meansEarning rewards?Can withdraw?
Not delegatedFunded and initialised, never delegatedNoYes
ActivatingDelegated this epoch; becomes active at the next boundaryNo, not yetNo
ActiveFully staked with a validatorYesNo; deactivate first
DeactivatingDeactivate signed; cooling down until the boundaryYes, until the epoch endsNo
InactiveCooldown finished; SOL is idleNoYes, the full balance

One exception sits on top of this table: an account with a lockup still in force cannot be withdrawn in any state until the lockup expires.

Every stake account also holds a rent-exempt reserve of about 0.0023 SOL, the deposit any 200-byte Solana account needs. It is not staked and earns nothing, and it comes back when you withdraw the whole balance and the account closes. The reasoning is the same as for token accounts, covered in what is Solana rent.

Why does unstaking SOL take until the end of the epoch?#

Unstaking takes until the end of the epoch because Solana only changes the active stake set at epoch boundaries. An epoch is a period of 432,000 slots, and at roughly 400 milliseconds per slot that is about two days. The leader schedule and each validator's voting weight are fixed for the epoch using the stake that was active when it was calculated. Letting stake leave instantly would mean the set of validators securing the network could change mid-epoch, so both activation and deactivation wait for the boundary.

The consequences for timing:

  • Deactivate an hour before the epoch ends and your SOL is withdrawable in an hour.
  • Deactivate an hour after an epoch starts and you wait nearly two days.
  • You lose nothing by waiting, because deactivating stake earns rewards for the rest of that epoch.

Solana also limits how much of the network's total stake can activate or deactivate in a single epoch. In normal conditions an individual unstake completes at the next boundary. The limit only matters if a very large share of all stake moves at once.

If you need SOL at a known time, check how far through the epoch the network is before deactivating. Explorers show epoch progress, and the Stake Accounts tool estimates the remaining time for each deactivating account.

How do you unstake and withdraw SOL step by step?#

Unstaking is a deactivate transaction followed, after the epoch boundary, by a withdraw transaction.

  1. Find the stake account. In Phantom or Solflare it appears under the staking section if that wallet created it; otherwise look it up by authority.
  2. Deactivate. This is signed by the stake authority. No SOL moves. The account switches to deactivating.
  3. Wait for the epoch boundary. The account becomes inactive automatically, with nothing to sign.
  4. Withdraw. This is signed by the withdraw authority and moves lamports from the stake account to an address you choose. Withdrawing the entire balance, including the rent-exempt reserve, closes the account.
  5. Confirm it arrived. If anything looks odd, paste the signature into the Transaction Decoder to see the balance changes.

You can change your mind after step 3: an inactive account can be delegated again, to the same validator or another one, without withdrawing.

Every mainstream wallet that offers staking can do steps 2 and 4 for the accounts it displays, for nothing beyond the network fee, and the Solana CLI does it with solana deactivate-stake and solana withdraw-stake. For a single stake account made in your current wallet, that is all you need. Network fees for both transactions are the standard 0.000005 SOL each, as explained in Solana transaction fees explained.

What are the stake authority, withdraw authority and lockups?#

The stake authority and withdraw authority are the two keys that control a stake account, and a lockup is an optional time restriction on withdrawals.

The stake authority can delegate, deactivate, split and merge the account. The withdraw authority can withdraw SOL and can reassign either authority. That makes the withdraw authority the key that actually owns the money. In most wallets both are your wallet address. They differ when a custodian or staking service holds the stake authority to manage delegation while you keep the withdraw authority.

This matters for security as well as convenience. A malicious transaction that reassigns the withdraw authority of your stake account takes the stake without moving a lamport at the time. It is one of the patterns in the Solana wallet security checklist.

A lockup is a date or epoch before which the account cannot be withdrawn, together with a custodian address that alone can lift it early. Lockups are rare for ordinary stakers and common for vesting schedules, investor allocations and foundation grants. A locked account can still be delegated and earn rewards.

How do people "lose" stake accounts, and how do you find them?#

People lose track of stake accounts because staked SOL does not appear in a wallet's main balance, and many wallet apps only list the stake accounts they created themselves. The stake is not lost. It stays in the account, under your authority, for as long as it takes you to come back. The usual routes to a forgotten account:

  • An old wallet app. You staked years ago in one app, moved to another with the same seed phrase, and the new app does not show the old stake account.
  • Split accounts. Partially unstaking splits a stake account in two. Staking dashboards do this routinely, leaving a small, often already inactive account behind.
  • A validator went delinquent or shut down. Your stake is intact but has stopped earning. The balance has simply not moved since.
  • Liquid staking withdrawals. Some protocol unstake routes hand you a native stake account rather than SOL, and it sits inactive until you withdraw it.
  • Deactivated and never withdrawn. You pressed unstake, the epoch ended two days later, and you never went back.

To find them, search by authority rather than by wallet app. The Stake Accounts tool asks the Stake program for every account whose withdraw authority or stake authority is the address you give it, whichever app created it. You can paste any address for a read-only lookup without connecting. Each account shows its balance, validator vote account and state, and the headline figure is the SOL withdrawable right now; the SOL to USD converter will tell you what that is worth today.

Fees, stated plainly: looking up and deactivating are free, and a withdrawal through the tool costs a flat 0.002 SOL per stake account, paid inside the same transaction. The tool always withdraws the entire balance, which closes the account and returns the reserve of about 0.0023 SOL as well. It shows Deactivate only where your connected wallet is the stake authority and Withdraw only where it is the withdraw authority, and it marks locked accounts as locked. If you need a partial withdrawal, or your wallet app already displays the account, use the wallet or the CLI instead; it costs only the network fee. I built the lookup because my own wallets did not show me everything the chain said I controlled (more on the about page).

While you are recovering idle SOL, the same logic applies to empty token accounts, each of which holds about 0.002 SOL of rent that the Token Account Closer returns for 5% of the recovered amount.

How is native staking different from liquid staking tokens?#

Native staking gives you a stake account, while liquid staking gives you an SPL token that represents a share of a pool of stake accounts. With mSOL from Marinade or jitoSOL from Jito, you deposit SOL into the protocol's stake pool and receive a token whose value in SOL rises as the pool earns rewards. The token sits in an ordinary token account in your wallet, and you can trade it, lend it or use it as collateral.

Native stakingLiquid staking token (mSOL, jitoSOL)
What you holdA stake account you controlAn SPL token in a token account
ExitDeactivate, wait for the epoch boundary, withdrawSwap for SOL at once, or unstake via the protocol with a delay
Exit priceExactly your balanceMarket price if swapped; full value if unstaked via the protocol
Usable in DeFiNoYes
Extra riskValidator performance onlyProtocol smart contract risk and market price deviation
Found by a stake account lookupYesNo

The practical upshot: a stake account lookup will not show mSOL or jitoSOL, because they are token balances. And there is nothing to "deactivate" for them. To exit you either swap the token, for example through Jupiter, accepting the market rate and slippage, or use the issuing protocol's own unstake function. Where that function returns a native stake account, the account then follows all the rules above.

Bottom line#

Unstaking SOL is deactivate, wait for the epoch boundary, withdraw, and the wait is at most about two days. Staked SOL lives in stake accounts controlled by a stake authority and a withdraw authority, which is why it can drop out of sight when you change wallet apps without ever being at risk. Look up your addresses by authority once in a while, withdraw what is inactive, and re-delegate anything sitting with a delinquent validator. Liquid staking tokens are a separate thing: they are SPL tokens, and you exit them through a swap or their protocol.

Questions & answers

How long does it take to unstake SOL?

Unstaking native SOL takes until the end of the current epoch, and a Solana epoch lasts about two days. If you deactivate shortly before the epoch ends, the wait can be minutes; if you deactivate just after one begins, it is close to the full two days. Once the stake account is inactive, the withdrawal itself is an ordinary transaction that confirms in seconds.

Do I still earn rewards while my SOL is unstaking?

Yes, for the remainder of the current epoch. A deactivating stake account still counts as staked until the epoch boundary, and staking rewards are credited at that boundary. After it becomes inactive it earns nothing. That is why a forgotten inactive stake account is worth dealing with: the SOL is safe, but it is idle and not compounding.

Can I lose my staked SOL if the validator goes offline?

No. Solana does not currently slash delegated stake for a validator being offline, and the validator never has custody of your SOL. If a validator becomes delinquent, your stake simply stops earning rewards while remaining in your stake account. The fix is to deactivate, wait for the epoch boundary, and delegate to a different validator or withdraw.

Why can't I see my staked SOL in my wallet?

Staked SOL is held in a separate stake account, not in your wallet's balance, and many wallet apps only display stake accounts they created themselves. Stake made in another app, through the command line, split by a staking dashboard, or produced by a liquid staking withdrawal may not appear. The chain still records your address as the account's authority, so a lookup by authority finds it.

What is the difference between stake authority and withdraw authority?

The stake authority can delegate, deactivate, split and merge a stake account. The withdraw authority can move SOL out of it and can reassign both authorities, which makes it the more powerful key. In most wallets both are the same address. They differ when a custodian or staking service manages delegation on your behalf while you keep the right to withdraw.

How do I unstake mSOL or jitoSOL?

Liquid staking tokens are SPL tokens, so there is no stake account of yours to deactivate. You can swap the token for SOL on an exchange or aggregator such as Jupiter, which is immediate but subject to market price and slippage, or use the issuing protocol's unstake function, which typically pays full value after a delay tied to the epoch. Some protocol withdrawals hand you a native stake account to deactivate and withdraw yourself.