Knowledge base
Token-20225 min read

Token-2022: permanent delegate and transfer hooks

Token-2022 supports extensions on mints and token accounts. They can change authorities, transfer rules or data visibility. Evaluate the actual configuration rather than treating all extensions as harmless or dangerous.

Token-2022 vs classic SPL Token

Depending on their type, extensions are stored on mints or token accounts and can change transfer behavior. The account layout differs from classic SPL Token, so wallets and explorers do not always surface extensions explicitly. That is why they must be read separately before swapping.

Permanent delegate

PermanentDelegate is a mint-level authority to transfer or burn tokens from accounts of that mint without the account owner's signature. It does not cover other mints or arbitrary wallet funds. A swap does not automatically remove it, and Revoke for an ordinary delegate does not revoke PermanentDelegate. Check the current mint configuration.

Transfer hook

A transfer hook calls a program during a transfer and adds runtime logic, such as rejecting the transfer. The original transfer accounts are passed to the hook read-only, and the sender's signer privilege is not passed through. Access to extra accounts is limited to the permissions passed. A hook does not automatically gain authority to redirect or move arbitrary funds without the required authorization. Decoding outer instructions alone does not describe all program logic.

Other extensions to watch

Freeze authority can freeze an account; pausable can halt transfers; transfer fee takes a cut of the amount; non-transferable forbids transfer entirely; MintCloseAuthority concerns closing a mint at zero supply, not holders' token accounts. A separate token-account close authority alone cannot transfer its token balance: closing a non-native account requires that balance to be zero, and extensions may add constraints. Wrapped SOL can be closed with a balance to reclaim SOL. Confidential transfers concern privacy, but do not guarantee token or transaction safety. Each carries its own risk or restriction.

How SpaceSwap handles them

When mint data is available, the pre-sign check blocks detected permanent delegates and transfer hooks and warns about freeze authority, mint-close authority, transfer fee, non-transferable and pausable. The close warning here concerns the mint, not a token account's close authority. Unavailable data can produce a warning without blocking. This is not a complete audit of every extension or a safety guarantee; inspect the mint and accounts yourself too.

Key takeaways

  • A permanent delegate can move only its mint's tokens without a new account-owner signature.
  • A transfer hook runs logic within passed permissions, without inheriting the sender's signer privilege.
  • Freeze, pausable, transfer fee, non-transferable are separate risks.
  • SpaceSwap blocks detected permanent delegates and hooks when mint data is available; not a safety guarantee.

Ready to swap with pre-sign checks?

SpaceSwap blocks drain instructions, bounds writable accounts and simulates the transaction before signing. Funds are signed only in your wallet.

Open swap