├── mytoken ├── mytoken-logo.png └── metadata.json ├── blockexplorer ├── blockexplorer-logo.png └── metadata.json └── README.md /mytoken/mytoken-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jspruance/solana-liquidity-pool-tutorial/main/mytoken/mytoken-logo.png -------------------------------------------------------------------------------- /blockexplorer/blockexplorer-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jspruance/solana-liquidity-pool-tutorial/main/blockexplorer/blockexplorer-logo.png -------------------------------------------------------------------------------- /mytoken/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MyToken Token", 3 | "symbol": "MYT", 4 | "description": "The official utility token of the MyToken project.", 5 | "image": "https://storacha.network/ipfs/", 6 | "external_url": "https://mytoken.io", 7 | "attributes": [ 8 | { 9 | "trait_type": "Category", 10 | "value": "Utility" 11 | }, 12 | { 13 | "trait_type": "Network", 14 | "value": "Solana Mainnet" 15 | } 16 | ], 17 | "properties": { 18 | "files": [ 19 | { 20 | "uri": "https://storacha.network/ipfs/", 21 | "type": "image/png" 22 | } 23 | ], 24 | "category": "image", 25 | "creators": [ 26 | { 27 | "address": "", 28 | "share": 100 29 | } 30 | ] 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /blockexplorer/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BlockExplorer Token", 3 | "symbol": "BEX", 4 | "description": "The official utility token of the BlockExplorer project — empowering open blockchain education and exploration.", 5 | "image": "https://storacha.network/ipfs/bafybeidtk2ycaglsbr2ebauzwa44d5oblv5dkgnwwfht2e5xgts5z6dfxm", 6 | "external_url": "https://blockexplorer.io", 7 | "attributes": [ 8 | { 9 | "trait_type": "Category", 10 | "value": "Utility" 11 | }, 12 | { 13 | "trait_type": "Network", 14 | "value": "Solana Mainnet" 15 | } 16 | ], 17 | "properties": { 18 | "files": [ 19 | { 20 | "uri": "https://storacha.network/ipfs/bafybeidtk2ycaglsbr2ebauzwa44d5oblv5dkgnwwfht2e5xgts5z6dfxm", 21 | "type": "image/png" 22 | } 23 | ], 24 | "category": "image", 25 | "creators": [ 26 | { 27 | "address": "HFGYNfJpKsAoChF6kPrESXD2RFQa9jcsgQAf4hicDpAQ", 28 | "share": 100 29 | } 30 | ] 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 💧 Add Your Solana Token to a Liquidity Pool — Raydium 2025 Tutorial 2 | 3 | A complete, step-by-step guide to making your custom Solana token **tradable** by adding it to a **Raydium liquidity pool**. 4 | 5 | This tutorial builds on the previous **Solana Token Tutorial** (non–Token-2022 version). 6 | If you haven’t yet created your token, complete that guide first before proceeding. 7 | 8 | All steps are verified on **Mainnet-Beta** (Raydium does not support Devnet). 9 | 10 | --- 11 | 12 | ## 🧩 Step-by-Step Tutorial 13 | 14 | --- 15 | 16 | ## ⚙️ 1️⃣ What You’ll Learn 17 | 18 | By the end of this tutorial, you’ll know how to: 19 | 20 | - Understand what a **liquidity pool** and **AMM** (Automated Market Maker) are 21 | - Mint your token on **mainnet-beta** 22 | - Add a **Raydium liquidity pool** pairing your token with **SOL** 23 | - View your new market on **Dexscreener** and **Jupiter** 24 | - Give your token its **first real market value** 25 | 26 | --- 27 | 28 | ## 💡 2️⃣ What You’ll Need 29 | 30 | Before starting, make sure you have: 31 | 32 | - ✅ **Phantom Wallet** (set to *Mainnet-Beta*) 33 | - ✅ **SOL** in your wallet (~0.05 SOL or about $7 for all fees) 34 | - ✅ Your **mint address** for the token you created earlier 35 | - ✅ Optional: your token logo and metadata hosted on **Storacha** 36 | 37 | --- 38 | 39 | ## 🪙 3️⃣ Mint Your Token on Mainnet-Beta 40 | 41 | If your existing token was created on **Devnet**, it won’t appear on Raydium. 42 | You’ll need to mint a real token on mainnet first. 43 | 44 | ```bash 45 | solana config set --url https://api.mainnet-beta.solana.com 46 | ``` 47 | 48 | Create or use a clean mainnet wallet: 49 | 50 | ```bash 51 | solana-keygen new --outfile ~/.config/solana/mainnet.json 52 | solana config set --keypair ~/.config/solana/mainnet.json 53 | ``` 54 | 55 | Fund it with a small amount of SOL from an exchange. 56 | 57 | --- 58 | 59 | ### 🧱 Mint tokens 60 | 61 | #### Create your token mint 62 | ```bash 63 | spl-token create-token --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb --enable-metadata --decimals 9 64 | ``` 65 | 66 | #### Create a token account for your wallet 67 | ```bash 68 | spl-token create-account 69 | ``` 70 | 71 | #### Mint your initial supply 72 | ```bash 73 | spl-token mint 1000000 74 | ``` 75 | 76 | --- 77 | 78 | ## 🔍 4️⃣ Verify Your Token on Explorer 79 | 80 | Before attaching metadata, let’s make sure your token was created successfully and that your wallet holds the minted supply. 81 | 82 | ### ✅ Check on Solana Explorer 83 | Visit: 84 | ``` 85 | https://explorer.solana.com/address/?cluster=mainnet 86 | ``` 87 | 88 | You should see your **Token Mint Account** details, including: 89 | - Total supply (e.g., `1,000,000`) 90 | - Mint authority (your wallet address) 91 | - Decimals (`9`) 92 | 93 | Click **“Token Accounts”** and confirm your wallet address appears there as the **owner** with your full balance. 94 | 95 | --- 96 | 97 | ### 🧠 Optional CLI Verification 98 | You can also confirm it via Solana CLI: 99 | ```bash 100 | spl-token accounts 101 | ``` 102 | 103 | This shows all tokens your wallet holds. 104 | Look for your mint address and verify the correct balance. 105 | 106 | Example output: 107 | ``` 108 | Token Balance 109 | ------------------------------------------------------------ 110 | 5G2Jf9jP...xyz (MyToken Token) 1000000 111 | ``` 112 | 113 | ✅ That confirms your token exists and is in your wallet. 114 | 115 | --- 116 | 117 | ### 💡 Tip 118 | If you open Phantom and don’t see your token yet: 119 | - Click “+” → “Import Token” → paste your mint address. 120 | - Or use **Solflare**, which often displays metadata faster. 121 | 122 | --- 123 | 124 | ## 🧾 5️⃣ Add Metadata (via Storacha) 125 | 126 | You’ll now attach your metadata and image to your token using **Storacha** for decentralized IPFS hosting. 127 | 128 | --- 129 | 130 | ### ⚙️ Step 1 — Upload Your Image 131 | 132 | 1. Visit **[https://storacha.network](https://storacha.network)**. 133 | 2. Upload your **token image** (for example `token.png`). 134 | 3. Copy the **direct image URL**, which will look like this: 135 | 136 | ``` 137 | https://storacha.network/ipfs/ 138 | ``` 139 | 140 | --- 141 | 142 | ### ⚙️ Step 2 — Create `metadata.json` 143 | 144 | Create or edit your `metadata.json` file to include the new image URL: 145 | 146 | ```json 147 | { 148 | "name": "MyToken Token", 149 | "symbol": "MTK", 150 | "description": "Example token created on Solana.", 151 | "image": "https://storacha.network/ipfs/", 152 | "attributes": [ 153 | { "trait_type": "Type", "value": "Utility" } 154 | ], 155 | "properties": { 156 | "files": [ 157 | { 158 | "uri": "https://storacha.network/ipfs/", 159 | "type": "image/png" 160 | } 161 | ] 162 | } 163 | } 164 | ``` 165 | 166 | Save this as `metadata.json`. 167 | 168 | --- 169 | 170 | ### ⚙️ Step 3 — Upload the JSON File 171 | 172 | Upload your `metadata.json` file to **Storacha** and copy the resulting URL: 173 | 174 | ``` 175 | https://storacha.network/ipfs/ 176 | ``` 177 | 178 | --- 179 | 180 | ### ⚙️ Step 4 — Initialize Metadata On-Chain 181 | 182 | Finally, initialize your token’s metadata account on-chain (the first time setup): 183 | 184 | ```bash 185 | spl-token initialize-metadata "MyToken Token" "MTK" "https://storacha.network/ipfs/" 186 | ``` 187 | 188 | This creates the metadata account for your token. 189 | It only needs to be done **once**. 190 | 191 | > 💡 **Need to make a change later?** 192 | > Use: 193 | > ```bash 194 | > spl-token update-metadata "MyToken Token" "MTK" "https://storacha.network/ipfs/" 195 | > ``` 196 | > if you upload a new image or JSON in the future. 197 | 198 | --- 199 | 200 | ## 💧 6️⃣ What Is a Liquidity Pool? 201 | 202 | A **liquidity pool** is a smart contract that holds two tokens — for example, your token + SOL. 203 | When traders buy or sell one token for the other, the pool automatically updates prices based on supply and demand. 204 | 205 | Visualize it like a **bucket** with two sides: 206 | - One side holds your token 207 | - The other holds SOL 208 | If someone buys your token, that side empties slightly and the price rises. 209 | 210 | This system is known as an **Automated Market Maker (AMM)**. 211 | Instead of matching buyers and sellers like a traditional order book, an AMM uses simple math (`x × y = k`) to keep the pool balanced and determine prices automatically. 212 | 213 | --- 214 | 215 | ## ⚖️ 7️⃣ Choosing a Pairing Token 216 | 217 | You can pair with **SOL** or **USDC**, but here’s the difference: 218 | 219 | | Pair | Pros | Notes | 220 | |------|------|-------| 221 | | **SOL** | Most common ✅ | Best visibility, simple setup, higher volume | 222 | | **USDC** | Stable reference price | Slightly more setup, fewer pools | 223 | 224 | > 💡 For this tutorial, we’ll use **SOL** — it’s simpler, more liquid, and widely supported. 225 | 226 | --- 227 | 228 | ## 🧭 8️⃣ Add Liquidity on Raydium 229 | 230 | 1. Visit **[https://raydium.io/liquidity](https://raydium.io/liquidity)** 231 | 2. Connect your **Phantom wallet** (Mainnet) 232 | 3. Click **Add Liquidity** 233 | 4. In the first field, paste your **token mint address** 234 | 5. In the second field, choose **SOL** 235 | 6. Enter amounts — for example: 236 | - 0.02 SOL 237 | - 200 of your token 238 | 7. Click **Add Liquidity** → Approve both transactions in Phantom 239 | 240 | Once confirmed, Raydium will create your new **LP token** representing your share of the pool. 241 | 242 | --- 243 | 244 | ## 📊 9️⃣ Verify Your Pool 245 | 246 | After a minute or two, check: 247 | 248 | ### ✅ On Dexscreener 249 | Go to: 250 | ``` 251 | https://dexscreener.com/solana/ 252 | ``` 253 | 254 | You should see a live chart showing your token paired with SOL. 255 | 256 | ### ✅ On Jupiter 257 | Visit: 258 | ``` 259 | https://jup.ag/swap/-So11111111111111111111111111111111111111112 260 | ``` 261 | 262 | Your token is now **tradable** on the Solana DEX network! 263 | 264 | --- 265 | 266 | 🧠 **Author:** BlockExplorer 267 | 📅 **Updated:** October 2025 268 | 📘 **Version:** Raydium Liquidity Pool Tutorial Edition 269 | --------------------------------------------------------------------------------