Calculating Payouts
This page details how we determine payouts to delegators. Payouts are based on the block rewards received by the block-producing account.
Only blocks on the canonical chain have block rewards. Due to the consensus mechanism, there may be multiple block producers for a slot and, only one will be selected (all things being equal, determined randomly). So it is expected that we will occasionally not have a payout for some (orphaned) blocks. Rewards are only final once the block has k
(290) confirmations.
Determining block rewards
Block rewards are determined by:
- Coinbase reward
- Transaction fees
- Snark work fees
Block rewards are calculated as:
block reward = coinbase fees + transaction fees - snark work fees
We take a small portion of this total (5%) as the fee for running and maintaining the block producer infrastructure. The remainder of this reward is returned to the delegators, based on the weighting of their contribution to the pool.
While all winnings from the pool are shared, it is possible to determine the individual account that won the chance to produce a block in a slot (see winningAccount
in GraphQL). This becomes important when we consider additional rules for supercharged rewards and foundation delegations.
Example:
Let's assume the pool wins a block where:
- Coinbase: 200 mina
- Tx fees: 1.5 mina
- Snark fees: 1.2 mina
In this case, the block reward will be equal to 200 + 1.5 - 1.2 = 200.3 mina. Pool fees for the block are 5% of the total or 10.015 mina with the remainder (190.285 mina) distributed among delegates according to their effective pool weightings.
We (or anyone) do not know what snark and transaction fees will be at mainnet. It is assumed that they will be low, and the primary reward will be the coinbase transaction. As throughput will be limited, it is possible that transaction fees could be meaningful (though unlikely at the scale of the last testnet). The pool will share all transaction fees with delegators.
Fee Transfers
Snark fees pay for two type of transfers, one for including the coinbase transaction, which is paid out of the coinbase reward Fee_transfer_via_coinbase
and the remaining snark work pays for any included transactions Fee_transfer
Therefore, via fee transfers, we can determine the snark fees due to transactions and which for the coinbase reward. This is useful in calculating the supercharged rewards factor for a block.
Staking Ledger
The staking ledger of the epoch determines those delegating and the balances used. It is the balance in the staking ledger that determines the probability of winning a slot to produce a block and not the current account balance. Staking ledgers are only updated once per epoch, with the staking ledger of the current epoch being determined by the snarked ledger of the last block of the current epoch - 2.
We will publish the staking ledger for each epoch on the site, clearly showing your % contribution to the pool. The staking ledger will detail the balance and also any timing information used in determining the supercharged rewards factor (detailed below). As an example, consider the simple ledger:
{
"data": {
"stakes": [
{
"balance": 20000,
"public_key": "B62qrAoKfgQx8oXMVQauRs9WYzXpCmYqQrLxivgc8qMYVkK9eH9GjjF",
"timing": null
},
{
"balance": 50000,
"public_key": "B62qrKMAUagWp1VJhvb1AA6y1G4P4tr3inYyPqDRq1VyprA1wmVthcV",
"timing": null
},
{
"balance": 30000,
"public_key": "B62qoDaiV18ZGhLfb3j2SuDQEhjyM7c8sDppmvpAyE3cXjutPtHLBfA",
"timing": {
"cliff_amount": 5000,
"cliff_time": 1500,
"initial_minimum_balance": 30000,
"timed_epoch_end": true,
"timed_in_epoch": true,
"untimed_slot": 3000,
"vesting_increment": 100,
"vesting_period": 6,
"timed_weighting": 0.5
}
}
]
}
}
Note, this ledger is generated via the Staking Data GraphQL query which contains additional pre-calculated timed data to that in the staking ledger dump from the daemon.
Here we have three delegates (A, B and C). The total of the pool is simply the sum of all balances - in this case, 100,000 mina. In this instance, the weighting factors before allowing for the supercharged rewards are as follows:
- A: 0.2 (20%)
- B: 0.5 (50%)
- C: 0.3 (30%)
We can get the total currency from the Mina daemon or via the GraphQL API. From this we can determine the probability of the pool of winning any slot based on the total pool stake and total currency. This uses a factor known as f
(currently 0.75) that defines the percentage of blocks that are intentionally empty (25%) and c
(currently 1). Using this we can determine the relative luck of the pool based on the probability of winning a slot being equal to: c * (1 - (1 - f)^(pool stake / total currency)
Supercharged Rewards
When an account that only contains unlocked tokens (see the docs on time-locked tokens here) wins a block, the coinbase rewards are doubled. Note that this does not affect the probability of winning a slot, which is solely based on stake, but on the amount received for a coinbase transaction.
As a result, transaction fees should be shared by all pool delegates but the unlocked account should receive additional weighting proportional to the increased coinbase reward.
Defining the supercharged weighting
This method has since been updated to make use of fee transfers, which were added to GraphQL in the mainnet release. The examples below will be updated in due course or refer to the implementation.
supercharged weighting = 1 + (1 / ((1 + sum fee transfers) / (coinbase - sum fee transfers via coinbase))
The weighting for supercharged rewards should be on a sliding scale from 1x to 2x. Specifically:
- If transaction fees are zero it should be 2x.
- If transaction fees are infinite (or more practically just really high) it should be 1 - as in this instance the coinbase reward is insignificant to the total block rewards to be shared.
- If a an account becomes untimed during the epoch we use the % of the epoch it is untimed.
As such, we can define the supercharged weighting
for a block to be:
supercharged weighting = 1 + (1 / (1 + transaction fees / coinbase))
The below calculations assume a default coinbase of 200. We do not know what this will be at mainnet launch.
- When transaction fees are 0 the supercharged weighting = 2
- When transaction fees are low (e.g. 5 mina) the supercharged weighting = 1.9756
- When transaction fees equal the default coinbase reward the supercharged weighting = 1.5
- When transaction fees are very high (e.g. 10,000 mina) the supercharged weighting = 1.0196
At its simplest, if there are no transaction fees the unlocked account gets double the rewards. If the transaction fees are so large that the coinbase is insignificant the factor is close (but not quite) 1. The standard coinbase amount is always used in determining the supercharged weighting.
At mainnet launch, the coinbase value will be set as a fixed consensus constant. However, it is expected the coinbase to adjust dynamically to match the inflation schedule, which will be implemented via a hard-fork.
Further, if an account becomes untimed during the epoch we use the % of the epoch it is untimed where the supercharged factor is accounted for. As an example, if an account becomes untimed at slot 5000 of the epoch of length 7140 the timed weighting
factor is equal to 7140-5000/7140 = 0.3.
For all accounts with any amounts of locked tokens, it will have a timed weighting
factor of 0. An unlocked account for the entire epoch will have a timed weighting
factor of 1.
supercharged contribution = ((supercharged weighting - 1) * timed weighting factor) + 1
Finally we can determine the effective pool weighting
per block as:
effective pool stake = stake * supercharged contribution
effective pool weighting = effective pool stake / sum(effective pool stakes)
Example 1: Low transaction fees
Using the staking ledger detailed previously we can determine the effective pool weightings when a block is won with transaction fees of 5 mina and a supercharged coinbase for 400 mina. Total snark fees are 0.8 mina. For each account:
- A is untimed for the entire epoch and so has a higher effective pool stake. The
supercharged contribution
is 1.98765 due to the low transaction fees. Therefore their effective pool stake is 39,753 mina. - B is also untimed for the entire epoch and so their effective pool stake is 99,383 mina.
- C has locked tokens for the entire epoch and so has a
supercharged contribution
of 1 and no change to their effective pool stake of 30,000.
The effective stake of the entire pool is 169,136. The total block reward is 404.2 mina and as a result the block rewards are divided as follows (this ignores the pool fee):
- A: 94.98 mina (23.5%)
- B: 237.67 mina (58.8%)
- C: 71.54 mina (17.7%)
While the account containing locked tokens receives proportionally less, this is offset by the higher amounts of the supercharged coinbase.
Example 2: High transaction fees
Using the staking ledger detailed previously we can determine the effective pool weightings when a block is won with transaction fees of 5000 mina and a coinbase for 200 mina. Total snark fees are 15.8 mina. For each account:
- The
supercharged contribution
based on A being untimed for the entire epoch is 1.038. Therefore their effective pool stake is 20,760. - B is also untimed and has an effective pool stake of 51,900.
- C has locked tokens and so their effective pool stake is 30,000.
The effective stake of the entire pool is 102,660. The total block reward is 5184.2 mina and as a result the block rewards are divided as follows (this ignores the pool fee):
- A: 1048.35 mina (20.2%)
- B: 2620.88 mina (50.6%)
- C: 1514.82 mina (29.22%)
As expected, with higher transaction fees the supercharged coinbase factor has less of an impact in the distribution of block rewards.
Foundation Delegations
The MinaExplorer pool currently receives a Mina Foundation delegation. The rules of the Foundation delegation mean that their rewards for a block are determined by:
(delegation balance / pool balance) * standard coinbase * (1-fee)
The Foundation does not get additional transaction fees and does not share any additional rewards for the supercharged coinbase. In almost all cases, this is beneficial to the pool, and we will share all additional Federation delegation rewards with members of the pool. Specifically:
- We calculate the total pool stake
- We determine the total rewards of the blocks won (as defined above)
- We determine the payout of each of the Foundation / O(1) Labs delegations according to the calculation above
- We subtract the Foundation / O(1) Labs delegations from the total rewards
- We apply the supercharged algorithm to share the remainder of the pool via effective pool weight (where the Foundation / O(1) Labs addresses are excluded)
The addresses of the Foundation delegation addresses for MinaExplorer are:
- B62qmsYXFNNE565yv7bEMPsPnpRCsMErf7J2v5jMnuKQ1jgwZS8BzXS
- B62qn71s63yywMUCcFhP4iCata7HpgyrvmGjpKa1D9544vGW6FBZ6a1
- B62qqEV4oP7w2jLQGckvZzdWjfdLKySKHJ3tNU5niRjpPD7beYumWTB
- B62qmQAFPta1Q3c7wXHxXRKnE3uWyBYZCLb8frdHEgavi3BbBVkpeC1
Foundation delegations are reviewed every 3 months in accordance with their delegation policy.