# CHI Token¶

All gas token versions share three common parameters — cost of minting, cost of burning and burning discount.
The most effective gas token is cheap to mint, cheap to burn and provides huge burning discount.
CHI parameters are as follows:

fixed_mint_cost = 30147
per_token_mint_cost = 36032
fixed_burn_cost = 14895
per_token_burn_cost = 6148
per_token_burn_discount = 24000

With these constants we can come up with cost functions for mint, burn and discount:

mint_cost(n) = 30147 + n * 36032
burn_cost(n) = 14895 + n * 6148
burn_discount(n) = 24000 * n

## CHI efficiency limit¶

CHI burning efficiency is the ratio between bun discount and burn cost.

efficiency(n) = discount_burn(n) / cost_burn(n)

Due to the presence of fixed costs, CHI efficiency goes to maximum when number of tokens approaches infinity.

efficiency_limit = discount_burn(INF) / cost_burn(INF)
efficiency_limit = 24000 / 14895
efficiency_limit = 3.903708523096942

**Theoretical efficiency limit is 3.9**

## Required gas price difference¶

It is reasonable to use CHI only when there is a significant gas price difference between minting and burning.
Required price difference equals to the ratio of minting cost to gas savings cost obtained from burning.
As with efficiency the required price difference approaches minimun when number of tokens approaches infinity.

gas_price_diff = cost_mint(INF) / (discount_burn(INF) - burn_cost(INF))
gas_price_diff = 36032 / (24000 - 6148)
gas_price_diff = 2.018373291507954

**Theoretical minimal price difference is 2.02**

## CHI discount limit¶

Discount percentage is the ratio between gas savings cost obtained from burning and actual transaction cost without CHI usage.
To calculate discount limit we fist need to calculate the amount of tokens to burn.
Maximal discount in Ethereum is 50% of spent gas.
Then burn discount should be equal to 50% of transaction cost and burn cost.

txn_cost + burn_cost = 2 * burn_discount
txn_cost + burn_cost = 2 * 3.903708523096942 * burn_cost
txn_cost = 6.807417046193884 * burn_cost

With knowledge of required burn cost we can calculate theoretical discount limit.

discount = (burn_discount - burn_cost) / txn_cost
discount = (3.903708523096942 * burn_cost - burn_cost) / (6.807417046193884 * burn_cost)
discount = (3.903708523096942 - 1) / 6.807417046193884
discount = 0.4265507024753895

**Theoretical CHI discount limit is 42.65%**