Withdraw from farm

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
(Created page with "'''withdraw lp tokens''' is a command that enables you to withdraw Liquidity Provider (LP) tokens from a yield farm. Yield farming is a method of earning more cryptocurrency ...")
 
 
(5 intermediate revisions by one user not shown)
Line 1: Line 1:
'''withdraw lp tokens''' is a command that enables you to withdraw 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.
  
Yield farming is a method of earning more cryptocurrency using existing cryptocurrency. When you participate in yield farming, you provide liquidity by adding assets to a liquidity pool. The pool then provides you with LP tokens, representing your share in the pool.
+
== Parameters ==
  
== Parameters ==
+
'''Farm:''' The yield farm from where you want to claim your rewards. If the farm you want isn't in the list, you can find it and get it added to the list via the '''$find farm by tokens''' function.
  
'''Farm:''' The yield farm from which you wish 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 wish to withdraw from the yield farm.
+
'''Transaction Info Variable:''' (Optional) A variable to store the transaction details after the LP tokens are withdrawn. The default variable is '''#txinfo'''.
 
+
'''Transaction Info Variable:''' (Optional, advanced) The variable name where the transaction information will be stored. The default value is '#txinfo'.
+
  
 
== Example ==
 
== Example ==
  
 
<pre>
 
<pre>
withdraw lp tokens("SushiSwap", "10")
+
ui console view
 +
config defi wallet("your private key")
 +
withdraw from farm("DOGE_WBNB_Farm", "5", '#txinfo')
 +
log object(#txinfo)
 
</pre>
 
</pre>
  
In the script example above, the 'withdraw lp tokens' command withdraws 10 LP tokens from the specified yield farm on the SushiSwap network.
+
Please replace "your private key" with your actual DeFi wallet's private key.
 
+
== Post-Run ==
+
  
After running this command, '''RecordTxData''' is executed to record transaction data.
+
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.
  
**Please note:**
+
The script above withdraws 5 LP tokens from the designated yield farm and then logs the transaction details to the console.
  
Before withdrawing LP tokens, ensure you have the required number of LP tokens in the yield farm, and you have enough balance of native token (for transaction fees). It's advised to only farm on platforms you trust with funds you can afford to risk, as DeFi involves potential risks.
+
Always ensure you have enough LP tokens and verify your input values before proceeding with the withdrawal.

Latest revision as of 02:08, 5 July 2023

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

[edit] Parameters

Farm: The yield farm from where you want to claim your rewards. If the farm you want isn't in the list, you can find it and get it added to the list via the $find farm by tokens function.

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

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

[edit] Example

ui console view
config defi wallet("your private key")
withdraw from farm("DOGE_WBNB_Farm", "5", '#txinfo')
log object(#txinfo)

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 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.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox