Find farm by tokens

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
(Created page with "'''$defi liquidity pool value''' is a function that calculates the value of your investment in a liquidity pool on a specific decentralized exchange, shown in USD. This funct...")
 
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
'''$defi liquidity pool value''' is a function that calculates the value of your investment in a liquidity pool on a specific decentralized exchange, shown in USD.
+
'''$find farm by tokens''' is a function that returns the name of the yield farm which uses a specific pair of tokens on a decentralized exchange.
  
This function is extremely useful for enterprise users who are providing liquidity on decentralized exchanges and want to know the current value of their investment.
+
If the farm isn't already in the list of available farms for commands and functions that work with farms, the farm will be added.  
 
+
== User Level ==
+
 
+
This function is exclusively available for enterprise users.
+
  
 
== Parameters ==
 
== Parameters ==
  
'''Exchange:''' The decentralized exchange where your liquidity pool is located.
+
'''Exchange:''' The decentralized exchange where you want to find a yield farm.
  
'''Token A ID:''' The ID of the first token in the liquidity pool.
+
'''Token A ID''' and '''Token B ID:''' The pair of tokens for which you want to find a yield farm.
  
'''Token B ID:''' The ID of the second token in the liquidity pool.
+
== Return Value ==
  
== Return Value ==
+
This function returns the name of the yield farm that uses the specified pair of tokens on the given exchange.
 
+
This function returns a string value which is the current value of your liquidity pool investment in USD.
+
  
 
== Example ==
 
== Example ==
  
 
<pre>
 
<pre>
define areacode
+
config defi wallet("your private key")
ui text msg("Your investment value in USDT/ETH on Uniswap is: {$defi liquidity pool value("Uniswap", "USDT", "ETH")}")
+
log("The farm is: {$find farm by tokens("PancakeSwap", "ETH", "DAI")}")
 
</pre>
 
</pre>
  
In this example, the function is calculating the current value of your investment in the USDT/ETH liquidity pool on Uniswap in USD, and then displaying that value in the UI.
+
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.
 +
 
 +
In this example, the command will find and return the name of the yield farm that uses the ETH-DAI token pair on PancakeSwap.  
 +
 
 +
Example Output:
 +
 
 +
<blockquote>
 +
<p>The farm is: ETH_DAI_Farm</p>
 +
</blockquote>
 +
 
 +
Note: The farm must actually exist on the platform for this function to work properly

Latest revision as of 23:50, 4 July 2023

$find farm by tokens is a function that returns the name of the yield farm which uses a specific pair of tokens on a decentralized exchange.

If the farm isn't already in the list of available farms for commands and functions that work with farms, the farm will be added.

[edit] Parameters

Exchange: The decentralized exchange where you want to find a yield farm.

Token A ID and Token B ID: The pair of tokens for which you want to find a yield farm.

[edit] Return Value

This function returns the name of the yield farm that uses the specified pair of tokens on the given exchange.

[edit] Example

config defi wallet("your private key")
log("The farm is: {$find farm by tokens("PancakeSwap", "ETH", "DAI")}")

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.

In this example, the command will find and return the name of the yield farm that uses the ETH-DAI token pair on PancakeSwap.

Example Output:

The farm is: ETH_DAI_Farm

Note: The farm must actually exist on the platform for this function to work properly

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox