Claim farm rewards

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
 
'''claim farm rewards''' is a command that allows you to claim earned rewards from staking LP (Liquidity Provider) tokens in a yield farm.
 
'''claim farm rewards''' is a command that allows you to claim earned rewards from staking LP (Liquidity Provider) tokens in a yield farm.
 
This command is beneficial for users who staked LP tokens in a yield farm and have generated rewards that they now want to claim.
 
  
 
== Parameters ==
 
== Parameters ==
Line 7: Line 5:
 
'''Farm:''' The yield farm from where you want to claim your rewards.
 
'''Farm:''' The yield farm from where you want to claim your rewards.
  
'''Transaction Info Variable:''' (Advanced, Optional) A variable to store the transaction details after the rewards are claimed. The default variable is '#txinfo'.
+
'''Transaction Info Variable:''' (Optional) A variable to store the transaction details after the rewards are claimed. The default variable is '#txinfo'.
  
 
== Example ==
 
== Example ==
  
 
<pre>
 
<pre>
 +
ui console view
 
config defi wallet("your private key")
 
config defi wallet("your private key")
claim farm rewards("PancakeSwap Farm", '#txid')
+
claim farm rewards("PancakeSwap Farm", '#txinfo')
log object(#txid)
+
log object(#txinfo)
 
</pre>
 
</pre>
  
Line 22: Line 21:
  
 
The script above claims rewards from the designated yield farm on PancakeSwap and logs the transaction details to the console.
 
The script above claims rewards from the designated yield farm on PancakeSwap and logs the transaction details to the console.
 
It's important to frequently claim your rewards from yield farm contracts as some may have time limits or specific conditions to claim the rewards. Also, ensure to consider the transaction gas fees required to claim your rewards to determine if it's profitable to claim at the current time.
 

Revision as of 20:22, 4 July 2023

claim farm rewards is a command that allows you to claim earned rewards from staking LP (Liquidity Provider) tokens in a yield farm.

Parameters

Farm: The yield farm from where you want to claim your rewards.

Transaction Info Variable: (Optional) A variable to store the transaction details after the rewards are claimed. The default variable is '#txinfo'.

Example

ui console view
config defi wallet("your private key")
claim farm rewards("PancakeSwap Farm", '#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 claims rewards from the designated yield farm on PancakeSwap and logs the transaction details to the console.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox