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.
Alpha Vault accounting is proportional: the vault buys as one account, then users receive token claims and quote refunds based on their escrow deposit share.
All on-chain arithmetic uses integer token amounts. Division rounds down.
Key Terms
| Term | Meaning |
|---|
total_deposit | Total net quote amount recorded across all escrows. |
escrow.total_deposit | Net quote amount recorded for one escrow. |
max_buying_cap | Pro Rata quote amount cap for vault fills. |
max_depositing_cap | FCFS total accepted deposit cap. |
swapped_amount | Total quote amount already used by vault fills. |
bought_token | Total launch token bought by the vault. |
claimed_token | Launch token already claimed by an escrow. |
withdrawn_deposit_overflow | Pro Rata overflow quote already withdrawn by an escrow. |
Max Swappable Amount
The max swappable amount is mode-dependent.
Pro Rata Max Swappable=min(total_deposit,max_buying_cap)
FCFS Max Swappable=total_deposit
Each fill instruction also takes a max_amount, so the actual amount for that fill is:
Fill Swappable Amount=min(Max Swappable Amount−swapped_amount,max_amount)
User Deposit Share
Most user-facing amounts use the escrow’s share of total vault deposits.
User Share=total_depositescrow.total_deposit
Because this is integer math on-chain, the program multiplies before dividing and rounds down.
Linear Vesting
The program treats both endpoints as inclusive by adding 1 to the numerator and denominator.
Vesting Duration=end_vesting_point−start_vesting_point+1
Elapsed Duration=min(current_point,end_vesting_point)−start_vesting_point+1
Total Claimable Token=bought_token×Vesting DurationElapsed Duration
Claims are not allowed before start_vesting_point.
User Claimable Token
Escrow Dripped Token=Total Claimable Token×total_depositescrow.total_deposit
User Claimable Token=Escrow Dripped Token−escrow.claimed_token
After a claim, the program increments both the escrow’s claimed_token and the vault’s total_claimed_token.
Pro Rata Overflow Refund
Overflow is the part of total deposits that cannot be included in max swappable amount.
Deposit Overflow=total_deposit−Max Swappable Amount
Escrow Overflow Refund=Deposit Overflow×total_depositescrow.total_deposit
An escrow can withdraw this overflow after last_join_point and through last_buying_point. The program tracks withdrawn_deposit_overflow so repeated withdrawals only receive the remaining overflow amount.
Final Remaining Quote Refund
After the pool’s last_buying_point, an escrow can withdraw its share of quote left in the vault.
Remaining Quote=total_deposit−swapped_amount
Escrow Total Refund Quote=Remaining Quote×total_depositescrow.total_deposit
Final Refund Transfer=Escrow Total Refund Quote−escrow.withdrawn_deposit_overflow
The escrow is then marked as refunded so the final remaining quote path cannot be used twice.
FCFS Accepted Deposit
In FCFS mode, the program limits the accepted deposit amount before transfer.
Remaining Vault Capacity=max_depositing_cap−total_deposit
Remaining User Quota=User Cap−escrow.total_deposit
Accepted Deposit=min(requested net amount,Remaining Vault Capacity,Remaining User Quota)
If the accepted amount is 0, the deposit fails.
Token 2022 Transfer Fees
When the quote mint has a Token 2022 transfer fee, the vault records the fee-excluded amount as the deposit. It transfers the fee-included amount from the user so that the vault receives the intended net amount.
Recorded Deposit=Transfer Amount−Transfer Fee
For outbound claims and refunds, emitted event amounts are fee-excluded when a transfer fee applies.
Formula examples describe the accounting path. Actual token balances can also be affected by Token 2022 transfer fees and transfer-memo requirements on destination accounts.