Tokens

Getting Started

Burn Fungible Tokens

Burn fungible tokens to permanently remove them from circulation on the Solana blockchain.

Burn Tokens

In the following section you can find a full code example and the parameters that you might have to change. Burning tokens permanently destroys them—this action cannot be undone.

// To install all the required packages use the following command
// npm install @metaplex-foundation/mpl-toolbox @metaplex-foundation/umi @metaplex-foundation/umi-bundle-defaults
import {
burnToken,
findAssociatedTokenPda,
} from '@metaplex-foundation/mpl-toolbox';
import {
keypairIdentity,
publicKey,
} from '@metaplex-foundation/umi';
import { createUmi } from '@metaplex-foundation/umi-bundle-defaults';
import { readFileSync } from 'fs';
// Initialize Umi with Devnet endpoint
const umi = createUmi('https://api.devnet.solana.com')
// Load your wallet/keypair
const wallet = '<your wallet file path>'
const secretKey = JSON.parse(readFileSync(wallet, 'utf-8'))
const keypair = umi.eddsa.createKeypairFromSecretKey(new Uint8Array(secretKey))
umi.use(keypairIdentity(keypair))
// Your token mint address
const mintAddress = publicKey('<your token mint address>')
// Find the token account to burn from
const tokenAccount = findAssociatedTokenPda(umi, {
mint: mintAddress,
owner: umi.identity.publicKey,
})
// Burn 100 tokens
await burnToken(umi, {
account: tokenAccount,
mint: mintAddress,
amount: 100,
}).sendAndConfirm(umi)
console.log('Burned 100 tokens')
console.log('Mint:', mintAddress)
console.log('Token Account:', tokenAccount)

Parameters

Customize these parameters for your burn operation:

ParameterDescription
mintAddressThe token mint address
amountNumber of tokens to burn

How It Works

The burn process involves two steps:

  1. Find your token account - Locate your token account using findAssociatedTokenPda
  2. Burn tokens - Execute the burn with burnToken

When to Burn Tokens

Common use cases for burning tokens include:

  • Reducing supply - Decrease total circulating supply
  • Deflationary mechanics - Implement tokenomics that reduce supply over time
  • Closing positions - Remove tokens when they're no longer needed
  • Error correction - Remove tokens minted by mistake

Important Notes

  • Burning is permanent and cannot be reversed
  • You can only burn tokens that you own
  • The amount should account for decimals (e.g., for 9 decimals, burning 1 token requires amount: 1_000_000_000)