Gamma vault deposit ratios determine how much of each token you can contribute

Updated

Gamma constrains LP vault deposits through the accepted relationship between the paired token amounts. For vaults using UniProxy, a chosen input produces a permitted range for the other token. Your usable deposit must fit that relationship, your available balances and the selected vault's additional restrictions.

Resize the deposit or acquire the missing token

A shortage of the paired token leaves a choice between contributing less and changing the wallet's holdings. Reducing the proposed deposit leaves the unused balance outside the vault. Acquiring the missing token changes the assets held before liquidity provision begins. That acquisition introduces its own execution costs and price exposure.

The distinction matters when the intended contribution exceeds what the wallet can supply in the required proportions. A larger balance of one token cannot automatically replace a shortage of the other. Adjusting an unsigned amount is reversible and requires no asset conversion. Buying the missing token commits to a separate transaction whose outcome persists even if the later deposit fails. The choice therefore starts with whether using the entire initial balance is necessary.


How does the vault calculate the paired amount?

UniProxy's getDepositAmount function takes the selected vault, one of its token addresses and an input quantity, then returns bounds for the paired quantity.

The quote and its units

Accepted token proportions

In ClearingV2's ordinary funded-vault calculation, token holdings determine the ratio unless a custom ratio applies. Configured tolerance produces an interval around that relationship. Equal token quantities or equal monetary values do not establish compatibility. For accounts without a deposit exception, both directions of the deposit ratio must pass the contract's checks.

Amounts shown in the wallet

Contract calls express token quantities as integers in their smallest units. A wallet converts these quantities using each token's decimal precision. Comparing the raw integers of different tokens can therefore misrepresent their relative amounts. Calculations must preserve the correct units through display, quotation and submission.

A quote applies to a particular state

Vault holdings and configurable deposit parameters can change. Automated liquidity management affects the inventory behind a holdings-based ratio, so an earlier preview cannot reserve that relationship. Refreshing the quote matters after changing either input or returning to an unfinished deposit.


Compatible assets come before compatible amounts

The deposit requires the selected vault's actual token contracts on its network. Similar names do not establish compatibility.

UniProxy identifies an input by its token address, while the vault identifies its pair as token0 and token1. These labels describe the pair's contract ordering. They do not identify whichever asset a user happens to select first. The quantity must accompany the correct address throughout the quote. A calculation for a different vault cannot establish acceptance here, even when both vaults display similar assets. Changing the amount cannot repair a wrong token identity; the asset selection itself must match the intended vault.


Reducing a deposit to fit the paired balance

Consider a hypothetical deposit preview using compatible tokens on the selected vault's network. All amounts and the quoted proportion in this example are hypothetical. An input of 137.4 units of the first token calls for 82.44 units of the paired token. The wallet holds only 61.83 paired units. The proposed deposit exceeds that balance, although the first token balance is sufficient.

The revised token amounts must fit both balances while preserving an accepted proportion. Leave the transaction unsigned and reduce the first input. At the unchanged illustrative proportion, the available paired balance supports three quarters of the original contribution: 61.83 divided by 82.44 equals 0.75. Multiplying 137.4 by 0.75 gives 103.05 first-token units, paired with 61.83 units of the other token. This leaves 34.35 first-token units outside the proposed deposit.

The smaller proposal resolves the illustrated balance shortage without a swap. Obtain a fresh quote for that amount before proceeding. If its accepted paired amount still fits the wallet, the balance constraint is satisfied. If the refreshed requirement exceeds the balance, reduce the proposal again or stop. Matching the arithmetic alone does not establish that the vault will accept the transaction.


Why can a correctly proportioned deposit still fail?

A deposit can satisfy its ratio and still fail another condition, including a pause, a capacity restriction or an applicable price check. ClearingV2 also checks whether the pool price lies within the vault's base range. Its configuration determines applicable limits and price protections; these values are not universal constants.

An error about price or capacity calls for a different response from an insufficient paired balance. Repeatedly editing proportions cannot resolve a pause. Repeated submissions also cannot establish that a restriction has cleared. An unsigned simulation can test the proposed call against the state available at that moment, although execution may encounter a later state.

Why can a correctly proportioned deposit still fail?: A deposit can satisfy its ratio and still fail another condition, including a pause, a capacity restriction or an applicable price check.; ClearingV2 also checks whether the pool price lies within the vault's base range. Its configuration determines applicable limits and price protections; these values are not universal constants.

Open full-size image


Spending permission and the completed contribution

Token approval authorizes a spender to transfer an allowed amount. It does not itself create the liquidity position. A deposit needs the relevant permission as well as compatible balances. Increasing an allowance cannot supply missing tokens or change the vault's required proportions.

A completed Hypervisor deposit transfers the specified token amounts and mints shares to its recipient. Its Deposit event records the sender, recipient, shares and contributed amounts. Those records distinguish execution from a preview. A transaction hash alone does not establish success; the receipt status and recorded state changes matter. The contribution becomes part of the vault's managed holdings, with shares recording participation.


Stopping before execution and withdrawing afterward

An unsigned deposit remains a proposal. Leaving it unfinished does not require a withdrawal.

Existing approvals need separate attention because closing the deposit interface does not revoke an allowance. A completed approval remains effective until spending or a subsequent allowance change alters it. Any earlier token acquisition also remains a completed transaction.

After a successful contribution, withdrawal is a separate operation that burns shares and returns the corresponding vault assets. It does not restore a reserved copy of the original token mix. The quantities depend on the vault's holdings when withdrawal executes. A smaller deposit therefore limits the amount committed initially; later withdrawal follows the position's then-current composition.

Gamma - your questions answered

Does approving tokens lock in my Gamma deposit quote?

Approving tokens does not lock in a deposit quote. Approval changes spending permission, while the deposit evaluates the submitted amounts against the applicable vault state. A previously sufficient allowance can remain available even when a refreshed quote requires different token amounts.

Can a zero paired-token quote authorize a single-token deposit?

A zero paired-token quote alone does not establish permission for a single-token deposit. ClearingV2 can return zero bounds when a funded vault has no holdings of one token, while its ordinary deposit path still requires positive contributions on both sides. Explicit account exceptions have separate treatment.

Will increasing slippage tolerance fix an improper deposit ratio?

Increasing a transaction's slippage tolerance does not override the vault's ratio checks. The submitted token amounts must satisfy the accepted relationship. An improper-ratio error therefore concerns the paired quantities or the state used to calculate them, rather than permission to bypass that relationship.

Is the number of vault shares equal to the combined token amounts?

Vault shares are not the arithmetic sum of the two contributed token quantities. For an existing Hypervisor position, share calculation relates the contribution's value to the vault's holdings and existing share supply. Adding quantities of different tokens does not produce a meaningful share estimate.

Can my Gamma deposit send its shares to another recipient?

UniProxy accepts a recipient address for the shares minted by a deposit. The recipient can be the account supplying the assets or another address. The recipient therefore matters when confirming the completed contribution, even when the token amounts and their ratio are correct.