Here we see that anybody can create an ATA for anybody else's wallet for any token:
But the process of enforcing Token-2022 Program's immutable ownership extension is applied to ATA at the time of ATA creation:
Above we see that createInitializeImmutableOwnerInstruction
is performed in a transaction that creates the ATA right before createInitializeAccountInstruction
in the transaction, all of which happens well after the creation of a mint that doesn't speak to enforcing immutable ownership in any way.
How can we ensure that a 3rd party that creates these ATAs for your token for somebody's wallet is indeed creating those ATAs with immutable ownership?
I do see this seemingly ambiguous statement: The Associated Token Account program always uses this extension when creating accounts.
But I am confused about what this means because if it literally does this by default without any intervention by anyone in any way, why are there instructions and a code example on how to do it? Everything about the context in this documentation gives the impression it is an opt-in extension.
If it really is a perk that comes automatic with using the Token-2022 Program, is there a danger of someone explicitly creating an ATA without immutable ownership?