Skip to main content
Oracles

General concepts​

Tangent uses Chainlink and Curve’s oracles to price tokens, and LP tokens. For Pendle PTs, Tangent uses the official oracle provided by Pendle.

Single assets oracle​

For markets with single-assets as collateral, Tangent uses Chainlink price feeds. If the asset doesn’t have a Chainlink price feed, Tangent uses the price_oracle from a reference Curve pool, wherein the pool’s counterparty has a Chainlink price feed.

Pessimistic oracle for Curve stableswap LP tokens​

Stablepool LP tokens represent a position in a stableswap liquidity pool consisting of two or more tokens whose prices are correlated. To ensure safe pricing, Tangent considers that all tokens in a pool have the price of the lowest asset in the pool, hence the pessimistic oracle naming. If any asset in a pool doesn’t have a Chainlink price feed, Tangent uses the price_oracle from a reference Curve pool, wherein the pool’s counterparty has a Chainlink price feed. Once the lowest asset in the pool is determined, its price is multiplied by the virtual_price of the pool to compute the price of the LP token. For example in the situation where we consider the fxUSD/USDC pool: USDC has a Chainlink price feed, while fxUSD doesn’t. fxUSD is then priced using the price_oracle in the fxUSD/USDC pool. If we have the following values: We have: fxUSD price=0.9975×1.0005=$0.9979\color{white} \text{fxUSD price} = 0.9975 \times 1.0005 = \$0.9979 fxUSD is then the asset with the lowest price in the pool, and is used to compute the LP token’s price as follows: LP token price=0.9979×1.055=$1.0529\color{white} \text{LP token price}=0.9979 \times 1.055 = \$1.0529

Oracle for Curve cryptoswap LP tokens​

Cryptoswap LP tokens (for both twocrypto and tricrypto pools) represent a position in a liquidity pool consisting of two or more tokens whose prices aren’t correlated. To ensure safe pricing, Tangent uses the lp_price, a pool’s internal and manipulation-resistant oracle. The lp_price returns the price of the pool, denominated in the first pool’s asset. If this asset doesn’t have a Chainlink price feed, Tangent uses the price_oracle from a reference Curve pool, wherein the pool’s counterparty has a Chainlink price feed. For example in the situation where we consider the FXN/ETH pool: ETH has a Chainlink price feed, and is the primary asset in the pool. Hence, the lp_price is denominated in ETH. If we have the following values:
  • ETH Chainlink price feed = $3000
  • lp_price = 0.25 ETH
The LP token’s price is then computed as follows: LP token price=0.25×3000=$750\color{white} \text{LP token price}=0.25 \times 3000 = \$750