Skip to content
An asset manager’s vault holding a gated token is subject to that gate like any other holder. If the vault’s accounts were not allowlisted at deployment, the first deposit fails. This tutorial covers the token side of a vault deployment: show that the gate applies to a vault, get the vault onto the allowlist, and verify its account. It continues with the mint from gate the holders, so $MINT and $LIST should already be exported, on the same network.
Mosaic issues and operates tokens; it does not deploy vaults. The steps below use an ordinary key file to stand in for the vault’s authority.
1

Stand up the vault authority

In a deployed vault this address is a PDA owned by the vault program. Here a key file stands in, which is enough to show the allowlist interactions: the gate checks the address only, so a PDA and a keypair are treated the same way, in allowlist and in blocklist mode.
Terminal
When you move to a real vault, allowlist the program’s PDA instead of a wallet, derived the same way the program derives it. See program and authority design for why the vault’s token account should be owned by a PDA.
2

Show that the gate blocks an unlisted vault

Before allowlisting, confirm the failure mode: have the holder move the asset into the vault while it is not on the list, with the transfer script from gate the holders, run with $VAULT 1.
Mosaic SDK
Sending 1 to the vault before it is on the allowlist
Output
It fails. The vault’s token account is created frozen, and the gate program rejects the permissionless thaw for it with custom program error 0x1002 (4098), because the vault is not on the list. A program is not exempt from the gate. A deposit that inserts the thaw fails with this error; one that does not fails on the frozen account (0x11).
3

Allowlist every account the vault touches

List them before you start. A vault over a gated token needs at least the vault’s wallet or PDA on this mint’s list and, if the fund’s shares are themselves a restricted token, each participant’s wallet on the share mint’s list. This covers the first:
Repeat it for each address on your list. A missing one fails when a participant tries to transact.
4

Confirm the deposit path works

Run the same transfer again. It succeeds and prints its signature; as in the issuing tutorial, only the list entry changed.
5

Verify the gate state of each account

Before going live, read every account the vault depends on and confirm its state. This is the pre-deployment check to automate. First derive the vault’s token account address, with spl-token or with the derive-ata script from the custodian tutorial run with $VAULT:
spl-token
Deriving the vault’s token account
Output
Export the Associated token address it prints as VAULT_ATA:
Terminal
Then read the account with spl-token, or run the read-account script with $VAULT_ATA:
spl-token
Reading the vault’s token account after the deposit
Output
State must read Initialized. Frozen means the account is gated out, and any deposit or settlement that touches it will fail.
6

Confirm what a pause does to the vault

A pause of the token stops the vault along with everything else: requests in progress cannot settle while it holds. Issuer side:
With the token paused, the same deposit fails with 0x43 (67), Token-2022’s MintPaused:
Mosaic SDK
Sending 1 to the vault while the token is paused
Output
Then resume, issuer side:

​Building the vault itself

The remaining decisions are set out in vault architectures: whether the design is synchronous or request-and-settle, what is escrowed at request time, how the cut-off is enforced, who may publish a valuation, and what happens to a request that cannot settle. If subscriptions or redemptions are to settle through the DvP program, note that it rejects mints carrying Scaled UI Amount, which this tutorial’s mint has.

​Next steps