Claim farm rewards
(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: | ||
− | ''' | + | '''harvest rewards''' is a command that allows you to harvest (claim) the earnings or rewards from a yield farm. |
− | This command | + | 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 == | == Parameters == | ||
− | '''Farm:''' The yield farm from which you want to | + | '''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:''' ( | + | '''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> | ||
− | + | harvest rewards("SushiSwap","#transaction") | |
− | + | alert(#transaction) | |
</pre> | </pre> | ||
− | + | 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