Constructs a new LpTokenPriceTask.
Optional
properties: ILpTokenPriceTaskProperties to set
Optional
PoolLpTokenPriceTask PoolAddress.
Optional
mercurialMercurial finance pool address. A full list can be found here: https://github.com/mercurial-finance/stable-swap-n-pool-js
Optional
orcaOrca pool address. A full list can be found here: https://www.orca.so/pools
A list of Switchboard aggregator accounts used to calculate the fair LP price. This ensures the price is based on the previous round to mitigate flash loan price manipulation.
A list of OracleJobs to execute in order to yield the price feed jobs to use for the fair price formula.
Optional
raydiumThe Raydium liquidity pool ammId. A full list can be found here: https://raydium.io/pools
Optional
saberSaber pool address. A full list can be found here: https://github.com/saber-hq/saber-registry-dist
If enabled and price_feed_addresses provided, the oracle will calculate the fair LP price based on the liquidity pool reserves. See our blog post for more information: https://switchboardxyz.medium.com/fair-lp-token-oracles-94a457c50239
Static
createCreates a new LpTokenPriceTask instance using the specified properties.
Optional
properties: ILpTokenPriceTaskProperties to set
LpTokenPriceTask instance
Static
decodeDecodes a LpTokenPriceTask message from the specified reader or buffer.
Reader or buffer to decode from
Optional
length: numberMessage length if known beforehand
LpTokenPriceTask
If the payload is not a reader or valid buffer
If required fields are missing
Static
decodeDecodes a LpTokenPriceTask message from the specified reader or buffer, length delimited.
Reader or buffer to decode from
LpTokenPriceTask
If the payload is not a reader or valid buffer
If required fields are missing
Static
encodeEncodes the specified LpTokenPriceTask message. Does not implicitly verify messages.
LpTokenPriceTask message or plain object to encode
Optional
writer: WriterWriter to encode to
Writer
Static
encodeEncodes the specified LpTokenPriceTask message, length delimited. Does not implicitly verify messages.
LpTokenPriceTask message or plain object to encode
Optional
writer: WriterWriter to encode to
Writer
Static
fromCreates a LpTokenPriceTask message from a plain object. Also converts values to their respective internal types.
Plain object
LpTokenPriceTask
Static
getStatic
toCreates a plain object from a LpTokenPriceTask message. Also converts values to other types if specified.
LpTokenPriceTask
Optional
options: IConversionOptionsConversion options
Plain object
Static
verify
Fetch LP token price info from a number of supported exchanges.
See our blog post on Fair LP Token Oracles
NOTE*: This is not the swap price but the price of the underlying LP token.
Input: None
Returns: The price of an LP token for a given AMM pool.
Example: Fetch the Orca LP token price of the SOL/USDC pool
Example: Fetch the fair price Orca LP token price of the SOL/USDC pool
Example: Fetch the fair price Raydium LP token price of the SOL/USDC pool