Remove liquidity
(Created page with "'''remove liquidity''' is a command that removes liquidity from a liquidity pool on a decentralized exchange (DEX). In decentralized finance (DeFi), liquidity providers (LPs)...") |
|||
Line 1: | Line 1: | ||
− | '''remove liquidity''' is a command that | + | '''defi remove liquidity''' is a command that allows you to remove your tokens from a liquidity pool on a decentralized exchange. |
− | + | This command is especially useful for enterprise users who are providing liquidity and want to retrieve their staked tokens. | |
+ | |||
+ | == User Level == | ||
+ | |||
+ | This command is exclusively available for enterprise users. | ||
== Parameters == | == Parameters == | ||
− | '''Exchange:''' The decentralized exchange | + | '''Exchange:''' The decentralized exchange where you want to remove liquidity from. |
− | '''Token A ID:''' The first token | + | '''Token A ID:''' The ID of the first token that you want to remove from the liquidity pool. |
− | '''Token B ID:''' The second token | + | '''Token B ID:''' The ID of the second token that you want to remove from the liquidity pool. |
− | '''Amount:''' The amount of liquidity | + | '''Amount:''' The amount of liquidity tokens you want to remove from the pool. |
− | '''Transaction Info Variable:''' ( | + | '''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 == | == Example == | ||
<pre> | <pre> | ||
− | remove liquidity(" | + | defi remove liquidity("Uniswap", "ETH", "DAI", "1", "#transactionInfo") |
+ | ui text msg("Transaction Info: {#transactionInfo}") | ||
</pre> | </pre> | ||
− | In | + | In this example, the script is removing liquidity equivalent to one Uniswap liquidity token from the ETH/DAI liquidity pool on Uniswap, and then displaying the transaction information. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + |
Revision as of 18:30, 4 July 2023
defi remove liquidity is a command that allows you to remove your tokens from a liquidity pool on a decentralized exchange.
This command is especially useful for enterprise users who are providing liquidity and want to retrieve their staked tokens.
User Level
This command is exclusively available for enterprise users.
Parameters
Exchange: The decentralized exchange where you want to remove liquidity from.
Token A ID: The ID of the first token that you want to remove from the liquidity pool.
Token B ID: The ID of the second token that you want to remove from the liquidity pool.
Amount: The amount of liquidity tokens you want to remove from the 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 remove liquidity("Uniswap", "ETH", "DAI", "1", "#transactionInfo") ui text msg("Transaction Info: {#transactionInfo}")
In this example, the script is removing liquidity equivalent to one Uniswap liquidity token from the ETH/DAI liquidity pool on Uniswap, and then displaying the transaction information.