Token-2022 is Solana's token program with optional extensions for features such as transfer fees, custom transfer logic, and adjusted balance displays. It is already used by payment stablecoins, tokenized gold, and tokenized equities.

Those assets make token support a practical integration problem. A wallet has to display the right balance. A quote has to use the right units. A transaction has to include the accounts and instructions that the token requires.

My recent work on Manifest gave me two concrete examples of how assumptions can break between a client and execution. One involved a missing vault address. The other returned a fraction of the smallest token unit. Understanding those fixes starts with the tokens and the exchange they move through.

What Token-2022 adds

A Solana token has a mint account, which records information such as supply and decimal precision. A token account holds a balance of that mint for an owner. Solana has both the original Token Program and Token-2022. A mint belongs to one of them, and applications must use the corresponding program when creating token accounts and building instructions. Solana token model

Token-2022 keeps this model and adds optional state and instructions through extensions. Different mints can enable different features, so identifying the program is only the beginning of understanding a token. Token Extensions

Three extensions illustrate the range:

  • Transfer fees withhold part of a transfer on the destination token account. The amount sent and the amount immediately available to the recipient can differ. Transfer fees
  • Transfer Hook invokes another program during a transfer. That program can require additional accounts and enforce custom logic. Transfer Hook
  • Scaled UI Amount applies a multiplier when displaying a balance. Transactions still use the underlying integer amount. Scaled UI Amount

These features affect different parts of an application. A metadata extension helps describe an asset. A transfer hook can affect whether a transaction executes. An adjusted display amount changes how a person interprets their balance.

Where Token-2022 is used

The following examples refer to the assets issued on Solana. Their implementations on other chains can use different standards.

AssetUseConnection to Token-2022
PayPal USD, or PYUSDDollar payments and transfersUses Token Extensions, including metadata and administrative capabilities. PayPal technical guide
Global Dollar, or USDGA dollar stablecoinPaxos documents its Solana implementation as a Token-2022 token. USDG whitepaper
Pax Gold, or PAXGExposure to physical goldUses Permanent Delegate for compliance controls, authorizing a designated delegate to transfer or burn tokens. Paxos implementation, extension behavior
xStocks, including AAPLx, NVDAx, and TSLAxEconomic exposure to stocksUses Token-2022 on Solana and Scaled UI Amount to reflect corporate actions. These are tracker certificates with rights defined by their issuer. Product examples, xStocks FAQ

The integration work is continuing. On July 22, 2026, 0x announced Token-2022 routing in its Solana Swap API, naming stablecoins, tokenized equities, and launchpad tokens as use cases. That gives this subject a direct connection to the infrastructure applications use to trade. 0x announcement

A payment with a transfer fee

Consider a hypothetical mint with a 1% transfer fee and a maximum fee that does not limit this transfer. Sending 100 tokens gives the recipient 99 spendable tokens and records 1 token as withheld fees on the destination account. An application crediting a payment needs to account for that difference. This example describes a fee configuration, not the current fee policy of PYUSD or USDG. Transfer fee behavior

The mint also determines the extensions required on a new token account. A mint with TransferFeeConfig requires the account's TransferFeeAmount state, which means account creation must allocate the corresponding space. Required account state

An xStock with an adjusted display balance

xStocks provides a different example. Suppose a balance, after applying the mint's decimals, is 10 unscaled token units. With a display multiplier of 1.1, the application shows 11 adjusted units. Sending the equivalent of 5.5 adjusted units requires 5 unscaled units, encoded as integer atoms using the mint's decimals.

This is how a display rule becomes a transaction concern. A wallet or trading interface has to convert between the quantity a person sees and the quantity it submits. The xStocks documentation describes this mechanism for dividends and stock splits. xStocks multiplier guide

How Manifest moves tokens

Manifest is an order book exchange on Solana. Each market trades a base asset against a quote asset. An order specifies a quantity and a price; the exchange matches compatible orders.

Manifest separates its Core order book from surrounding programs and clients. Core implements matching and accounting. Wrapper programs add trading features, while SDKs construct transactions and adapters provide interfaces for integrations. This creates several places where a client's view of a trade must agree with Core's rules. Manifest design

Its Global orders let the same deposited tokens back orders across multiple markets. Tokens move into a market when a Global order fills. Each mint has a corresponding Global vault, so the base and quote mints lead to different vault addresses. Global orders

For a market involving Token-2022, an integration must also carry the relevant token program and mint conditions through its quote and transaction construction.

Market and mint state feed the quote and account construction paths. Both paths must agree with the conditions checked during transaction execution.

A quote and an account list describe the same trade. Execution depends on both, together with the token's transfer rules and current state.

The two issues below concerned account construction and amount calculation. Both also affected ordinary SPL Token integrations. Their connection to Token-2022 is the broader question they exposed: which conditions does a client preserve as a trade moves toward execution?

The quote vault missing from an address lookup table

Manifest's SDK has a helper, getSwapAltPks(), that collects addresses for a swap's address lookup table, or ALT. A versioned Solana transaction can reference addresses by table index, reducing the space used by account addresses in its message.

The helper derived both Global vault addresses from the base mint:

typescript
const baseGlobalVault = getGlobalVaultAddress(this.baseMint.address);
const quoteGlobalVault = getGlobalVaultAddress(this.baseMint.address);

Both expressions produced the same address. The helper inserted them into a Set, which removed the duplicate. The quote mint's Global vault was absent from the result, even though the base-to-quote swap instruction included it. Issue #760

The correction was small:

typescript
const quoteGlobalVault = getGlobalVaultAddress(this.quoteMint.address);

The failure was easy to miss if a test only asked whether the transaction could be constructed. The missing vault could remain a static account address in the message. In my local single-swap fixture, including it in the lookup table reduced the serialized message from 338 to 307 bytes. The observed problem was lost address compression.

The regression test therefore checked the account's actual placement in the compiled message. It covered 16 combinations of direction, exact-input or exact-output mode, and the two token programs independently selected for the base and quote mints. Each case signed, serialized, and deserialized a transaction and checked that the required vault was a writable lookup account. These program combinations used mints without additional extensions; they test account selection, not every Token-2022 transfer behavior. PR #762

There was also an operational consequence: updating the SDK does not change an ALT already stored on-chain. Existing tables need extension or replacement to gain the missing address. ALT repair instructions

A quote for a fraction of an atom

The second issue appeared in Manifest's OKX adapter, which calculates quotes from order book metadata.

Token balances use integer atoms, the smallest units of a mint. For a mint with six decimals, one token is one million atoms. Decimal precision changes how those integers are displayed; it does not create fractions of an atom.

The existing fixture used zero-decimal mints and an ask of 2 base atoms for 8 quote atoms. Its price was 4 quote atoms per base atom. The adapter calculated partial fills with a continuous proportion, while Core sized them using integer arithmetic.

Input in quote atomsOriginal adapter result in base atomsCore integer sizing in base atoms
10.250
411
822

The one-atom input exposed the mismatch. The adapter's result could not be represented as a token balance. Exact-multiple inputs concealed it because both calculations returned the same amount. Issue #761

The underlying information mattered too. The old metadata contained rounded order totals. Flooring a final floating-point answer could enforce an integer result while still disagreeing with Core's calculation from the original price. In another fixture, an ask of 3 base atoms at price 1.5 and an input of 3 quote atoms produced a legacy estimate of 1 base atom; Core and the executed swap returned 2.

The fix sizes legacy fills in integer atoms and adds a separate quote_atoms API using u64 quantities and original Core prices. Its snapshot reads the market, both mints, and relevant Global state at a common slot. The regression suite includes 13 swap scenarios executed in the local Solana program test environment. PR #763

What these fixes mean for Token-2022 support

The amount bug shows why a client must preserve the token's smallest unit. The xStocks example adds another conversion: the displayed amount can differ from the unscaled token quantity. Transfer fees add a further distinction between the amount sent and the amount available after a transfer. Each conversion needs an explicit rule.

The account bug shows why a valid-looking address collection needs a stronger check. The Global vault selected by the swap has to match the market's mint and direction. Token-2022 can introduce further requirements through account extensions and transfer hooks.

The new Manifest integer quote path makes its scope explicit. It validates mint data and extensions, and rejects transfer-fee configurations and active transfer hooks. Those cases need a quote path that accounts for their transfer effects. Its result is a Core impact estimate; current funding, later state changes, and transaction checks still require simulation before treating an output as an execution bound. Integer quote contract

Both fixes merged on October 15, 2026, UTC. The work gave me a more concrete way to review token support: follow the mint's rules into the quote, follow the quote's quantities into the instruction, and check the accounts and transfers that execution will actually use. Account fix, Quote fix

✳

Thanks for reading. Keep following your curiosity.

NEXT NOTE ↗

From Linear to My Own Agent Workboard