Depositing tokens
Users deposit fungible tokens into liquidity pools and in return receive a liquidity pool token (referred to as a liquidity pool share). Liquidity pool tokens represent a pro-rata share of the pools assets (user's shares out of the total amount of shares in the pool).
Querying a pool
Pool information, such as total amount of shares, may be obtained by querying a full node:
dymd q gamm pool [pool-id]
Depositing Dual Assets
Dual asset deposit via the JoinPool
transaction enables a user to choose the maximum amount of tokens they're willing to deposit into a pool. This argument must contain all the denominations from the pool, otherwise, the tx will be aborted.
Calculation of exactly how many tokens are needed is done at the moment of processing the transaction, validating that it does not exceed the maximum amount of tokens the user is willing to deposit.
Depositing Single Asset
Single Asset deposit converts tokens to the correct pool weight and adds them to the pool in one transaction. Swap fees and take fees apply.
Since the tokens are swapped during the deposit phase, when exiting the LP position the user receives an equivalent amounts of each token in the pool in proportion to the pool weight.
Exiting a pool
To exit a pool position a user must first unbond their liquidity pool tokens (if applicable). The user then provides the minimum amount of tokens they are willing to receive as they are returning their shares of the pool.
There is no additional exit fee
for the users to exit their liquidity pool position.