Skip to main content

Burn Tokens

The xyz token burn command permanently destroys tokens from your balance, reducing the total supply.

Usage

xyz token burn <contract> <amount> --from <key>

Arguments

ArgumentDescription
contractToken contract address
amountAmount to burn (in smallest unit)

Flags

FlagDescriptionRequired
--fromYour signing keyYes
--dry-runSimulate onlyNo

Examples

Basic Burn

xyz token burn xyz1tokencontract... 1000000 --from mykey

Dry Run

xyz token burn xyz1tokencontract... 1000000 --from mykey --dry-run
Output:
Dry run mode - transaction not broadcast

Estimated gas: 100,000
Estimated fee: 1,000 uxyz

Burn Details:
  Token: xyz1tokencontract...
  From: xyz1youraddress...
  Amount: 1,000,000

Output

Successful burn:
Tokens Burned Successfully!

Token:        xyz1tokencontract...
Burned From:  xyz1youraddress...
Amount:       1,000,000
TxHash:       ABC123DEF456...
Gas Used:     95678
Block:        12345

Verify Burn

Check balance and total supply after burning:
# Your balance (should be reduced)
xyz token balance xyz1tokencontract... --key mykey

# Total supply (should be reduced)
xyz token info xyz1tokencontract...

Use Cases

Deflationary Mechanics

Reduce supply over time to increase scarcity

Token Buyback

Buy tokens from market and burn them

Error Correction

Burn accidentally minted tokens

Bridge Burns

Burn when bridging to another chain

Amount Calculation

Amount is in the token’s smallest unit. For 6 decimals:
DisplayAmount (base)
1 MTK1,000,000
0.5 MTK500,000
100 MTK100,000,000

Burn All Tokens

To burn your entire balance:
# Get current balance
BALANCE=$(xyz token balance xyz1contract... --key mykey --output json | jq -r '.balance')

# Burn all
xyz token burn xyz1contract... $BALANCE --from mykey

Error Handling

ErrorMeaningSolution
”insufficient token balance”Not enough tokensCheck balance first
”contract not found”Wrong contract addressVerify contract exists

Check Balance Before Burn

# Verify you have enough tokens
xyz token balance xyz1contract... --key mykey

Under the Hood

xyz token burn executes a MsgExecuteContract:
{
  "contract": "xyz1tokencontract...",
  "msg": {
    "burn": {
      "amount": "1000000"
    }
  },
  "funds": []
}

Burn vs BurnFrom

CW20 has two burn methods:
MethodWho BurnsRequires
burnToken holderJust your tokens
burn_fromApproved spenderPrior allowance
The xyz token burn command uses burn (burning your own tokens).
Burning is irreversible! Burned tokens are permanently destroyed and cannot be recovered.

Troubleshooting

You can only burn tokens you own:
xyz token balance xyz1contract... --key mykey
Amount must be greater than 0.