Deep Dive

Token-2022 and the extension model.

How the new SPL token standard separates a small base from optional extensions, and which extensions you can actually ship today.

Checked against spl-token-2022, commit 4f1c8b9

The base

Token-2022 keeps the familiar mint and account shape at its core, so existing token readers still recognise the layout. The base carries the supply, decimals, and authorities — the same fields you would expect from the older token program, now with room to grow.

Extensions

The real change is the extension list. A mint can carry a transfer fee, a permanent delegate, a non-transferable flag, or a metadata pointer, each as a separately sized slice of account data. You opt in per mint, and an extension that is not requested takes no space.

Account layout

Extensions are packed after the base, in a defined order, with their lengths recorded so a reader can walk the account without guessing. This is why a Token-2022 account can be larger than its older sibling, and why deserialisation must read the extension list before the balances.

References

  • Program — TokenzQdBNbLqP5JEhFyVp2H8QV7qW7z7z7z7z7z7z7
  • Reference build — commit 4f1c8b9
  • Related — SPL glossary entry