Core Accounts
The base-token and quote-token vaults are token accounts controlled by the program’s presale authority PDA. The program checks that vault and mint accounts match the
Presale state before moving tokens.
Access Models
Presale Vault supports three whitelist modes.Permissionless
Permissionless sales let anyone create an escrow while the sale is ongoing. The escrow uses the default registry index0, and the escrow’s personal cap defaults to the registry’s buyer maximum.
Permission with Authority
Authority-mode sales require anOperator account. The operator owner signs escrow creation, and the operator must belong to the presale creator. The escrow creation instruction assigns:
- buyer wallet
- registry index
- personal deposit cap
Permission with Merkle Proof
Merkle-mode sales require aMerkleRootConfig. The buyer provides a proof for a leaf containing:
- buyer wallet
- registry index
- personal deposit cap
The program validates the proof and cap data on-chain, but it does not prevent the same wallet from appearing in multiple registries. Creators and launchpads should prevent unintended duplicate eligibility off-chain.
Permissioned Server Metadata
For permissioned sales, the creator can publish an optionalPermissionedServerMetadata account with a server URL. The URL can point users to Merkle proofs or authority-mode transaction data.
This account is only allowed for permissioned whitelist modes and can be created while the sale is not started or ongoing. The creator can close it in any sale state.
Lifecycle Gates
Creator Settlement
After a completed sale, the creator can withdraw raised quote token once. The withdrawal is capped by the sale’s maximum cap, which is especially important for oversubscribed Pro Rata sales. After a failed sale, the creator can withdraw the base-token supply instead. Deposit fees are collected separately. In Fixed Price and FCFS, the creator can collect total deposit fees after completion. In Pro Rata, the collectible fee excludes the fee attributed to overflow quote that buyers can refund. See Presale Vault Formulas for the exact withdrawal and fee formulas.Close Conditions
Escrow accounts can only be closed once they have no remaining economic claim:- during an ongoing sale, the escrow must have zero deposit and zero deposit fee
- after a failed sale, the escrow must have withdrawn remaining quote, unless it has zero deposit and zero fee
- after a completed sale, refundable quote must be withdrawn when applicable, and all tokens claimable through the vesting end must be claimed

