Add liquidity
Line 1: | Line 1: | ||
'''add liquidity''' is a command that allows you to add liquidity to a liquidity pool on a decentralized exchange. | '''add liquidity''' is a command that allows you to add liquidity to a liquidity pool on a decentralized exchange. | ||
− | This command is beneficial for users who wish to contribute to a liquidity pool on protocols like Uniswap or PancakeSwap, earning fees | + | This command is beneficial for users who wish to contribute to a liquidity pool on protocols like Uniswap or PancakeSwap, earning fees in the process. |
== Parameters == | == Parameters == | ||
− | '''Exchange:''' The decentralized exchange where the liquidity pool resides | + | '''Exchange:''' The decentralized exchange where the liquidity pool resides. |
− | '''Token A ID''' and '''Token B ID:''' The pair of tokens involved in the liquidity pool to which you want to add liquidity | + | '''Token A ID''' and '''Token B ID:''' The pair of tokens involved in the liquidity pool to which you want to add liquidity. |
'''Amount A''' and '''Amount B:''' The amount of each respective token that you want to contribute to the liquidity pool. | '''Amount A''' and '''Amount B:''' The amount of each respective token that you want to contribute to the liquidity pool. |
Revision as of 19:13, 4 July 2023
add liquidity is a command that allows you to add liquidity to a liquidity pool on a decentralized exchange.
This command is beneficial for users who wish to contribute to a liquidity pool on protocols like Uniswap or PancakeSwap, earning fees in the process.
Parameters
Exchange: The decentralized exchange where the liquidity pool resides.
Token A ID and Token B ID: The pair of tokens involved in the liquidity pool to which you want to add liquidity.
Amount A and Amount B: The amount of each respective token that you want to contribute to the liquidity pool.
Transaction Info Variable: (optional) The variable to store the transaction information after the liquidity is added. The default is '#txinfo'.
Example
add liquidity("Uniswap", "ETH", "DAI", "1", "1000", '#transaction') alert(#transaction)
The script above adds liquidity to the ETH-DAI pool on Uniswap, contributing 1 ETH and 1000 DAI. It then alerts the transaction details to the user.
Always remember to double-check your input values before adding liquidity, because all transactions on the blockchain are irreversible. Make sure the tokens and values you use in the command match the actual tokens that exist on the blockchain and the holdings in your wallet.