Add liquidity

From UBot Studio
Revision as of 18:30, 4 July 2023 by LillyT (Talk | contribs)

Jump to: navigation, search

defi add liquidity is a command that adds liquidity to a liquidity pool on a decentralized exchange.

This command is particularly useful for enterprise users who want to contribute to liquidity and earn rewards from providing liquidity on a decentralized exchange.

User Level

This command is exclusively available for enterprise users.

Parameters

Exchange: The decentralized exchange where you want to add liquidity.

Token A ID: The ID of the first token that you want to add to the liquidity pool.

Token B ID: The ID of the second token that you want to add to the liquidity pool.

Amount A: The amount of "Token A" that you want to contribute to the liquidity pool.

Amount B: The amount of "Token B" that you want to contribute to the liquidity pool.

Transaction Info Variable: (Optional) This advanced parameter is the variable to which the transaction details will be stored. If not specified, it will default to a variable named '#txinfo'.

Example

defi add liquidity("Uniswap", "ETH", "DAI", "1", "2000", "#transactionInfo")
ui text msg("Transaction Info: {#transactionInfo}")

In this example, the script contributes one ETH token and 2000 DAI tokens to a liquidity pool on the Uniswap decentralized exchange. It then displays the transaction info in the User Interface.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox