> For the complete documentation index, see [llms.txt](https://lambdaplex-labs.gitbook.io/lambdaplex/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lambdaplex-labs.gitbook.io/lambdaplex/vaults/pro-rata-vaults.md).

# Pro-rata Vaults

### Purpose and overview

Pro-rata vaults are two-asset smart contracts designed to crowdsource inventory for market making. Each vault holds a BASE token and a QUOTE token, and depositors receive shares representing a proportional claim on both assets held by the vault.

Unlike a [balanced vault](https://lambdaplex-labs.gitbook.io/lambdaplex/vaults/vault-documentation), a pro-rata vault does not use an oracle to value one asset in terms of the other and does not try to maintain a 50/50 split by value. Deposits follow the vault's current inventory ratio, and withdrawals return the same proportion of each asset that the vault holds at the time of withdrawal.

For example, if a vault holds 1,000 BASE and 2,000 QUOTE, a depositor who owns 10% of the shares has a claim on approximately 100 BASE and 200 QUOTE. If market-making activity later changes the inventory to 1,200 BASE and 1,500 QUOTE, the same 10% share represents approximately 120 BASE and 150 QUOTE.

The vault owner appoints a permissioned manager to rebalance inventory through SaucerSwap. The manager can trade between the vault's BASE and QUOTE assets but cannot withdraw depositor shares or transfer the inventory to an arbitrary address. Depositors remain exposed to the results of those trades, including changes in inventory mix and total inventory value.

Either side of the pair may be an ERC-20 token or native HBAR.

### Pro-rata inventory accounting

The easiest way to think about a pro-rata vault is as a shared basket containing two assets. Your vault shares show what percentage of that basket belongs to you.

Suppose a vault contains:

* 1,000 BASE
* 2,000 QUOTE

If you own 10% of the vault shares, you have a claim on approximately 10% of each asset: 100 BASE and 200 QUOTE. You do not own a fixed number of tokens. You own a percentage of whatever is in the basket.

The first deposit starts the vault and establishes its initial mix of BASE and QUOTE. Later deposits must match the mix currently in the vault. This prevents someone from depositing only one asset while receiving shares backed by both.

For example, imagine the vault currently holds twice as much BASE as QUOTE. If you offer 200 BASE and 200 QUOTE, the vault may use approximately:

* 200 BASE
* 100 QUOTE

You keep the unused 100 QUOTE. If one of the assets is native HBAR, any unused HBAR is returned to you.

When you withdraw, you receive your share of both assets as they exist at that time. If trading has changed the vault's holdings, the mix you receive may be different from the mix you originally deposited.

For example, suppose you still own 10% of the shares, but the manager's trades have changed the vault inventory to:

* 1,200 BASE
* 1,500 QUOTE

Your claim would now be approximately 120 BASE and 150 QUOTE.

Each deposit is recorded separately and has its own lockup period. After the lockup ends, you can withdraw some or all of that deposit. The vault also provides previews showing approximately how much you will deposit or receive. These previews include management fees that have accumulated since the vault was last used, including a fee change that is about to take effect.

The vault does not use a price feed to decide whether the two assets have equal value. It simply tracks how much of each asset it holds. Manager trades and tokens sent directly to the vault can change that mix, so users should always review the latest deposit or withdrawal preview before confirming a transaction.

### Airdrop campaigns

Airdrops are distributed to eligible vault depositors through `AirdropDistributor`. A vault can support multiple approved reward tokens, with each token maintaining a separate streaming campaign.

The pattern for funding and collecting airdrops is:

1. A funder sends an approved reward token to `AirdropDistributor` and credits it to a particular vault.
2. The distributor notifies the vault, which streams the funded amount over the vault's configured vesting period.
3. As rewards vest, depositors may claim one reward token or all reward tokens through the vault. The distributor transfers the claimed tokens directly to each user.
4. If more of the same reward token is funded during an active campaign, the unvested amount, the new funding and saved rounding carry are combined and streamed over the campaign's remaining time.
5. When a campaign ends, no additional rewards vest until that reward token is funded again.

Rewards are allocated according to depositor shares. Shares minted as management fees are excluded, so the vault owner does not earn depositor airdrops on fee shares. Users are checkpointed when their share balance changes, preventing a new depositor from claiming rewards that vested before the deposit.

The accounting also carries forward fractional per-share remainders. This prevents frequent claims or other small updates from repeatedly rounding a low-rate reward stream down to zero. Whole-token stream dust is retained as carry and included when the reward token is funded again.

If there are no eligible depositor shares while a campaign is streaming, the undistributed amount is placed in carry rather than allocated to the owner. That carry resumes streaming when the token is funded again; the mere return of eligible shares does not start a new campaign.

### Management fees

Vault owners are compensated for managing the market-making strategy through management-fee shares. As a fee accrues, new shares are minted to the owner and the depositor share supply is diluted. The owner's fee shares represent the same proportional BASE and QUOTE inventory as other shares, keeping compensation exposed to the performance of both vault assets.

The fee is expressed as a weekly rate and is capped by the contract at 0.3% per week. Fees accrue continuously while eligible depositor shares exist. Owner fee shares do not generate additional management fees by themselves and do not qualify for airdrops.

The owner may schedule a fee change, but the new rate does not become effective until the vault's configured notice period has passed. The notice period is set at deployment and must be between one and thirty days. When an interaction spans the effective timestamp, the vault accounts for the time before the boundary at the old rate and the time from the boundary onward at the new rate.

This delay gives depositors time to decide whether the new fee is acceptable. Deposit and withdrawal previews project both accrued fees and scheduled fee boundaries, so interfaces can show users fee-aware estimates before they transact.

To collect compensation, the owner burns fee shares and receives the corresponding pro-rata amount of BASE and QUOTE. The owner cannot select only one side of the inventory.

### Placing trades

The vault owner or appointed manager can rebalance inventory through exact-input swaps on SaucerSwap V1 or V2. A trade exchanges one vault asset for the other and therefore changes the inventory ratio represented by every outstanding share.

Routes are limited to:

* a direct BASE-to-QUOTE or QUOTE-to-BASE swap; or
* a route with WHBAR as the only intermediate asset.

Each trade specifies an exact input amount, a minimum acceptable output and a deadline. The vault verifies that the requested input was spent and that the output satisfies the minimum. Swaps cannot be placed before initialization or after emergency mode has been enabled.

These restrictions limit where inventory can be routed, but they do not make the strategy trustless. The vault has no price oracle, per-trade size cap or periodic trading limit. The manager chooses the trade size and slippage protection, so depositors must evaluate the vault operator's strategy and key security. A poor or maliciously priced trade can reduce the value of the inventory even though users retain their proportional claims on the remaining assets.

### Other considerations

Before depositing, users should understand:

* A vault share is a claim on the current BASE and QUOTE inventory, not a claim on the original deposit amounts or a fixed monetary value.
* The contract does not maintain a target asset ratio or use an oracle to assess fair value.
* The manager's trading performance can increase or decrease inventory value and can materially change the token mix.
* Management fees dilute depositor ownership over time.
* Airdrop amounts and implied returns are not guaranteed.
* Direct token transfers to the vault can alter its inventory ratio and affect later deposits and withdrawals.
* If a non-reinitializable vault is completely depleted, ordinary deposits may remain unavailable.
* Smart-contract, token, liquidity, market, manager-key and external-protocol risks remain.

The pro-rata design makes ownership accounting straightforward: depositors collectively own the assets that remain in the vault in proportion to their shares. It does not remove the market-making risks that determine what those assets will be worth.
