Comment on page

# Depositing

Providing liquidty on Aftermath is simple. Navigate to the Pools tab, and select the pool you wish to depsit into. This can be any pool for which you own any one of the coins. You do not need to have all of them.

Here you will see two choices at the top of the page: Official, and Community.

Official Pools are those which are created by Aftermath in coordination with partners. Community Pools are completely permissionless and can be created by anyone. We took this approach to ensure the best user experience, while also respecting decentralization.

Select a pool, and once on the page for that specific pool you will see a Deposit button at the top right.

Click this button, and the following modal will appear:

Here you will see your optionality for depositing into a pool. You do not need to have every asset to deposit. You can deposit just one asset, or multiple assets at different amounts of your choice. Once you enter an amount and press the deposit button, a confirmation will appear.

Here you can review you transaction and assure it to your satisfaction before it is processed.

When depositing an amount which is significant relative to the overall liquidity in the pool, Price Impact may affect the value of LP tokens received versus tokens deposited. When depositing, all the deposited funds are transfered to the pool and LP is minted and transfered to the user. In the discrepancy we are considering the deposited funds don't disappear -- they participate in trading along with the rest of the pool's assets. The discrepancy is between how much was deposited and how much LP was returned.

That begs the next question: How does the pool determine how much LP to return for a deposit? A simple deposit (and the most favorable to the depositor) is one which matches the pool's balance distribution perfectly. If a deposit increases each balance by 10% (e.g. if the pool starts with 100 USDC and 110 USDT, a 10% deposit is 10 USDC and 11 USDT) then the amount of LP minted equals 10% of the total of all LP in existence at the beginning of the deposit (if there is 105 LP in circulation then a 10% deposit earns 10.5 LP).

When a user prefers to deposit a single coin type instead of a balance-matched combination of all coin types, the pool needs to do some calculating to see how much LP that is worth. It internally converts the amount deposited into each of the other coin types so that the result is a balance-matched distribution of funds, then it deposits those and follows the proportionality rule described above.

Here is an example which illustrates this behavior. Suppose a stable pool with 105 circulating LP consists of 100 USDC and 110 USDT (USDT/USDC = 1.1) and that we want to deposit $50 into it. The way to do this to maximize the LP we earn is to deposit 23.81 USDC and 26.19 USDT (USDT/USDC is also 1.1). This deposit is $50 total (23.81 + 26.19 = 50) and consists of 23.81% of each asset in the pool (23.81% of 100 is 23.81 and 23.81% of 110 is 26.19). Thus we are rewarded with 23.81% of the circulating supply (105 LP), or 25 LP.

If instead we deposit all 50 as one coin, we will earn less LP. If we deposit all 50 as USDC then the pool will convert that to amounts which allow for an all-asset deposit. In this case it takes 21.59 USDC from our 50 and trades it into 20.83 USDT (notice the price impact playing a role here because this is such a large trade), which turns the pool's balances to 121.59 (100 + 21.59) and 89.17 (110 - 20.83). The remaining 28.41 USDC (50 - 21.59) and the 20.83 USDT are both 23.37% of the respective pool balances (28.41 is 23.37% of 121.59 and 20.83 is 23.37% of 89.17), so this deposit earns us 23.31% of the total LP. That is 24.53 LP, 23.31% of 105. Notice how this is less than 25 LP which we would have earned with a direct all-asset deposit.

Running the numbers the other way, suppose we instead want to deposit 50 USDT and no USDC. The pool converts 20.37 USDT into 18.52 USDC (the price impact is even worse because USDT is more abundant to begin with), changing the pool balances to 81.48 USDC and 130.37 USDT. The 18.52 USDC we traded for and our remaining 29.63 USDT are each 22.72% of the respective pool balances, so we earn 22.72% of the total LP. That is 23.86 LP, the least of the three scenarios.

Before depositing a large quantity, be sure to consult the Deposit Preview modal to view the Total Deposit and Minimum to Receive to ensure they are satisfactory. If not, it is best to deposit multiple coins in equal quantity.

Last modified 1mo ago