Behind the Hood

Behind the Hood

All credit goes to Solana FM for their excellent article. Do check it out here.

Sanctum Unstake Program


The Sanctum Unstake Program controls the Sanctum SOL Reserve Pool, which instantly provides liquid SOL to the users that unstake their SOL.

Sanctum Router Program


The Sanctum Router Program is the central program. It composes and cross-invokes various programs and accounts like Sanctum Unstake and various stake pools on Solana to provide an interface for users to swap LSTs without dealing with the stake accounts in-between.

Exploring Sanctum Transactions

Users typically interact with Sanctum via the following actions:

  1. Instant Unstake
  2. Swapping Stake
  3. Instant Stake

Instant Unstake


Transaction Link:

In this transaction, the user exchanges their stake account (worth 1 SOL) for small fee to instantly receive 0.9993 SOL.

The Sanctum Unstake Program calls the “Unstake” instruction to transfer the SOL from the Sanctum SOL Reserve Pool to the user’s wallet, and subsequently calls the “DeactivateStakeAccount” instruction to deactivate the user’s stake account.

Swapping Stake


Transaction Link:

In this transaction, the user swaps 7.36 JitoSOL into 7.21 bSOL by splitting their staked SOL from the initial validator stake account (Jito) and merging into the next validator stake account (BlazeStake).

The Sanctum Router Program calls the “SwapViaStake” instruction, calling Cross-Program Invocations (CPIs) for the following actions to take place:

  1. Split SOL from Jito validator stake account into newly-created stake account
  2. Burn JitoSOL
  3. Deposit new stake account into BlazeStake validator stake account
  4. Mint bSOL
  5. Transfer minted bSOL to the user’s wallet

Instant Stake


Transaction Link:

Users can also instantly stake their SOL by directly swap their liquid SOL into an LST.

In this transaction, the user stakes 40 SOL to receive 38.1 JitoSOL via the following route:

a. User wraps SOL into wSOL, then transfers wSOL into the BlazeStake Reserve Pool to mint bSOL

b. Swap bSOL into JitoSOL via Jupiter Aggregator

c. Transfer swapped JitoSOL back to the user’s wallet