Claim farm rewards

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
(Created page with "'''defi farm exit''' is a command that allows you to fully withdraw the Liquidity Provider (LP) tokens you have staked in a yield farm. This command is particularly useful fo...")
 
Line 1: Line 1:
'''defi farm exit''' is a command that allows you to fully withdraw the Liquidity Provider (LP) tokens you have staked in a yield farm.
+
'''harvest rewards''' is a command that allows you to harvest (claim) the earnings or rewards from a yield farm.
  
This command is particularly useful for enterprise users who have staked in a yield farm and want to retrieve all their staked LP tokens at once.
+
This command permits you to benefit from yield farming by collecting the rewards (usually in the form of tokens) you've earned from staking LP tokens in a specific yield farm.
 
+
== User Level ==
+
 
+
This command is exclusively available for enterprise users.
+
  
 
== Parameters ==
 
== Parameters ==
  
'''Farm:''' The yield farm from which you want to fully withdraw your LP tokens.
+
'''Farm:''' The yield farm from which you want to harvest rewards. The available farms will be dependent on the "FarmNames" list set in your environment.
  
'''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'.
+
'''Transaction Info Variable:''' (optional) The variable to store the transaction information after the harvesting process is completed. The default is '#txinfo'.
  
 
== Example ==
 
== Example ==
  
 
<pre>
 
<pre>
defi farm exit("PancakeSwap", "#transactionInfo")
+
harvest rewards("SushiSwap","#transaction")
ui text msg("Transaction Info: {#transactionInfo}")
+
alert(#transaction)
 
</pre>
 
</pre>
  
In this example, the script is fully exiting the yield farm on PancakeSwap by withdrawing all staked LP tokens. It then displays the transaction info in the UI.
+
The above script harvests rewards from a yield farm on SushiSwap. It then alerts the user to the details of the transaction.
 +
 
 +
Always remember to double-check your input parameters before harvesting rewards, as all transactions on the

Revision as of 19:09, 4 July 2023

harvest rewards is a command that allows you to harvest (claim) the earnings or rewards from a yield farm.

This command permits you to benefit from yield farming by collecting the rewards (usually in the form of tokens) you've earned from staking LP tokens in a specific yield farm.

Parameters

Farm: The yield farm from which you want to harvest rewards. The available farms will be dependent on the "FarmNames" list set in your environment.

Transaction Info Variable: (optional) The variable to store the transaction information after the harvesting process is completed. The default is '#txinfo'.

Example

harvest rewards("SushiSwap","#transaction")
alert(#transaction)

The above script harvests rewards from a yield farm on SushiSwap. It then alerts the user to the details of the transaction.

Always remember to double-check your input parameters before harvesting rewards, as all transactions on the

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox