CVI Platform
A user-friendly and decentralized platform that allows users to actually trade the CVI index according to their belief in the market.
In our efforts to create a full-scale decentralized ecosystem, along with developing the CVI Index, we created a user-friendly platform allowing users to trade the index directly and hedge themselves to market volatility or lack thereof.
The liquidity provided is utilized by the CVI AMM (Automated market marker), which sells volatility according to the index value, it is in essence the other side of every trade done by traders. The AMM takes into account the market demand for volatility in a given moment, as well as risk management metrics of the liquidity providers.

The AMM pricing mechanism:

The AMM takes into account the demand for volatility at any given moment. The calculation works as follows: We maintain two adjusted volume timestamps, one for deriving open position fees and the other for close position fees. Each of these timestamps always lies within a corresponding time window prior to the current block timestamp.
At the moment, both time windows for the open and close position are set to 2 hours. Every open position event triggers an adjustment of the corresponding
adjustedVolumeTimestampadjustedVolumeTimestamp
and the same goes for closePosition events. Each adjustment call first sets
adjustedTimestampadjustedTimestamp
to be
max(adjustedTimestamp,block.timestampvolumeTimeWindow)max(adjustedTimestamp,block.timestamp-volumeTimeWindow)
and then further advances it according to the following formula:
adjustedTimestamp=min(block.timestamp,adjustedTimestamp+volumeTimeWindowdeltaCollateralmaxVolumeFeeDeltaCollateral)adjustedTimestamp=min(block.timestamp,adjustedTimestamp+volumeTimeWindow\cdot\frac{deltaCollateral}{maxVolumeFeeDeltaCollateral})
This adjustment is designed to respond to sudden surges in open/close position operations as well as positions that greatly affect the collateral ratio in the system. After
adjustedTimestampadjustedTimestamp
is set, volume fees are calculated with respect to the interval in which
adjustedTimestampadjustedTimestamp
lies. The volume fee increases from zero to
midVolumeFeemidVolumeFee
linearly, and then further increases linearly until it reaches
maxVolumeFeemaxVolumeFee
when
adjustedTimestampadjustedTimestamp
reaches the current block timestamp.
Right now, since
midVolumeFeemidVolumeFee
is set to zero, volume fees are applied only when
adjustedTimestampadjustedTimestamp
is larger than
block.timestampvolumeFeeTimeWindowblock.timestamp-volumeFeeTimeWindow
. The volume fee is calculated as follows:
  • If
    adjustedVolumeTimestamp[block.timestampvolumeTimeWindow,block.timestampvolumeFeeTimeWindow]adjustedVolumeTimestamp\in[block.timestamp-volumeTimeWindow,block.timestamp-volumeFeeTimeWindow]
    , Then:
    midVolumeFeeadjustedVolumeTimestamp(block.timestampvolumeTimeWindow)volumeTimeWindowvolumeFeeTimeWindowmidVolumeFee\cdot\frac{adjustedVolumeTimestamp-(block.timestamp-volumeTimeWindow)}{volumeTimeWindow-volumeFeeTimeWindow}
  • If
    adjustedVolumeTimestamp[block.timestampvolumeFeeTimeWindow,block.timestamp]adjustedVolumeTimestamp\in[block.timestamp-volumeFeeTimeWindow,block.timestamp]
    , Then:
    midVolumeFee+(maxVolumeFeemidVolumeFee)adjustedVolumeTimestamp(block.timestampvolumeFeeTimeWindow)volumeFeeTimeWindowmidVolumeFee+(maxVolumeFee-midVolumeFee)\cdot\frac{adjustedVolumeTimestamp-(block.timestamp-volumeFeeTimeWindow)}{volumeFeeTimeWindow}
Copy link