An explanation of the conversion mechanism between the Quai and Qi tokens.
Note
All conversion transactions are locked up for 2 weeks
i
, denoted minerDifficulty_i
, is calculated as an Exponential Moving Average (EMA) of prime block difficulty over a 4000-block window. This balances responsiveness to network changes with long-term stability:
minerDifficulty_{i-1}
: Difficulty at the previous block.blockDifficulty_i
: Difficulty of the current prime block.k_Qi
k_Quai
and k_Qi
, respectively:
reward_Quai = k_Quai × log2(blockDifficulty_i)
reward_Qi = k_Qi × blockDifficulty_i
k_Qi
as a dynamic parameter tied to hashrate efficiency, which evolves with GPU performance improvements. Based on research from Epoch AI, GPU efficiency (measured in flops) doubles every 2.69 years due to smaller transistors and increased core counts, plateauing after 2030. Assuming saturation after two doublings, k_Qi
adjusts with block height (number
):
baseKqi = 1 / (8 × 10^9)
doublingPeriodInBlocks = (365 × BlocksPerDay × 2.69)
doublingCount = floor(number / doublingPeriodInBlocks)
remainingBlocks = number - doublingCount × doublingPeriodInBlocks
BlocksPerDay
: Constant number of blocks mined per day.k_Qi
, which adjusts to technological trends, k_Quai
is actively controlled by the protocol to maintain token neutrality. All exchange rate references below pertain to k_Quai
.
i
, conversionFlowAmount_i
, is an EMA of Quai conversion amounts, adjusted by two discounts: a cubic conversion flow discount and a K-Quai discount. It includes a minimum threshold:
conversionFlowAmount_{i-1}
: Previous block’s conversion flow amount.currentFlowAmount_i
: Current block’s conversion amount before the discounts.finalValue ≥ 0.1 × originalValue
etx
in next zone blockkQuai_{i-1}
: Previous rateα = 0.001
d
: Normalized difficultyd*
: Target difficulty