Creating and managing digital tokens on Solana has become increasingly essential for developers building decentralized applications (dApps), launching tokens, or structuring team and investor incentives. This comprehensive guide walks you through the full lifecycle of creating a custom SPL token, deploying a secure vesting program, and automating token releases based on predefined schedules—all on the Solana devnet. The same process seamlessly applies to mainnet with minimal configuration changes.
Whether you're a blockchain developer, startup founder, or crypto enthusiast, mastering token creation and vesting mechanisms is key to launching compliant and trustless token ecosystems.
Why Token Creation and Vesting Matter on Solana
Solana’s high throughput and low transaction fees make it an ideal platform for tokenization. However, launching a token isn’t just about minting units—it's about structuring fair distribution. Vesting ensures that tokens are released gradually over time, preventing early dumps and aligning long-term incentives.
This tutorial uses audited, open-source tools and follows best practices in Solana development:
- SPL Token Program for token creation
- Bonfida’s Vesting Program for secure, time-based releases
- Chainstack for reliable node access
- Rust and Solana CLI for program deployment and interaction
Prerequisites
Before diving in, ensure you have the following tools installed and accounts set up:
- Chainstack account – To deploy and manage a Solana devnet node
- Rust programming language – Required to build the vesting program
- Solana CLI toolkit – For wallet management, transactions, and network interaction
- SPL Token CLI – To create and manage SPL tokens
💡 All steps below use the Solana devnet, allowing you to test without spending real SOL. The same workflow applies to mainnet—just switch endpoints and fund accounts with mainnet SOL.
Step 1: Set Up Your Solana Development Environment
Create a Chainstack Project
- Log in to your Chainstack account.
- Create a new public chain project.
- Join the Solana devnet network.
- Retrieve your node endpoint credentials from the dashboard.
👉 Get fast, reliable Solana node access to streamline your development workflow.
Configure the Solana CLI
In your project directory, set your Solana CLI to use the Chainstack node:
solana config set --url YOUR_CHAINSTACK_ENDPOINTVerify the configuration:
solana config getYou’re now connected to the Solana devnet via your dedicated node.
Step 2: Generate Wallets and Fund Accounts
You’ll need two wallets:
- Deployer Wallet: To create tokens and deploy the vesting program
- Receiver Wallet: To receive vested tokens
Generate both:
solana-keygen new --outfile ~/wallet/deployer.json
solana-keygen new --outfile ~/wallet/receiver.jsonFund both wallets using the Solana devnet faucet at https://solfaucet.com.
Set the deployer wallet as default:
solana config set --keypair ~/wallet/deployer.jsonStep 3: Create Your Custom SPL Token
Use the SPL Token CLI to mint a new token:
spl-token create-tokenThis command interacts with Solana’s default Token Program and returns your token’s unique address (e.g., C1Swjv4cQ2nEujJ4QeYDBsWSuSVPRXX4QkrtmF6UtdJK). By default, tokens have 9 decimal places.
Step 4: Derive Token Accounts
SOL and SPL tokens are stored in separate accounts. You must create Associated Token Accounts (ATAs) for each wallet to hold your new token.
Derive ATAs for both wallets:
spl-token create-account TOKEN_ADDRESS --owner ~/wallet/deployer.json
spl-token create-account TOKEN_ADDRESS --owner ~/wallet/receiver.jsonReplace TOKEN_ADDRESS with your actual token address.
Step 5: Mint Tokens
Now mint 1,000 tokens to the deployer’s token account:
spl-token mint TOKEN_ADDRESS 1000Check the balance:
spl-token balance TOKEN_ADDRESSYou now have:
- A fully functional SPL token
- Two wallets with derived token accounts
- 1,000 tokens in the deployer’s account
Step 6: Deploy the Vesting Program
We’ll use Bonfida’s audited token vesting program, a trusted solution used across Solana projects.
Clone the repository:
git clone https://github.com/Bonfida/token-vesting.git
cd token-vesting/programBuild the program:
cargo build-bpfDeploy it to devnet:
solana program deploy target/deploy/vesting.soSave the returned program address—you’ll need it to create vesting instances.
👉 Explore secure blockchain tools and accelerate your dApp deployment.
Step 7: Create a Vesting Schedule
Navigate to the CLI folder and build the tool:
cd ../cli
cargo buildCreate a vesting instance with a custom schedule. For example:
cargo run -- create \
--endpoint YOUR_CHAINSTACK_ENDPOINT \
--program-id PROGRAM_ADDRESS \
--token-mint TOKEN_ADDRESS \
--source ~/wallet/deployer.json \
--source-token SOURCE_TOKEN_ACCOUNT \
--destination DESTINATION_TOKEN_ACCOUNT \
--schedule "1000000000:1643606400,2000000000:1646025600"This releases:
- 1 token on January 31, 2022 (Unix timestamp: 1643606400)
- 2 tokens on February 28, 2022 (Unix timestamp: 1646025600)
💡 Amounts are in base units (e.g., 1 token = 1,000,000,000 for 9 decimals).
The command returns a seed—a public identifier for checking the vesting status.
Step 8: Monitor and Release Vested Tokens
Check the current state of your vesting instance:
cargo run -- show \
--endpoint YOUR_CHAINSTACK_ENDPOINT \
--program-id PROGRAM_ADDRESS \
--seed SEED_VALUEOnce a release time has passed, anyone can trigger the transfer by paying the transaction fee:
cargo run -- release \
--endpoint YOUR_CHAINSTACK_ENDPOINT \
--program-id PROGRAM_ADDRESS \
--wallet ~/wallet/any_payer.jsonThe tokens will be automatically sent to the destination token account.
Verify receipt:
spl-token balance DESTINATION_TOKEN_ACCOUNT_ADDRESSCore Keywords for SEO
- Solana token creation
- SPL token tutorial
- Token vesting on Solana
- Bonfida vesting program
- Rust on Solana
- Solana CLI guide
- Chainstack node setup
- Devnet token deployment
These keywords are naturally integrated throughout this guide to align with common search queries while maintaining readability and technical accuracy.
Frequently Asked Questions (FAQ)
How do I create a token on Solana?
Use the spl-token create-token command after setting up the Solana CLI. This deploys a new SPL token using Solana’s default token program, returning a unique mint address for your token.
What is token vesting, and why is it important?
Token vesting locks tokens and releases them over time according to a schedule. It’s crucial for preventing market dumps, rewarding long-term contributors, and ensuring fair distribution among teams and investors.
Can I use this process on Solana mainnet?
Yes. Replace the devnet endpoint with a mainnet URL, use mainnet SOL for fees, and ensure wallets are properly secured. The entire workflow remains identical.
Do I need to deploy the vesting program every time?
No. Bonfida’s vesting program is already deployed on mainnet. You only need to deploy it yourself for testing or customization. Otherwise, use the existing program address.
How are token amounts calculated in vesting schedules?
Amounts must be in base units. For a token with 9 decimals, 1 full token equals 1,000,000,000 base units. Always convert human-readable amounts before setting schedules.
Who can release vested tokens?
Anyone can call the release function as long as the unlock time has passed. The transaction fee payer doesn’t need to be the recipient or original funder.
Final Thoughts
You’ve now successfully created a custom SPL token, deployed a secure vesting program, and implemented a time-based release schedule—all using industry-standard tools on the Solana blockchain. This foundation empowers you to build transparent, decentralized token economies with built-in governance and fairness.
Whether you're launching an NFT project, DeFi protocol, or Web3 startup, mastering these skills ensures you can manage token distribution efficiently and securely.
👉 Start building scalable Solana applications with powerful infrastructure support.