Using the Sanctum Stake Pool Program CLI

Install Rust and Cargo

https://doc.rust-lang.org/cargo/getting-started/installation.html

Install the Sanctum stake pool program CLI

cargo install --locked --git https://github.com/igneous-labs/sanctum-spl-stake-pool-cli

Because we retain the manager and staker authorities, you can use the update, list, deposit-stake and withdraw-stake, and most of the time you will only need the first two.

Obtaining the stake pool details

The list command requires a pool address argument which you can get the Sanctum LST list and will return the current pool information, and notably the reserve address which you way want to use to give back to your stakers.

splsp list 
# picoSOL stake pool config

[pool]
program = "sanctum-spl"
mint = "picobAEvs6w7QEknPce34wAE4gknZA9v5tTonnmHYdX"
token-program = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
pool = "8Dv3hNYcEWEaa4qVx9BTN1Wfvtha1z8cWDUXb7KVACVe"
validator-list = "46A5KjX8J6FAUTXwcE8iJkmM7igK3v8vy1MD74cZNWVE"
manager = "GRwm4EXMyVwtftQeTft7DZT3HBRxx439PrKq4oM6BwoZ"
manager-fee-account = "4s4nisUjDyt2RBENnkBWzVnfiLyPqa9rTjWyG23uochr"
staker = "EG976hUYS3Mwf595uk9irszydggWzB3tBDobbMffyScq"
stake-withdraw-auth = "4At8nQXanWgRvjbrVXmxMBBdfz39txWVm4SiXEoP1kGh"
stake-deposit-referral-fee = 0
sol-deposit-referral-fee = 0
total-lamports = 162837185242496
pool-token-supply = 150634333576635
last-update-epoch = 719
next-epoch-fee = "None"
next-stake-withdrawal-fee = "None"
next-sol-withdrawal-fee = "None"
last-epoch-pool-token-supply = 150703586717775
last-epoch-total-lamports = 162808281055127

[pool.epoch-fee]
denominator = 100
numerator = 0

[pool.stake-withdrawal-fee]
denominator = 1000
numerator = 0

[pool.sol-withdrawal-fee]
denominator = 1000
numerator = 0

[pool.stake-deposit-fee]
denominator = 100
numerator = 0

[pool.sol-deposit-fee]
denominator = 1000
numerator = 1

[pool.reserve]
address = "2ArodFTZhNqVWJT92qEGDxigAvouSo1kfgfEcC3KEWUK"

Updating the stake pool state

There is a permissionless crank that is needed to ensure the functioning of the stake pool. It should be run as soon as the epoch passes, or nobody can interact with the stake pool. Sanctum runs one for you but we recommend you to run a backup for redundancy.

splsp update pool_address

Native unstaking

Although it's not YET available on our UI, you can achieve native unstaking through the CLI.

You can follow this guide to import your private key and save it to a file Then you can run:

splsp withdraw-stake pool_address amount

We know this is not ideal and it will be improved soon!

Last updated