Authorities
SPL mints carry two optional authorities: mint authority (inflate supply) and freeze authority (freeze token accounts). Revoking authorities is a common immutability and trust signal for launched tokens.
Recipe
spl-token display <MINT>
spl-token authorize <MINT> mint --disable
spl-token authorize <MINT> freeze --disableuse anchor_spl::token::{self, SetAuthority};
token::set_authority(
cpi_ctx,
spl_token::instruction::AuthorityType::MintTokens,
None,
)?;When to reach for this:
- Locking fixed supply after initial mint
- Removing freeze power before community launch
- Transferring authority to multisig or DAO PDA
- Auditing third-party token trust assumptions
Working Example
MINT=<YOUR_MINT>
# Inspect current authorities
spl-token display "$MINT"
# Revoke mint authority permanently
spl-token authorize "$MINT" mint --disable
# Revoke freeze authority (users cannot be frozen)
spl-token authorize "$MINT" freeze --disable
spl-token display "$MINT"use anchor_lang::prelude::*;
use anchor_spl::token::{self, Mint, Token, SetAuthority};
#[derive(Accounts)]
pub struct RevokeMintAuthority<'info> {
#[account(mut)]
pub mint: Account<'info, Mint>,
pub current_authority: Signer<'info>,
pub token_program: Program<'info, Token>,
}
pub fn revoke_mint_authority(ctx: Context<RevokeMintAuthority>) -> Result<()> {
require!(
ctx.accounts.mint.mint_authority == Some(ctx.accounts.current_authority.key()),
ErrorCode::NotMintAuthority
);
let cpi = CpiContext::new(
ctx.accounts.token_program.to_account_info(),
SetAuthority {
current_authority: ctx.accounts.current_authority.to_account_info(),
account_or_mint: ctx.accounts.mint.to_account_info(),
},
);
token::set_authority(
cpi,
spl_token::instruction::AuthorityType::MintTokens,
None,
)?;
Ok(())
}
#[error_code]
pub enum ErrorCode {
NotMintAuthority,
}What this demonstrates:
authorize --disablesets authority field toNone- Revocation is irreversible for that authority type
- On-chain programs use
set_authorityCPI with current authority signer
Deep Dive
How It Works
- Mint account stores
mint_authority: COption<Pubkey>andfreeze_authority: COption<Pubkey> - Mint authority required for
MintTo; freeze authority forFreezeAccount/ThawAccount - Close authority on token accounts (separate from mint) controls who can close empty accounts
- Token account owner is distinct from mint authorities
Authority Types
| Authority | Scope | Revoked means |
|---|---|---|
| Mint tokens | Mint account | No inflation ever |
| Freeze account | Mint account | Cannot freeze holder accounts |
| Account owner | Token account | Cannot transfer (N/A - ownership transfer is different) |
| Close account | Token account | Cannot close to reclaim rent |
Rust Notes
// Always log authority state changes for indexers
emit!(AuthorityRevoked { mint: mint.key(), kind: "mint" });Gotchas
- Revoking mint before finishing distribution - cannot mint remaining allocation. Fix: complete mints first, then revoke.
- Leaving freeze authority with anonymous team - holders can be frozen. Fix: revoke freeze or transfer to transparent multisig.
- Assuming revoke mint revokes freeze - independent fields. Fix: revoke both explicitly.
- Transferring authority to wrong pubkey - irreversible loss of control. Fix: verify pubkey on devnet dry-run.
- UI hiding authority state - users trust scam tokens. Fix: display
spl-token displayfields in explorers.
Alternatives
| Alternative | Use When | Don't Use When |
|---|---|---|
| Multisig mint authority | DAO-controlled inflation | Simple fixed-supply launch |
| PDA mint authority | Programmatic emissions | Human-operated treasury only |
| Token-2022 permanent delegate | Forced policy enforcement | Standard fungible token |
FAQs
What is mint authority?
Pubkey allowed to inflate supply via MintTo until set to None.
What is freeze authority?
Pubkey allowed to freeze/thaw token accounts for that mint, blocking transfers while frozen.
Can revoked authority be restored?
No. Setting None is permanent for that authority slot.
Should I revoke freeze authority?
Yes for most community tokens unless freeze is a documented compliance feature.
Can mint authority be a PDA?
Yes. Program signs emissions with PDA seeds.
Who can change authorities?
Current authority signer for that authority type only.
Does closing mint recover rent?
Separate instruction path - mint accounts persist until explicitly closed where supported.
How do auditors check authorities?
Read mint account on-chain or spl-token display - never trust UI labels alone.
Can freeze authority freeze all holders?
Yes, per-account freeze calls - reason many projects revoke freeze authority.
What about Token-2022 authorities?
Same mint/freeze model plus extension-specific authorities (e.g., transfer fee config).
Is mint authority required at creation?
Can be set to None at init for pre-fixed supply minted in same transaction batch.
How do I transfer authority to multisig?
set_authority to multisig pubkey while current authority signs.
Related
- Minting & Burning - uses mint authority
- SPL Token Best Practices - launch authority checklist
- Transfers & Delegates - freeze impact
Stack versions: This page was written for Agave 4.1.1, Solana CLI 3.0.10, Anchor 0.32.1, anchor-lang 0.32.1, Rust 1.91.1, @solana/kit 7.0.0, Surfpool 0.12.0, and LiteSVM 0.6.x.