Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.meteora.ag/llms.txt

Use this file to discover all available pages before exploring further.

Presale Vault supports three sale modes. The mode controls deposit capacity, withdrawal support, token-allocation math, and when the sale can end.

Comparison

ModePrice behaviorDeposit capacityDuring-sale withdrawalToken allocation
Fixed PriceCreator sets a Q64.64 quote-per-base priceCannot exceed the global maximum cap or available registry supplyConfigurableBased on fixed price, then vested
FCFSFinal implied price depends on deposits and supplyCannot exceed the global maximum capDisabledRegistry supply is split by deposit share
Pro RataFinal implied price depends on deposits and supplyCan exceed the global maximum cap, subject to buyer capsEnabledRegistry supply is split by deposit share; overflow quote is refundable

Fixed Price

Fixed Price mode is for sales where buyers should know the quote-per-base price before participating. The creator creates a fixed-price extra-params account before initializing the vault. That account stores:
  • q_price, a Q64.64 price in quote-token smallest units per base-token smallest unit
  • disable_withdraw, which controls whether buyers can withdraw during the ongoing sale
The program verifies that the configured price can buy at least one base-token unit for the relevant buyer caps, that the maximum cap can be fulfilled by the deposited base supply, and that the minimum and maximum caps buy different base-token amounts.

Deposit behavior

Fixed Price deposits are capped by:
  • remaining global quote capacity
  • remaining personal and registry deposit capacity
  • remaining base-token supply in the buyer’s registry
The program may reduce a requested deposit to the largest amount that maps cleanly to purchasable base-token units. Fixed-price token amounts are rounded down in base-token units, and quote needed for those units is rounded up.

Claim behavior

The sold amount for a registry is: min(registry_total_deposit×264q_price, registry_supply)\min\left(\left\lfloor \frac{\text{registry\_total\_deposit} \times 2^{64}}{\text{q\_price}} \right\rfloor,\ \text{registry\_supply}\right) Each buyer’s claimable amount is their share of that sold amount, subject to the unlock schedule.

FCFS

FCFS mode is for capped sales where deposits should stop once the sale reaches the maximum cap. Deposits are capped by:
  • remaining global quote capacity
  • remaining personal and registry deposit capacity
FCFS does not support during-sale withdrawals. If early completion is not disabled, the program updates the presale end time to the current timestamp once total deposits reach the maximum cap.

Claim behavior

For each registry that received deposits, the full registry supply is sold and split by deposit share: user_allocation=registry_supply×user_depositregistry_total_deposit\text{user\_allocation} = \left\lfloor \frac{\text{registry\_supply} \times \text{user\_deposit}} {\text{registry\_total\_deposit}} \right\rfloor A registry with no deposits is not treated as sold, so its supply is unsold base token.

Pro Rata

Pro Rata mode is for sales where buyers should be able to participate throughout the sale window even if demand exceeds the maximum cap. Deposits are not capped by the global maximum cap. They are still capped by the buyer’s remaining deposit quota. Pro Rata supports during-sale withdrawals.

Claim and refund behavior

Token allocation uses the same registry-level share formula as FCFS: user_allocation=registry_supply×user_depositregistry_total_deposit\text{user\_allocation} = \left\lfloor \frac{\text{registry\_supply} \times \text{user\_deposit}} {\text{registry\_total\_deposit}} \right\rfloor If total deposits exceed the maximum cap, the excess quote token is refundable after the sale completes. The creator can withdraw only up to presale_maximum_cap; buyers withdraw the remaining quote token proportionally. Deposit fees on the refunded portion are also refundable. The creator’s collectible fee in Pro Rata is the total fee minus the fee attributed to overflow quote.
All three modes can be used with any whitelist mode. Registry and personal-cap constraints are covered in the Configuration Guide.

Choosing a mode

Fixed Price

Use when the sale needs an explicit price and predictable buyer communication.

FCFS

Use when the sale should be hard-capped and deposits are meant to be committed.

Pro Rata

Use when the sale may be oversubscribed and unused quote should be refunded fairly.