# [CMP #7.2] Amendment to CMP #3

[CMP #7.2] Amendment to CMP #3


This CMP seeks to clarify [CMP #3] by defining in depth how to compute the TWAP.


[CMP #7.2] Amendment to CMP #3

High Level Details:

[CMP #3] - Protocol Compensation Overhaul” does specify exactly how the TWAP is calculated, this proposal has the goal of defining an in-depth method.

Provide Low Level Details:

[CMP #3] remains in place. This proposal is effective immediately, Q1 included.

To calculate the TWAP, we must first define how to calculate the price at any given block of a chain.

The price at a given block is defined by the amount of $ per VOLTA that would be obtained by selling 10 VOLTA in the biggest liquidity pool of a given chain (i.e. getting a quote without executing anything). Uniswap and other protocols provide contract functions to get a quote for selling a certain amount of tokens (for example, see Getting a Quote | Uniswap). Most RPC endpoints can simulate a call of a contract function at any given block (eth_call).

The biggest liquidity pool is the one that maintained the largest liquidity (excluding the VOLTA portion) for the longest time over the quarter.

The TWAP over any time period on a given chain must be calculated as follows.
{start block}: the block closest in time to the start of the TWAP period
{end block}: the block closest in time to the start of the TWAP period
{block interval}: divide 60 seconds by the average block time (in seconds) of the chain, rounding down (for example, if blocks on Ethereum take 12 seconds on average, {block interval} would be 5)

TWAP: counting from block {start block}, exactly every {block interval} blocks take the price using the method defined above, stop before surpassing {end block}, and compute the average of the price.


current block = {start block}
total = 0
counted blocks = 0
while (current block < {end block}) {
  total = total + price(block)
  counted blocks = counted blocks + 1
  current block = current block + {block interval}
TWAP = total / counted blocks

After calculating the TWAP on Ethereum and Avalanche separately, compute an equally-weighted average to obtain the final (global) TWAP used for calculating performance fees.

As further clarification for [CMP #3], which says:

“The performance fee will be capped at 80% of the liquid backing of Volta Club token in order to protect the interest of long term holders.”

The liquid backing used for capping the performance fee must be calculated on the last day of each quarter.

Voting has now closed for CMP #7.2.

[CMP #7.2] - Amendment to CMP #3 did not pass , with only 57.84% of votes in favor (75% is required).