Situation
CVI, a Crypto Volatility Index for the Blockchain Economy
Trading volatility can allow investors to find profitable opportunities in the market without requiring
them to predict price direction. In traditional markets, the VIX—the Chicago Board Options
Exchange's volatility index—is a commonly used measure of the stock market's expectation of
volatility. Often referred to as the “fear index”, the VIX enables investors to quantify the level of
market risk and gauge market sentiment.
The COTI team recognized an opportunity to utilize
the permissionless and transparent nature of blockchains and create a decentralized version of VIX for
cryptocurrency markets. They created the Crypto Volatility Index (CVI), an index and trading platform
designed to predict the crypto market’s expected future volatility for the upcoming 30 days, allowing
users to hedge against market volatility.
The calculation of CVI is made using External Adapters. To help ensure the benefits of decentralization and transparency, CVI uses data aggregation model to allow CVI to retrieve the required data and calculate the CVI formula. The calculated results from each oracle are aggregated, verified, and passed to the blockchain node. The combined CVI index is a weighted sum of CVI indices calculated for several cryptocurrencies on an hourly basis, with weights set according to market capitalization. The CVI token is a funding fee-adjusted rebasing volatility token that remains pegged to the CVI index over time, enabling investors to trade the token on secondary markets while making CVI composable with the larger DeFi ecosystem.
Challenge
Secure Automation of CVI’s Rebasing Smart Contract
- CVI’s volatility tokens require rebasing every day to maintain their peg
- CVI needed a decentralized and highly-reliable entity to call its smart contracts on-chain to
trigger the rebasing mechanism
- Relying on centralized scripts or manual input would potentially lead to downtime, causing incorrect
token pricing and cascading failures
The secure, trust-minimized automation of recurring smart contract functions is a
feat many development teams strive for. The COTI team’s goal was to automate and decentralize the
rebasing mechanism of CVI and make the token more resilient to potential downtime or manipulation. Due
to the inherent composability of the DeFi
ecosystem, incorrect token pricing through a missed rebase can have cascading negative effects in a loop
of interconnected decentralized applications.
Outsourcing such a critical DevOps task to a
decentralized network isn’t a straightforward exercise. An often overlooked property of smart contracts
is that they cannot call their own functions, meaning they need an on-chain transaction to trigger their
predefined contract logic. While certain types of protocols such as automated market makers (AMMs) can
rely on users initiating transactions to wake up the contract, the CVI token’s rebasing mechanism needs
an external entity called a “keeper” to trigger smart contract execution.
One way for the
COTI team to enable transaction automation would be to manually monitor and trigger the rebasing
mechanism through a centralized server. However, this method would introduce a central point of failure
and require precious development resources that otherwise could be spent improving the underlying logic
of the protocol.
Solution
Automation Empowers Autonomous, Decentralized CVI Token Rebasing
CVI integrated Automation to trigger the rebasing mechanism of their volatility tokens.
Automation leverages a decentralized network of nodes that provides smart contract automation
services in a cost-efficient and trust-minimized manner. With Automation, developers can
submit customized jobs to call smart contract functions based on predefined conditions.
Automation then checks these conditions through secure off-chain computation to trigger smart contract
execution.
Automation triggers CVI’s rebasing smart contract each day at midnight
UTC. The CVI smart contract verifies that the time conditions have been met and automatically increases
or decreases the total token supply in order to achieve the desired peg for the CVI token. Without
transaction automation solution, the task of triggering rebases would have to be performed
manually or using a centralized process.
As a result, the COTI team has an automated way to execute the daily token rebasing
mechanism of the CVI token with increased resiliency to outlier events, while mitigating the risks
around manual interventions or using centralized servers.
Business Outcomes
A Decentralized Crypto Volatility Index for an Evolving Asset Class
Automation is now a fundamental component of the Crypto Volatility Index, enabling an automated rebasing mechanism for the CVI token. By removing the need for a manual rebasing mechanism, the COTI team can save on development time that would have been required to write and maintain centralized scripts or manually trigger the rebase.
Furthermore, the security and reliability provided by the combination of Automation and smart contracts contribute to the COTI team’s goal of creating a decentralized volatility index suitable for the trust-minimized blockchain economy.
As of December 2021, Automation is helping to secure over $30M Total Value Locked (TVL) across the CVI protocol. Supported by Automation, CVI is laying the foundation for advanced on-chain applications that establish more transparency in the global financial system.