Skip to content

Commit

Permalink
Add math to rewards
Browse files Browse the repository at this point in the history
  • Loading branch information
sunhuachuang committed Dec 27, 2024
1 parent 15b1a66 commit 48ae973
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions content/pozk/reward/reward.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ section = "pozk"
lead = 'Reward and punishment mechanism.'
toc = true
top = false
math = true
+++

## Reward
Expand All @@ -21,18 +22,36 @@ In the pozk mining network, a fixed amount of mining rewards will be released in
First, because there are different games (zk provers) in the network, each prover requires different computing power and running time, so we need to make a fair distribution of the provers.
Here, the parameters include the prover's work and the staking amount. So there are two attributes of labor and assets, we adopted [Cobb–Douglas production function](https://en.wikipedia.org/wiki/Cobb%E2%80%93Douglas_production_function) when allocating the two attributes fairly.

// math
<p>
\(W_g\) is the prover's proof of ZK work, \(W_t\) is all provers' work, \(S_g\) is the prover's staking amount, \(S_t\) is total provers' staking amount. \(a\) and \(b\) is cobb-douglas coefficients. \(n\) is epoch reward number.
</p>

$$
\varphi = n \times (\dfrac{W_g}{W_t})^a \times (\dfrac{S_g}{S_t})^b
$$

After we have made a fair distribution among the provers, we will then distribute the miners and players within each prover.

In order to conduct macro-control between miners and players and attract more players and miners to join in, a linear ratio is adopted.
When there are fewer players, players will get more rewards, which encourages players to play more games. As more games are played, more zk tasks are created, and then rewards of miners will also increase.

// math
<p>
Miners reward percentage \(P_m\), Miners reward amount is \( \varphi \times \dfrac{P_m}{100} \), miner maximum percentage \(p\),miner minimum percentage \(q\),maximum number of computed games \(t\),minimum number is \(1\), the number of games \(x\), players reward is \(\varphi \times \dfrac{100 - P_m}{100}\):
</p>

$$
P_m = \dfrac{x - 1}{t - 1} \times (p - q) + q
$$

We adopt same distribution methods among miners and players, because there are still two parameters, one is staking and the other is labor, so we still adopt Cobb–Douglas production function.

// math
<p>
\(W_m\) is the miner's task number, \(W_t\) is task number of this miner, \(S_m\) is the miner's staking amount, \(S_t\) is total miners' staking amount. \(c\) and \(d\) is cobb-douglas coefficients. \(m\) is prover's miner/player reward amount.
</p>

$$
R_m = m \times (\dfrac{W_m}{W_t})^c \times (\dfrac{S_m}{S_t})^d
$$

In this way, we distribute all rewards fairly.

Expand Down

0 comments on commit 48ae973

Please sign in to comment.