Skip to main content
Interact with Sanctum to manage Liquid Staking Tokens (LSTs) on Solana. Sanctum provides a unified liquidity layer for LSTs, allowing users to add liquidity, swap between different LSTs, and access information about APYs, prices, and TVL.

Usage

Methods

getLstApy

Get the APY (Annual Percentage Yield) for specified LSTs on Sanctum.

Parameters

Example

getLstPrice

Get the current price of specified LSTs on Sanctum.

Parameters

Example

getLstTvl

Get the Total Value Locked (TVL) for specified LSTs on Sanctum.

Parameters

Example

getOwnedLst

Get all LSTs owned by the current wallet that are supported by Sanctum.

Parameters

None

Example

swapLst

Swap one LST for another using Sanctum’s unified liquidity layer.

Parameters

Example

addLiquidity

Add liquidity to a Sanctum pool.

Parameters

Example

removeLiquidity

Remove liquidity from a Sanctum pool.

Parameters

Example

Example Implementation

Implementation Details

  • Sanctum Reserve: Provides instant liquidity between LSTs and SOL.
  • Sanctum Router: Enables direct swaps between different LSTs.
  • Infinity Pools: Unified LST liquidity pools with low slippage and high efficiency.
  • Customized LSTs: Support for validator-specific LSTs with unique properties and rewards.
  • APY and TVL data: Comprehensive data on LST performance and liquidity.

About Sanctum Finance

Sanctum is a Solana-based protocol designed to act as a unified liquidity layer for Liquid Staking Tokens (LSTs). It addresses the fragmentation and inefficiencies associated with multiple LSTs in the ecosystem by providing:
  1. Deep liquidity for all LSTs from day one
  2. Simple swapping between different LSTs
  3. Instant liquidity without waiting for unstaking periods
  4. Validator-specific LSTs with custom APYs and features
  5. Low fees and minimal slippage for all operations

Error Handling

Best Practices

  1. Priority Fees
    • Use appropriate priority fees based on network congestion
    • Consider higher fees during peak usage times
    • Monitor transaction confirmation times
  2. Amount Calculation
    • Be aware that LSTs typically use 9 decimals (like SOL)
    • Account for slippage in swap operations
    • Verify quoted amounts before transactions
  3. LST Selection
    • Consider APY differences between LSTs
    • Research validator-specific LSTs for special features
    • Monitor TVL for liquidity depth
  4. Error Handling
    • Implement retries for failed transactions
    • Handle slippage errors appropriately
    • Monitor transaction status until confirmed

Common LST Addresses

  • SOL: So11111111111111111111111111111111111111112
  • mSOL: mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So
  • jitoSOL: J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn
  • bSOL: bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1
  • INF: infnNBxGXvNnkQnGLNsENH4QbPQYmgmG65nPPqRHGLX

Response Format

  • getBalance: Check token balances
  • trade: Swap tokens using Jupiter
  • getTokenData: Get token information
  • transfer: Transfer tokens