Note
All conversion transactions are locked up for 2 weeks
Core Components
Miner Difficulty
Miner difficulty at blocki
, 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.
Block Rewards and k_Qi
Block rewards are distributed in Quai or Qi, scaled by coefficients k_Quai
and k_Qi
, respectively:
-
Quai Block Reward:
reward_Quai = k_Quai × log2(blockDifficulty_i)
-
Qi Block Reward:
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
.
Conversion Flow Amount and Discounts
The conversion flow amount at blocki
, 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.
Cubic Conversion Flow Discount
Each conversion transaction receives a cubic discount:
K-Quai Discount
K-Quai Discount applies to only one type of conversion at any point depending on the direction of the controller adjustment over the 4000 block window. If exchange rate is increasing, then the discount applies to Quai to Qi conversions and if exchange rate is decreasing, the discount applies to only Qi to Quai conversions.
Discount Cap
finalValue ≥ 0.1 × originalValue
Max Slip Specification
-
Quai-to-Qi:
- Max Slip default: 90% (9000 basis points)
- Specified in first two bytes of the Data field
- Refunds happen via
etx
in next zone block
-
Qi-to-Quai:
- Data field must be 22 bytes: Bytes 0–1 for slip, 2–21 for refund address
- Refunds are locked for two weeks, 1 Qi precision
Exchange Rate Calculation

kQuai_{i-1}
: Previous rateα = 0.001
d
: Normalized difficultyd*
: Target difficulty
Normalized Difficulty

Target Difficulty
Simple average of adjusted difficulty over last 4000 blocks.Transaction Processing and Adjusted Difficulty
- Coinbase Transactions: Add a choice to Quai or Qi
- Conversion Transactions: Normalize by destination block reward
