Set up your own LST

What to do in order to set up your own LST

What You Need to Do


0. Join the TG Onboarding Group

First, request to join the TG Onboarding Group to set up your LST. We currently have a very long onboarding queue. We will be prioritising validators who wish to utilise the LST as their core product, and have a solid, creative and unique business plan to attract stake to their LST.

After you've been approved by the team:

  1. You need to set up a token mint for your Validator LST. This is where you set up the token name, symbol (e.g. pwrSOL) and icon

  2. Then, pass the team the token mint authority + your validator vote account pubkey

  3. We’ll be able to use the mint authority and validator vote account pubkey to deploy the Single Validator Stake Pool under the Sanctum multi-sig.

  4. You now own your own Single Validator Stake Pool.

  5. Run a crank to update your SVSP.


First, In order to serve the off-chain metadata and the token logo image, we need to decide where should these files be hosted.

Metaplex foundation has an excellent guide explaining some of the options for storage providers: https://developers.metaplex.com/storage-providers. The documentation is targeted towrads NFT projects but it is still applicable to our situation.

Once you picked a storage provider, we can proceed to upload your token logo image file. For example, here is pwrSOL token logo hosted on Arweave: https://arweave.net/vmJI1aPZNfTTIWH7ZLFxBP1VK7ptapg1hBukoDDNPME

With the URL of your hosted token logo image, we can prepare a json file containing the off-chain metadata and upload it to your storage provider of choice, e.g.:

# pwrSOL's off-chain metadata file hosted at https://2brtlweuaijbz7y4fyizzsqqotfak4tm6y6ct7wp772s4yflcmkq.arweave.net/0GM12JQCEhz_HC4RnMoQdMoFcmz2PCn-z__1LmCrExU
{
    "name": "Power Staked SOL",
    "symbol": "pwrSOL",
    "description": "MEV-Performance Optimized Liquid Staking Derivative from The Lode validator.",
    "image": "https://arweave.net/vmJI1aPZNfTTIWH7ZLFxBP1VK7ptapg1hBukoDDNPME"
}

With the off-chain metadata correctly pointing your token logo image hosted on a storage provider, we can now proceed to the on-chain portion of the setup process.

2. Setting Up Token Mint and On-chain Metadata Accounts


Let's start by preparing a json file containing your token's on-chain metadata. The uri field should be set to the URL obtained from the last step (off-chain metadata), e.g.:

# on-chain metadata: <MY-TOKEN-METADATA>.json
{
    "name": "bonkSOL",
    "symbol": "bonkSOL",
    "uri": "https://arweave.net/Hrt2n848OTwpQoTJM60SPmTADB2DlFWwhJbPdOzx7-w",
    "seller_fee_basis_points": 0,
    "creators": null
}

For creating a token mint account and an on-chain metadata account, we like to use metaboss command line tool: https://metaboss.rs/create.html

# Create a token mint account and an on-chain metadata account
metaboss create fungible \
    --decimals 9 \
    --metadata <MY-TOKEN-METADATA>.json

After a successful run, you should see the signature of the transaction as well as token mint address and on-chain metadata address e.g.:

Signature: 4weLm2Nxq24t4Mx78PYo9FGdrYsuFbVy3MMMMYgU5RzaGp8PwfBm5aKozvpeXoMPhqQb2eXdCRNDdGDdUfrzUteH
Mint: 6DUW9uU9uw69Gj1gF7Je5f2VxFAhodX5WbujeLkCqM4V
Metadata: 3Spyme9RpDxxMzh4oytgSG8qiTM6hX52xHwTnS1Y1ubG

If you want to use vanity key for your token mint, then you can first grind a keypair using solana-keygen:

# Generate a vanity keypair <MY-VANITY-KEYPAIR>.json
solana-keygen grind --starts-with <STARTING-WORD>:1

Once you obtain a keypair, run metaboss:

# Create a token mint account and an on-chain metadata account
# using a keypair file for the mint pubkey
metaboss create fungible \
    --decimals 9 \
    --metadata <MY-TOKEN-METADATA>.json \
    --mint-path <MY-VANITY-KEYPAIR>.json

After your token mint account is setup, the freeze authority of the token should be disabled as follows:

spl-token authorize --disable <YOUR-MINT-ADDRESS> freeze

And transfer the mint authority to Sanctum:

spl-token authorize <YOUR-MINT-ADDRESS> mint GRwm4EXMyVwtftQeTft7DZT3HBRxx439PrKq4oM6BwoZ

GRwm4EXMyVwtftQeTft7DZT3HBRxx439PrKq4oM6BwoZ is the manager key controlled by Sanctum.

By using an explorer, make sure the following values are correctly set for your token mint account:

  • 9 decimals

  • 0 initial supply

  • no freeze authority

And confirm the on-chain metadata is correctly loading, e.g.:

3. Fill up the LST onboarding form

https://forms.gle/uMYp7RXrL8L3GT83A

4. Updating the SVT (WIP)


To make sure there’s always a backup, we want you to run the stake pool update command every epoch. This is a permissionless crank that is needed to ensure the functioning of the stake pool. This crank costs 10,000 lamports to run and should be run as soon as the epoch passes (if we don’t run it, nobody can interact with the stake pool)

Right now, the easiest way to do this is to git clone our stake pool repository at

https://github.com/igneous-labs/sanctum-spl-stake-pool/tree/sanctum-spl-pool-deploy/stake-pool%2Fcli, build the stake pool program, and then run spl-stake-pool updatecommand:

cd stake-pool
cargo build --release
../../../target/release/spl-stake-pool update $POOL_ADDRESS

We’re going to be working on a better way to do this and are open to suggestions.

Last updated

Logo

Copyright © 2024 Sanctum Labs