Withdraw from farm

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
'''withdraw lp tokens''' is a command that allows you to withdraw your Liquidity Provider (LP) tokens from a yield farm.
+
'''withdraw from farm''' is a command that allows you to withdraw LP (Liquidity Provider) 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.
+
This command is useful for users who have previously deposited LP tokens into a yield farm and want to claim back their liquidity.
  
 
== Parameters ==
 
== 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.
+
'''Farm:''' The yield farm from where you want to withdraw your LP tokens.
  
 
'''Amount:''' The amount of LP tokens that you want to withdraw from the yield farm.
 
'''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'.
+
'''Transaction Info Variable:''' (Advanced, Optional) A variable to store the transaction details after the LP tokens are withdrawn. The default variable is '#txinfo'.
  
 
== Example ==
 
== Example ==
  
 
<pre>
 
<pre>
withdraw lp tokens("Uniswap", "5", "#transaction")
+
config defi wallet("your private key")
alert(#transaction)
+
withdraw from farm("PancakeSwap Farm", "5", '#txid')
 +
log object(#txid)
 
</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.
+
Please replace "your private key" with your actual DeFi wallet's private key.
  
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.
+
Be mindful when you are handling your private key. It's a sensitive piece of data that allows full control over your funds in your DeFi wallet. Therefore, never share this key publicly or with anyone.
 +
 
 +
The script above withdraws 5 LP tokens from the designated yield farm on PancakeSwap and then logs the transaction details to the console.
 +
 
 +
Always ensure you have enough LP tokens and verify your input values before proceeding with the withdrawal since all transactions on the blockchain are irreversible. Also, consider the potential withdrawal fees and penalties that might be taken out as part of the process.

Revision as of 20:05, 4 July 2023

withdraw from farm is a command that allows you to withdraw LP (Liquidity Provider) tokens from a yield farm.

This command is useful for users who have previously deposited LP tokens into a yield farm and want to claim back their liquidity.

Parameters

Farm: The yield farm from where you want to withdraw your LP tokens.

Amount: The amount of LP tokens that you want to withdraw from the yield farm.

Transaction Info Variable: (Advanced, Optional) A variable to store the transaction details after the LP tokens are withdrawn. The default variable is '#txinfo'.

Example

config defi wallet("your private key")
withdraw from farm("PancakeSwap Farm", "5", '#txid')
log object(#txid)

Please replace "your private key" with your actual DeFi wallet's private key.

Be mindful when you are handling your private key. It's a sensitive piece of data that allows full control over your funds in your DeFi wallet. Therefore, never share this key publicly or with anyone.

The script above withdraws 5 LP tokens from the designated yield farm on PancakeSwap and then logs the transaction details to the console.

Always ensure you have enough LP tokens and verify your input values before proceeding with the withdrawal since all transactions on the blockchain are irreversible. Also, consider the potential withdrawal fees and penalties that might be taken out as part of the process.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox