Withdraw from farm

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
(Parameters)
(Example)
Line 15: Line 15:
 
<pre>
 
<pre>
 
config defi wallet("your private key")
 
config defi wallet("your private key")
withdraw from farm("PancakeSwap Farm", "5", '#txid')
+
withdraw from farm("DOGE_WBNB_Farm", "5", '#txid')
 
log object(#txid)
 
log object(#txid)
 
</pre>
 
</pre>
Line 23: Line 23:
 
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.
 
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.
+
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 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.
+
Always ensure you have enough LP tokens and verify your input values before proceeding with the withdrawal.

Revision as of 23:29, 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 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: (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("DOGE_WBNB_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 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