# K-coefficient

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

K is a conversion coefficient of miners’ work to JAX coins. In Jax.Network, whenever a miner computes a hash in order to find a valid one, the mathematical expectation of JAX coin reward that he gets is equal to K. Hence, K-coefficient setting regulates the cost of production of JAX coin. Adjustment of K-coefficient is used to regulate the economics of the JAX cryptocurrency.

## Formal definition

K-coefficient is defined as a mathematical expectation of JAX coin block reward which the miner gets by computing a single hash. In other words, in Jax.Network, whenever a miner computes a hash in order to find a valid one, the mathematical expectation of JAX coin block reward that he gets is equal to K.

There are two important remarks:

1. In this definition aforementioned block reward doesn’t include transaction fees. We consider only the basic block subsidy issued to the miner, which often consists of freshly minted coins. The size of this subsidy is often determined by the protocol rules.
2. Orphan blocks are not distinguished from blocks included into the main chain. We consider block rewards of blocks with completed PoW puzzles independent on whether their producers were rewarded with those coins or not.

## K-coefficient in single-chain networks

In the case of a single-chain Proof-of-Work network such as Bitcoin, K-coefficient could be calculated as ratio between block reward and block difficulty. The formula is below:

$\displaystyle{ \label{eq:K-coeff} \small K = R/D }$

In this formula $\displaystyle{ \scriptsize R }$ is a block reward and $\displaystyle{ \scriptsize D }$ is a block difficulty measured in hashes.

### K-coefficient in Bitcoin

For example, the block #740,040 has a block subsidy 6.25BTC and a block difficulty 30.2833T. Here T stands for $\displaystyle{ \scriptsize 10^{12} }$ Bitcoin unit difficulties of $\displaystyle{ \scriptsize 2^{32} }$ hashes:

$\displaystyle{ \small T=10^{12} \cdot 2^{32} \: \mathit{\scriptsize hash} }$

However people should be careful, since on some websites "T" represents $\displaystyle{ \scriptsize 2^{72} }$ hashes.

So one can apply the formula to calculate the K-coefficient for this block:

$\displaystyle{ \small K_{BTC}=\frac{6.25 \, \mathit{\scriptsize BTC}}{30.2833 \cdot 10^{12}\cdot 2^{32} \, \mathit{\scriptsize hash}}=0.206 \cdot 10^{-12}\cdot 2^{-32}\mathit{\scriptsize \left(\frac{BTC}{hash}\right)} }$

### K-coefficient in Bitcoin Cash

Similarly, one can calculate K-coefficient for Bitcoin Cash block #743753 which has been mined on the same day. Its block subsidy is 6.25BCH and block difficulty is 175.1G. Here "G" stands for 10^9 times 2^32 hashes. So K-coefficient for this block is

$\displaystyle{ \small K_{BCH}=\frac{6.25\mathit{\scriptsize BCH}}{175.1\cdot 10^9\cdot2^{32}\mathit{\scriptsize hash}}=35.69\cdot10^{-12}\cdot2^{-32}\mathit{\scriptsize \left(\frac{BCH}{hash}\right)} }$

$\displaystyle{ \small K_{BCH}=35.69\mathit{\scriptsize \frac{BCH}{T}} }$

### Main property

It's easy to notice the following fact related to the K-coefficient. If multiple blockchain networks share a similar protocol, the same coin issuance schedule, the same block interval and identical hashing algorithm, then, most of the time, the revenue from mining a block in a particular moment of time is the same for every such network.

For example, according to the data from coinmarketcap.com, the price of BTC on 9th June 2022 at 5pm was about 30,157\$. The price of BCH was about 177\$. It’s a time when blocks #740,040 and #743753 have been mined. If we multiply prices of BTC and BCH by respective K coefficients, we will have:

$\displaystyle{ \small P_{BTC} \cdot K_{BTC} = 6212 \mathit{\scriptsize \frac{\}{T}} }$

$\displaystyle{ \small P_{BCH} \cdot K_{BCH} = 6317 \mathit{\scriptsize \frac{\}{T}} }$

Although these values are not equal, they are close to each other. This property represents an equilibrium on the hashrate market as mining BTC and BCH has the same profitability most of the time. It’s possible because BTC and BCH use the same hashing function SHA256D and the same PoW puzzle for miners.

Miners can use this property to build their business strategies. Although BCH block subsidies are more lucrative for mining, BTC miners collect higher transaction fees per block. Moreover, over time BCH price depreciates compared to BTC. So miners, who prefer to hold mined coins for a while, are more interested in mining and holding BTC.

## K-coefficient in Jax.Network

In Jax.Network the K-coefficient naturally fits into the protocol design. Jax.Network consists of the beacon chain and multiple shard chains which work in parallel.

Miners can choose a subset of shard chains for merge-mining. Every hash, which they generate, can complete the proof-of-work for one of multiple block candidates. These block candidates belong to different chains, they have different block difficulties and potential block rewards. Nevertheless, in Jax.Network miner’s expected aggregate block rewards do not depend on the number of shards that he merge-mines.

This approach to block rewards differs from the one used in Bitcoin. In Bitcoin, current block difficulty and block subsidy determine the value of the K-coefficient. In contrast, in Jax.Network, the K-coefficient determines shard block rewards. Thus we can say that Bitcoin follows a fixed block reward paradigm, while Jax.Network has a work-based or hashrate-based reward scheme.

Market conditions and economic factors change over time. That is the reason why key parameters of blockchain economics might require an adjustment. Since the K-coefficient is such a parameter, Jax.Network has a decentralized mechanism for its adjustment.

In Bitcoin and many other single-chain blockchain networks with fixed block rewards, the K-coefficient is adjusted every two weeks along with the difficulty. When the Bitcoin block difficulty is reduced, the K-coefficient of Bitcoin is increased, when the difficulty is increased, the K-coefficient decreases.

In contrast to Bitcoin, the K-coefficient adjustment is separated from the difficulty adjustment in Jax.Network. The initial value of the K-coefficient in Jax.Network is set to $\displaystyle{ \scriptsize 2^{-60} }$ JAX/hash. Then the K-coefficient is adjusted every 4096 beacon chain blocks. This is a timespan of around 4 weeks.

K-coefficient adjustment is implemented in such a way that it doesn’t break independence of shard chains in Jax.Network.

K-coefficient adjustment is useful for keeping a stable purchasing power of JAX and holding stable incentives for miners in Jax.Network.

## Usage of the term

The concept of K-coefficient was first introduced in JaxNet protocol whitepaper. Although this concept is native to Jax.Network, it could be applied to many other blockchain networks with completely different architectures.

At the present moment K-coefficient is not widely accepted and used term. Nevertheless there are few similar terms used in other blockchain projects. For instance Cardano has a concept "K parameter" which describes the interest which stackers receive for staking.