When users deposit into your vault, they receive LP tokens. By default, these tokens have no metadata — wallets will display them as “Unknown Token.” Setting up metadata ensures a proper user experience.
- Wallets (Phantom, Solflare, etc.) display the token name, symbol, and image
- Jupiter and other aggregators use metadata for token identification
- Required for token verification on Jupiter
Host a JSON file with the following structure at a publicly accessible URL:
{
"name": "My Vault LP",
"symbol": "mvLP",
"description": "LP token for My Vault on Ranger Earn",
"image": "https://your-domain.com/vault-logo.png"
}
Hosting Options
| Option | Pros | Cons |
|---|
| GitHub repository | Free, version controlled, reliable | Public repo required |
| Arweave/IPFS | Permanent, decentralized | Small cost, immutable (can’t update) |
| Your own domain | Full control | Requires hosting |
Recommended: Host your metadata JSON and logo image in a GitHub repository. See github.com/ranger-finance/assets for an example of how to structure your assets.
Use the createCreateLpMetadataIx instruction to attach metadata to your vault’s LP token:
import { VoltrClient } from "@voltr/vault-sdk";
import {
Connection,
Keypair,
PublicKey,
sendAndConfirmTransaction,
} from "@solana/web3.js";
import fs from "fs";
// Setup
const connection = new Connection("your-rpc-url");
const client = new VoltrClient(connection);
const adminKp = Keypair.fromSecretKey(
Uint8Array.from(JSON.parse(fs.readFileSync("/path/to/admin.json", "utf-8")))
);
const vault = new PublicKey("your-vault-pubkey");
// Create metadata instruction
const metadataIx = await client.createCreateLpMetadataIx(
{
name: "My Vault LP",
symbol: "mvLP",
uri: "https://your-domain.com/metadata.json",
},
{
vault,
admin: adminKp.publicKey,
payer: adminKp.publicKey,
}
);
// Send transaction
const txSig = await sendAndConfirmTransaction(
[metadataIx],
connection,
[adminKp]
);
console.log("Metadata created:", txSig);
Only the admin can create or update LP token metadata.
Next Steps
After setting up metadata:
- Initialize strategies to connect your vault to DeFi protocols
- Consider verifying your token on Jupiter to avoid wallet warnings