Step 2: Initialize Token Bonding Curve (TBC)
Learn how to configure and initialize the TBC that defines the supply and price of your token.
TBC Resources
TBC GuidesTBC ExamplesInitialize the TBC
Step 2.1: Initialize the TBC
Configure your TBC parameters. View the TBC Guide and Examples pages for help.
Usage: rly-cli tbc-init [options] <token_a> <token_b> <token_b_liquidity>
Arguments:
token_a token A
token_b token B
token_b_liquidity token B liquidity (base units)
Options:
-e, --env <string> Solana cluster env name (default: "devnet")
-k, --keypair <path> Solana wallet location (default: "--keypair not provided")
--slope_numerator <string> slope numerator
--slope_denominator <string> slope denominator
--init_price_a_numerator <string> initial price token A
--init_price_a_denominator <string> initial price token A
-h, --help display help for command
Step 2.2: Supply application tokens to the TBC swap (Automatic)
Once the TBC is configured and initialized, two token accounts will automatically be created in the swap program:
A token account for token A (sRLY on prod, any SPL token on devnet)
A token account for your application token (token B)
Once created, the initial token B supply amount will be transferred from the authorized wallet to the token B account owned by the swap program.
Note: Pool tokens and deposits/withdrawals of pool tokens are intentionally disabled so that liquidity can't be added/removed from the swap outside of the swap instruction.
That's it!
In this section you should have:
Initialized a TBC based on your parameters
Verified the token account for your app token owned by the swap program
Verified the token account for sRLY owned by the swap program
Verified the transfer and balance of the initial supply of application token to app token account
Last updated