LiquidityPoolProxy.sol
Github Link: https://github.com/Shell-Protocol/Shell-Protocol/blob/main/src/proteus/LiquidityPoolProxy.sol
constructor()
This method is called whenever a new LiquidityPoolProxy contract is deployed.
swapGivenInputAmount()
This function executes a swap of the input amount of input token for the second of the tokens that make up the pool base pair.
It should...
Swap specified of input tokens for the second token that makes the liquidity pool.
depositGivenInputAmount()
This function deposits specified deposit amount of the specified deposit token into Liquidity Pool. Deposit token should be one of the two tokens that make up the LP base pair.
It should...
Deposit a token into the Liquidity Pool.
withdrawGivenInputAmount()
This function withdraws specified withdraw amount of the specified withdraw token from the Liquidity Pool. Withdraw token should be one of the two tokens that make up the LP base pair.
It should...
Withdraw a token from the Liquidity Pool.
swapGivenOutputAmount()
This function returns how many input tokens should be given for the desired output amount of the specified output token. Output token should be one of the two tokens that make up the LP base pair.
It should...
Return the number of the other of the tokens that make up Liquidity Pool's base pair should be given for the specified output token.
depositGivenOutputAmount()
This function returns how many deposit tokens should be deposited for the desired amount of the LP tokens. Deposit token should be one of the two tokens that make up the LP base pair.
It should...
Return the number of deposit tokens necessary to receive specified mint amount of LP tokens.
withdrawGivenOutputAmount()
This function returns how many LP tokens should be burned in order to receive specified withdrawn amount of the specified withdrawn token. Withdrawn token should be one of the two tokens that make up the LP base pair.
It should...
Return the number of LP tokens that should be burned in order to receive specified amount of wanted token.
Last updated