# Asymmetric Deposit

The Symmetric Deposit problem is that LPs must deposit the tokens in a pool with a predefined proportion. To remove extra actions, the algorithm in the AMM will automatically simulate the swap on the current pool to balance the amount for LPs. Then, the subsequent procedures like depositing and returning LP tokens are automated too. Because the process is just to simulate a single-sided deposit, we call it Simulated Single Exposure.

![Instead of preparing at least two types of token, users can now deposit even with only one type of token.](https://3606779243-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDSuDatsiBSDcGYiS7br6%2Fuploads%2Fm7eGrRVMAvKF9cKZRBiR%2FBanner-Day-5-asymemtric-22-10-2021%402x.png?alt=media\&token=cb3920d9-e76f-4df2-b5a0-cae87db1b840)

**Proposition 2.** Without loss of generality, giving a pool of $$A$$, $$B$$, and $$SEN$$ with the current state {$$R\_A,R\_B,R\_{SEN}$$}, an LP deposits $$\Delta\_{SEN}$$ to the pool and receives an amount of LP tokens $$lpt$$,

(16) $$lpt=\Delta\_{SEN}-(\delta\_A+\delta\_B)$$,

where $$\delta\_A+\delta\_B=\sqrt\[3]{R\_{SEN}(R\_{SEN}+\Delta\_{SEN})^2}-R\_{SEN}$$.

*Proof.* Let $$\Delta\_{SEN}=\delta\_A+ \delta\_B+\delta\_{SEN}$$, where the left term is the set of amounts of $$SEN$$ token to swap for {$$r\_A,r\_B,r\_{SEN}$$} in the simulation. The simulation is depicted by the following table (we use blackboard characters for state owners):

![](https://lh6.googleusercontent.com/Hwf-hRTZ1y389uBjRufbibxYz0DeBWFr_5UZpzqx3Vvbsh7_MkfN3Q9EP48zZQd-f_tCztfkNg4h8ELfMe8LW_3JmOyES5ocPKBCGf0BlquY7QNmPFhNPwCJ-_WgfT4TuwB0zWkM)

Here we don’t need to swap SEN, thus $$r\_{SEN}=\delta\_{SEN}$$. By the CPF (see Eq. (33)), we also know:

(17) $$R\_A'=\frac{R\_AR\_{SEN}}{R\_{SEN}+\delta\_A}$$,

(18) $$R'*B=\frac{R\_A(R*{SEN}+\delta\_A)}{R\_{SEN}+\delta\_A+\delta\_B}$$,

And:

(19) $$r\_A=R\_A-R'*A=\frac{R\_A\delta\_A}{R*{SEN}+\delta\_A}$$,

(20) $$r\_B=R\_B-R'*B=\frac{R\_B\delta\_B}{R*{SEN}+\delta\_A+\delta\_B}$$​.

To satisfy the symmetric deposit, we have a system of equations:

(21) $$\frac{r\_A}{R'*A}=\frac{r\_B}{R'*B}=\frac{r*{SEN}}{R*{SEN}+\delta\_A+\delta\_B}$$​.

Or,

(22) $$\frac{\delta\_A}{R\_{SEN}}=\frac{\delta\_B}{R\_{SEN}+\delta\_A}=\frac{\delta\_{SEN}}{R\_{SEN}+\delta\_A+\delta\_B}$$​.

By transforming the system of equations, we know that:

(23) $$\delta\_A+\delta\_B=\sqrt\[3]{R\_{SEN}(R\_{SEN}+\Delta\_{SEN})^2}-R\_{SEN}$$.

Therefore,  $$lpt=\delta\_{SEN}=\Delta\_{SEN}-(\delta\_A+\delta\_B).$$​
