On Solana, the growth of Liquid Staking Tokens (LSTs) has created a major problem: fragmented liquidity. Swapping between different LSTs is often inefficient, involving multiple hops and high slippage. The Sanctum Solana Ecosystem solves this with a groundbreaking piece of infrastructure: the Sanctum Router. This Sanctum Router Guide explains how.
The Core Problem: Fragmented Liquidity
Imagine you have jitoSOL and want to swap to mSOL. Without a direct pool, your swap might go jitoSOL -> SOL -> mSOL, incurring double the fees and slippage. This friction hinders the growth of new Sanctum Verified LSTs.
The Solution: The Sanctum Router
The Sanctum Router is a multi-LST liquidity engine. Instead of relying on disparate AMM pools, it treats the Sanctum Reserve Pool (a basket of underlying SOL) and the Sanctum Infinity Pool as its core liquidity sources.
How it Works (Conceptual Flow):
Input: User wants to swap LST 'A' for LST 'B'.
Unstake 'A': The Router atomically unstakes LST 'A' for its underlying SOL from the Sanctum Reserve. This is possible because Sanctum has direct access to the stake accounts.
Stake 'B': The Router then uses that SOL to instantly mint LST 'B' at its current exchange rate.
Output: The user receives LST 'B' in a single, capital-efficient transaction.
TypeScript
// Pseudocode for a Router Swap
import { SanctumRouter } from '@sanctum-sdk'
const router = new SanctumRouter(connection);
// Swap 10 jitoSOL for mSOL
const transaction = await router.swap({
inputLst: 'jitoSOL',
outputLst: 'mSOL',
amount: 10 * LAMPORTS_PER_SOL
});
// --> Sign and send transaction
This elegant solution is the key to understanding How to use Sanctum effectively. It turns the entire LST market into a single, unified pool. For a deep dive into the SDK, please refer to the Full Official Documentation.
Top comments (0)