Comment on page
In a nutshell, the index is produced based on a Black-Scholes option pricing model, which computes the implied volatility of cryptocurrency option prices together with analyzing the market’s expectation of future volatility.
To be able to implement the crypto volatility index, it is crucial to have an options exchange with rules, market makers, order books, and good turnover to provide reliable option prices. Volatility can’t be accurately calculated if we can’t be sure that there are no holes in the option chain. For this reason, one of the data sources we used for the CVI calculations is Deribit exchange, which is the most advanced and widely adopted platform for derivatives and options, among other exchanges.
By computing a decentralized volatility index (CVI) from cryptocurrency option prices, the new system analyzes the market’s expectation of future volatility. COTI’s method addresses the challenging liquidity environment of this evolving asset class and allows us to extract the needed data to evaluate implied volatilities.
In order to ensure decentralization and transparency, Chainlink architecture uses multiple independent oracles, which use external adapters to retrieve trading options data from across the market in order to calculate the CVI. The calculated response from each individual oracle node is aggregated together to form a single price index that is broadcast on to the blockchain. Once on-chain, the data can be called by the requesting smart contract to trigger critical on-chain functions like settling a derivatives contract.
The combined CVI index is a weighted sum of CVI indices calculated for several cryptocurrencies (for example BTC and ETH), where weights are set in accordance with the asset market capitalization.
In order for CVI to source data from premium off-chain APIs and perform custom calculations on that data, we need to make use of Chainlink External Adapters. The External Adapter allows smart contracts to connect to Chainlink nodes, send them a specific list of tasks to execute (called a Chainlink Job Spec), and identify a list of possible ways to schedule them (called an ‘initiator list’). The initiator allows us to trigger the job spec, and we will be using the Chainlink Cron initiator to schedule our external adapter to run specific time intervals.
Chainlink allows complete freedom with external adapters, as they can be written in any language and operate as serverless functions on AWS / GCP. We will be using a dockerized Node.js server to issue API calls to crypto derivative options exchanges such as Derbit, LedgerX, OkEX, and CBOE.
Due to the high cost of repeatedly dispatching and updating values on the Ethereum blockchain, the CVI calculation and data aggregation will be done off-chain inside the CVI External Adapter. The final result is then sent on-chain to the CVI Oracle Contract as a single value — the CVI index.
- At regular intervals, Chainlink oracle nodes fetch market data on cryptocurrency options contracts from multiple data provider APIs and aggregate the data off-chain (in the CVI external adapter) using the Black-Scholes option pricing model, weighting assets by market cap to create a single reference price point for the CVI.
- This reference price point is compared to the previous on-chain update and if it is beyond a specified deviation, the Chainlink oracle node performing the check initiates a round update for the Reference Price Feed by creating an on-chain transaction with their data.
- Once other oracle nodes in the oracle network see the initiation of a new round, they each perform the same data sourcing and aggregation process, responding with their CVI data on-chain.
- After a sufficient threshold of oracle nodes have responded on-chain, each node’s response is aggregated together to generate a single tamper-resistant reference data point. This refined CVI data point is then made available to external contracts which can be used for the settlement of derivatives contracts and other DeFi smart contracts.
- The process then repeats, with nodes checking if updates should occur at regular intervals and monitoring for round updates from other nodes. This ensures the on-chain CVI Reference Price Feed is always kept fresh with tamper-resistant and high-quality market data reflective of real-time market conditions.