Skip to main content
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.

Why Metadata Matters

  • 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

Metadata JSON Format

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

OptionProsCons
GitHub repositoryFree, version controlled, reliablePublic repo required
Arweave/IPFSPermanent, decentralizedSmall cost, immutable (can’t update)
Your own domainFull controlRequires 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.

Create or Update Metadata via SDK

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:
  1. Initialize strategies to connect your vault to DeFi protocols
  2. Consider verifying your token on Jupiter to avoid wallet warnings