Usage
Methods
getLstApy
Get the APY (Annual Percentage Yield) for specified LSTs on Sanctum.Parameters
Parameter | Type | Required | Description |
---|---|---|---|
inputs | string[] | Yes | Array of LST mint addresses or symbols |
Example
getLstPrice
Get the current price of specified LSTs on Sanctum.Parameters
Parameter | Type | Required | Description |
---|---|---|---|
inputs | string[] | Yes | Array of LST mint addresses or symbols |
Example
getLstTvl
Get the Total Value Locked (TVL) for specified LSTs on Sanctum.Parameters
Parameter | Type | Required | Description |
---|---|---|---|
inputs | string[] | Yes | Array of LST mint addresses or symbols |
Example
getOwnedLst
Get all LSTs owned by the current wallet that are supported by Sanctum.Parameters
NoneExample
swapLst
Swap one LST for another using Sanctum’s unified liquidity layer.Parameters
Parameter | Type | Required | Description |
---|---|---|---|
inputLstMint | string | Yes | Input LST mint address |
amount | string | Yes | Amount to swap (in smallest units) |
quotedAmount | string | Yes | Expected output amount |
priorityFee | number | Yes | Priority fee for the transaction |
outputLstMint | string | Yes | Output LST mint address |
Example
addLiquidity
Add liquidity to a Sanctum pool.Parameters
Parameter | Type | Required | Description |
---|---|---|---|
lstMint | string | Yes | LST mint address |
amount | string | Yes | Amount to add (in smallest units) |
quotedAmount | string | Yes | Expected INF token amount |
priorityFee | number | Yes | Priority fee for the transaction |
Example
removeLiquidity
Remove liquidity from a Sanctum pool.Parameters
Parameter | Type | Required | Description |
---|---|---|---|
lstMint | string | Yes | LST mint address |
amount | string | Yes | Amount to remove (in smallest units) |
quotedAmount | string | Yes | Expected INF token to burn |
priorityFee | number | Yes | Priority fee for the transaction |
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:- Deep liquidity for all LSTs from day one
- Simple swapping between different LSTs
- Instant liquidity without waiting for unstaking periods
- Validator-specific LSTs with custom APYs and features
- Low fees and minimal slippage for all operations
Error Handling
Best Practices
-
Priority Fees
- Use appropriate priority fees based on network congestion
- Consider higher fees during peak usage times
- Monitor transaction confirmation times
-
Amount Calculation
- Be aware that LSTs typically use 9 decimals (like SOL)
- Account for slippage in swap operations
- Verify quoted amounts before transactions
-
LST Selection
- Consider APY differences between LSTs
- Research validator-specific LSTs for special features
- Monitor TVL for liquidity depth
-
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
Related Functions
getBalance
: Check token balancestrade
: Swap tokens using JupitergetTokenData
: Get token informationtransfer
: Transfer tokens