Oracles

Enabling reliable and real-time data feeds for smart contract execution and dApps on Carbon

Oracles act as intermediary components that link blockchains with real-world data. These services act as connectors between blockchains and the external world, facilitating the ability of smart contracts to access data sources beyond their own networks.

Carbon Oracles

Carbon oracles enable smart contracts to operate based on inputs and outputs from the real world by bridging the gap between Carbon and external systems.

On Carbon, validators are responsible for running oracles. Validators are required to submit the latest traded prices from the various constituent spot exchanges by casting "votes" to the chain. When votes representing 67% of bonded tokens has been submitted for a specific timestamp, the median value of the votes will be utilized to generate the index price.

As of 15/05/23, there are 34 oracles live on the Carbon Mainnet. For the latest list of oracles supported, please refer to Carbonscan.

Index Price

The Index Price of a derivatives contract is

  • Determined by oracles;

  • Calculated as the weighted average of the Market Price of its constituents.

Carbon has custom indexes specifically designed for unique derivatives.

For detailed information on Carbon's custom indexes and the methodology employed, click here. An example of a custom index on Carbon is the Liquid Staking Index (LSI).

When creating an oracle for a specific market, the rules and formulation for its index price must be specified. Please find the list of Index Prices below.

SIDXBTC

SIDXBTC represents the USD equivalent spot rate for BTC.

The following price data are used to obtain the index price for BTC:

Exchange
Weight

Coinbase (BTC-USD)

50%

Kraken (BTC-USD)

25%

Bitstamp (BTC-USD)

25%

SIDXETH

SIDXETH represents the USD equivalent spot rate for ETH.

The following price data are used to obtain the index price for ETH:

Exchange
Weight

Coinbase (ETH-USD)

50%

Kraken (ETH-USD)

25%

Bitstamp (ETH-USD)

25%

CAMPLUNA

CAMPLUNA represents the USD equivalent spot rate for ampLUNA.

The index price of ampLUNA is based on the price of LUNA and the staking yield that is earned by staking LUNA on Eris Protocol.

The following price data are used to obtain the index price for LUNA:

Exchange
Weight

Binance (LUNA-USDT)

60%

OKX (LUNA-USDT)

30%

Kucoin (LUNA-USDT)

10%

The redemption rate for ampLUNA is queried from Astroport and Eris Protocol.

The redemption rate refers to the exchange rate at which ampLUNA can be redeemed for LUNA.

CARB

CARB represents the USD equivalent spot rate for ARB.

The following price data are used to obtain the index price for ARB:

Exchange
Weight

Binance (ARB-BUSD)

40%

Coinbase (ARB-USD)

40%

Bitfinex (ARB-USD)

20%

CATOM

CATOM represents the USD equivalent spot rate for ATOM.

The following price data are used to obtain the index price for ATOM:

Exchange
Weight

Binance (ATOM-BUSD)

40%

Coinbase (ATOM-USD)

40%

Kraken (ATOM-USD)

20%

CAXLUSDC

CAXLUSDC represents the USD equivalent spot rate for axlUSDC.

The following price data are used to obtain the index price for axlUSDC:

Exchange
Weight

Curve (Polygon) (axlUSDC-USDC)

50%

Curve (Fantom) (axlUSDC-USDC)

50%

CBLUR

CBLUR represents the USD equivalent spot rate for BLUR.

The following price data are used to obtain the index price for BLUR:

Exchange
Weight

Coinbase (BLUR-USD)

60%

Uniswap (BLUR-USD)

40%

Note: To obtain the price data for BLUR-USD on Uniswap, the spot market for BLUR-ETH on Uniswap is used and multiplied by the index price of ETH.

The following price data are used to obtain the index price for ETH:

Exchange
Weight

Bitstamp (ETH-USD)

25%

Kraken (ETH-USD)

25%

Coinbase (ETH-USD)

50%

CBNB

CBNB represents the USD equivalent spot rate for BNB.

The index price for BNB is determined by taking the spot market price of BNB-UDST on Binance and multiplying it with the spot market price of USDT-USD on Coinbase.

CBUSDCEX

CBUSDCEX represents the USD equivalent spot rate for BUSD (BEP-20).

The index price for BUSD (BEP-20) is determined by taking the lower value between the spot market price of BUSD-USDT on BNB Smart Chain (BSC) and a static price of USD that is set at a fixed value of 1.

CBUSDDEX

CBUSDDEX represents the USD equivalent spot rate for BUSD (ERC-20).

The index price for BUSD (ERC-20) is determined by taking the lower value between the spot market price of BUSD-USDC on Uniswap and a static price of USD that is set at a fixed value of 1.

CCGLP

CCGLP represents the USD equivalent spot rate for cGLP.

The index price of cGLP is determined by the spot market price of GLP-USD on Arbitrum, as well as the redemption (i.e. auto-compounding yield data) that is earned from holding GLP.

Carbon-wrapped GLP, cGLP, automatically compounds ETH and esGMX rewards for users who deposit GLP into the Carbon GLP Vault on Arbitrum. The redemption rate refers to the exchange rate at which cGLP can be redeemed for GLP.

CEVMOS

CEVMOS represents the USD equivalent spot rate for EVMOS.

To obtain the index price of EVMOS, the spot market for EVMOS-OSMO on Osmosis is used and multiplied by the index price of OSMO.

The following price data are used to obtain the index price for OSMO:

Exchange
Weight

Osmosis (OSMO-USDC)

60%

Binance (OSMO-BUSD)

30%

MEXC (OSMO-USD)

10%

CGMX

CGMX represents the USD equivalent spot rate for GMX.

The following price data are used to obtain the index price for GMX:

Exchange
Weight

Binance (GMX-USD)

50%

Uniswap (GMX-USD)

50%

Note: To obtain the price data for GMX-USD on Uniswap, the spot market for GMX-ETH on Uniswap is used and multiplied by the index price of ETH.

The following price data are used to obtain the index price for ETH:

Exchange
Weight

Bitstamp (ETH-USD)

25%

Kraken (ETH-USD)

25%

Coinbase (ETH-USD)

50%

CKUJI

CKUJI represents the USD equivalent spot rate for KUJI.

The following price data are used to obtain the index price for KUJI:

Exchange
Weight

Kujira (KUJI-USDC)

60%

Osmosis (KUJI-USDC)

40%

Note: To obtain the price data for KUJI-USDC on Osmosis, the spot market for KUJI-OSMO on Osmosis is used and multiplied by the index price of OSMO.

The following price data are used to obtain the index price for OSMO:

Exchange
Weight

Osmosis (OSMO-USDC)

60%

Binance (OSMO-BUSD)

30%

MEXC (OSMO-USDT)

10%

CLUNA

CLUNA represents the USD equivalent spot rate for LUNA.

The following price data are used to obtain the index price for LUNA:

Exchange
Weight

Binance (LUNA-USDT)

60%

OKX (LUNA-USDT)

30%

Kucoin (LUNA-USDT)

10%

CNEO

CNEO represents the USD equivalent spot rate for NEO.

The following price data are used to obtain the index price for NEO:

Exchange
Weight

Binance (NEO-USD)

60%

OKX (NEO-USD)

30%

Bitfinex (NEO-USD)

10%

COKB

COKB represents the USD equivalent spot rate for OKB.

The index price for OKB is determined by taking the spot market price of OKB-USDT on OKX and multiplying it with the spot market price of USDT-USD on Coinbase.

COKT

COKT represents the USD equivalent spot rate for OKT.

The index price for OKB is determined by taking the spot market price of OKT-USDT on OKX and multiplying it with the spot market price of USDT-USD on Coinbase.

COSMO

COSMO represents the USD equivalent spot rate for OSMO.

The following price data are used to obtain the index price for OSMO:

Exchange
Weight

Binance (OSMO-BUSD)

60%

Osmosis (OSMO-USDC)

20%

MEXC (OSMO-USDT)

20%

CRATOM

CRATOM represents the USD equivalent spot rate for rATOM.

The index price of rATOM is based on the price of ATOM and the staking yield that is earned by staking ATOM on StaFiHub.

The following price data are used to obtain the index price for ATOM:

Exchange
Weight

Binance (ATOM-BUSD)

40%

Coinbase (ATOM-USD)

40%

Kraken (ATOM-USD)

20%

The redemption rate for rATOM is queried from StaFiHub and rDEX.

The redemption rate refers to the exchange rate at which rATOM can be redeemed for ATOM.

CRSWTH

CRSWTH represents the USD equivalent spot rate for rSWTH.

The index price of rSWTH is based on the price of SWTH and the staking yield that is earned by staking SWTH on StaFiHub.

The index price for SWTH is determined by the spot market price of SWTH-USD on Carbon (see CSWTH).

The redemption rate for rSWTH is queried from StaFiHub.

The redemption rate refers to the exchange rate at which rSWTH can be redeemed for SWTH.

CRSWTHSWTHLP

CRSWTHSWTHLP represents the USD equivalent spot rate for the rSWTH-SWTH LP token.

To calculate the index price of the rSWTH-SWTH LP token, the following steps are taken:

  1. Firstly, the index price for SWTH and rSWTH is determined.

The redemption rate for rSWTH is queried from StaFiHub, which is the exchange rate for rSWTH to SWTH.

The index price for SWTH is determined by the spot market price of SWTH-USD on Carbon (see CSWTH), while the index price for rSWTH is calculated from the redemption rate.

  1. Secondly, the amount of rSWTH and SWTH in the rSWTH-SWTH LP is determined.

The amount of rSWTH and SWTH in the liquidity pool is fetched from the Carbon API, taking into account the different decimal places for each token.

  1. Thirdly, the total amount of liquidity in the rSWTH-SWTH LP is determined.

The amount of rSWTH and SWTH is multiplied by their respective index prices to calculate the supply of each token in the LP. The weighted average of the rSWTH and SWTH pool value (50-50) is calculated and then multiplied by 2 to determine the total liquidity in the LP.

  1. Lastly, the index price of the rSWTH-SWTH LP token is determined.

The rSWTH-SWTH pool value in USD is divided by the supply of the token (as seen in clpt_104_supply).

CSTATOM

CSTATOM represents the USD equivalent spot rate for stATOM.

The index price of stATOM is based on the price of ATOM and the staking yield that is earned by staking ATOM on Stride Zone.

The following price data are used to obtain the index price for ATOM:

Exchange
Weight

Binance (ATOM-BUSD)

40%

Coinbase (ATOM-USD)

40%

Kraken (ATOM-USD)

20%

The redemption rate for stATOM is queried from Stride Zone and Osmosis.

The redemption rate refers to the exchange rate at which stATOM can be redeemed for ATOM.

CSTEVMOS

CSTEVMOS represents the USD equivalent spot rate for stEVMOS.

The index price of stEVMOS is based on the price of EVMOS and the staking yield that is earned by staking EVMOS on Stride Zone.

The redemption rate for stEVMOS is queried from Stride Zone and Osmosis.

The redemption rate refers to the exchange rate at which stEVMOS can be redeemed for EVMOS.

Note: To obtain the index price of EVMOS, the spot market for EVMOS-OSMO on Osmosis is used and multiplied by the index price of OSMO.

The following price data are used to obtain the index price for OSMO:

Exchange
Weight

Osmosis (OSMO-USDC)

60%

Binance (OSMO-BUSD)

30%

MEXC (OSMO-USD)

10%

CSTLUNA

CSTLUNA represents the USD equivalent spot rate for stLUNA.

The index price of stLUNA is based on the price of LUNA and the staking yield that is earned by staking LUNA on Stride Zone.

The redemption rate for stLUNA is queried from Stride Zone and Astroport.

The redemption rate refers to the exchange rate at which stLUNA can be redeemed for LUNA.

The following price data are used to obtain the index price for LUNA:

CSTOSMO

CSTOSMO represents the USD equivalent spot rate for stOSMO.

The index price of stOSMO is based on the index price of OMSO and the staking yield that is earned by staking OSMO on Stride Zone.

The redemption rate for stLUNA is fetched from the Stride and Osmosis API.

The redemption rate refers to the exchange rate at which stOSMO can be redeemed for OSMO.

The following price data are used to obtain the index price for OSMO:

Exchange
Weight

Binance (OSMO-BUSD)

60%

Osmosis (OSMO-USDC)

20%

MEXC (OSMO-USDT)

20%

CSTRD

CSTRD represents the USD equivalent spot rate for STRD.

The index price for STRD is determined by taking the spot market price of STRD-OSMO on Osmosis and multiplying it with the index price of OSMO on Carbon (as determined by the COSMO oracle).

CSTRIDE

CSTRIDE represents the USD equivalent spot rate for STRIDE.

The index price for STRD is determined by taking the spot market price of STRD-OSMO on Osmosis and multiplying it with the index price of OSMO on Carbon (as determined by the COSMO oracle).

CSWTH

CSWTH represents the USD equivalent spot rate for SWTH.

The index price for SWTH is determined by the spot market price of SWTH-USD on Carbon.

CUSC

CUSC represents the USD equivalent spot rate for USC.

The index price for USC is determined by taking the lower value between the spot market price of USC-USD on Demex and a static market price of USC-USD that is set at a fixed value of 1.

CUSD

CUSD represents the USD equivalent spot rate for USD.

The index price for USD is determined by taking a static market price of USD that is set at a fixed value of 1.

CUSDC

CUSDC represents the USD equivalent spot rate for USDC.

The following price data are used to obtain the index price for USDC:

Exchange
Weight

Coinbase (USDC-USD)

50%

Kraken (USDC-USD)

25%

Bitstamp (USDC-USD)

25%

CWSTETH

CWSTETH represents the USD equivalent spot rate for wstETH.

The index price of stOSMO is based on the index price of ETH and the staking yield that is earned from wrapping stOSMO on Lido Finance.

The redemption rate for stLUNA is queried from Lido Finance.

The redemption rate refers to the exchange rate at which wstETH can be redeemed for stETH.

The following price data are used to obtain the index price for ETH:

Exchange
Weight

Coinbase (ETH-USD)

50%

Bistamp (ETH-USD)

25%

Kraken (ETH-USD)

25%

CYIELDUSD

CYIELDUSD represents the USD equivalent spot rate for YieldUSD.

The index price for YieldUSD is determined using the spot market price of YieldUSD-USDC on ___.

Last updated