Withdraw from farm
Line 1: | Line 1: | ||
− | ''' | + | '''withdraw lp tokens''' is a command that allows you to withdraw your Liquidity Provider (LP) tokens from a yield farm. |
− | This command is | + | This command is helpful when you want to stop yield farming and take out your LP tokens from a specific farm. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
== Parameters == | == Parameters == | ||
− | '''Farm:''' The yield farm from which you want to withdraw your LP tokens. | + | '''Farm:''' The yield farm from which you want to withdraw your LP tokens. The available farms will be dependent on the "FarmNames" list set in your environment. |
− | '''Amount:''' The amount of LP tokens you want to withdraw. | + | '''Amount:''' The amount of LP tokens that you want to withdraw from the yield farm. |
− | '''Transaction Info Variable:''' ( | + | '''Transaction Info Variable:''' (optional) The variable to store the transaction information after the withdrawal is made. The default is '#txinfo'. |
== Example == | == Example == | ||
<pre> | <pre> | ||
− | + | withdraw lp tokens("Uniswap", "5", "#transaction") | |
− | + | alert(#transaction) | |
</pre> | </pre> | ||
− | + | The above script withdraws 5 LP tokens from a yield farm on Uniswap. It then alerts the user to the details of the transaction. | |
+ | |||
+ | Always remember to double-check your input settings before withdrawing LP tokens because all transactions on the blockchain are irreversible. Ensure that the farm name and the amount you use in the command actually correspond to the existing farms and your holdings of LP tokens. |
Revision as of 19:09, 4 July 2023
withdraw lp tokens is a command that allows you to withdraw your Liquidity Provider (LP) tokens from a yield farm.
This command is helpful when you want to stop yield farming and take out your LP tokens from a specific farm.
Parameters
Farm: The yield farm from which you want to withdraw your LP tokens. The available farms will be dependent on the "FarmNames" list set in your environment.
Amount: The amount of LP tokens that you want to withdraw from the yield farm.
Transaction Info Variable: (optional) The variable to store the transaction information after the withdrawal is made. The default is '#txinfo'.
Example
withdraw lp tokens("Uniswap", "5", "#transaction") alert(#transaction)
The above script withdraws 5 LP tokens from a yield farm on Uniswap. It then alerts the user to the details of the transaction.
Always remember to double-check your input settings before withdrawing LP tokens because all transactions on the blockchain are irreversible. Ensure that the farm name and the amount you use in the command actually correspond to the existing farms and your holdings of LP tokens.