### How are airdrops calculated?

##### Formula
$$A(i,d) = M\cdot b\cdot (1-\%L)\cdot\frac{d^p}{D'} + M\cdot\%L\cdot E[i=j|\{(j,d)\in D,d \geq 1000\}]$$where
• $$A$$ - airdrop given delegation $$d$$;
• $$i$$ - index of user's delegation;
• $$M$$ - total MAL tokens allocation per epoch; might increase in the future if variable fee is increased from $$0\%$$;
• $$b \in [1,4]$$ - booster value between $$1$$ and $$4$$ to compensate for total delegation below 4M and hence for lower probability of producing blocks (and hence lower rewards to the delegators);
• $$\%L = 10\%$$ - percentage allocation for lottery, fixed to $$10\%$$; $$\%L$$ was increased from $$5\%$$ to $$10\%$$ starting with epoch 299(the total $$M$$ was increased and larger portion of the increase went to the lottery);
• $$d$$ - delegation of the user for whom the airdrop is being calculated;
• $$p = 0.9398$$ - whale-balancing curve; the higher the delegation the less effective it becomes, fitted using Markov Chain Monte Carlo (MCMC) method to balance the power of whale wallet percentile and the rest of the community aiming to balance fairly exchange of value for decentralisation (how many people hold the token) and the reward reduction to single large holder;
• $$D$$ - total delegation, computed by summing all active delegation in the given epoch;
• $$D'$$ total adjusted normalised delegation, computed by summing all $$d^p$$ adjusted delegations;
• $$E[i=j|{(j,d)\in D, d \geq 1000}]$$ - expectation of the user winning lottery; all delegators with stake $$\geq1000$$ are entered into the lottery with equal chance;
• $$D$$ - space of delegation defined by delegation index $$j$$ and delegation amount $$d$$.
It is the best to think of the formula in 2 parts:
• $$M\cdot b\cdot(1-\%L)\cdot \frac{d^p}{D'}$$ - the users airdrop based on delegation after we apply the whale-balancing mechanism;
• $$M\cdot\%L\cdot E[i=j]{(j,d)\in D,d \geq1000}]$$ - randomly selected delegator with delegation above 1000 ADA to receive in a random lottery $$10\%$$ of the total airdrop.

### Why does the formula seem so complicated?

When we consider what it does this formula is not complicated. However, when put together it has many components because it takes many things into consideration when allocating airdrops.

The formula aims to
• prevent single users (whales) from holding too large a share of the tokens to ensure a wider distribution in the community, hence the whale-balancing mechanism;
• compensate early adopters for low likelihood of producing blocks and even when produced for significant share of revenue being consumed by the minimum fixed fee;
• introduce a surprise mechanism via lottery that takes insignificant amount from each delegator, but has high potential of surprise for the lucky delegator; what's more this element of surprise is very desired property for a system that wants to be whale-resistant.

### Calculation procedure (algorithm)

The below algorithm is applied for each epoch.
1. Total active stake is used to compute $$M$$ - the total MAL tokens to be distributed among delegators.
2. Total tokens to be shared are multiplied by a factor $$b$$ of up to 4 to compensate for low saturation (below 4M ADA) and lower likelihood of producing blocks.
3. $$10\%$$ of the airdrop is left aside for the lottery and $$90\%$$ taken to be split among delegators.
4. Whale-balancing parameter $$p$$ is applied to each reward amount to balance distribution against fairness. The factor $$p$$ was found using MCMC simulation.
5. Total rewards are then normalised into shares and MAL rewards are calcualted.
6. One wallet, with delegation above or equal to 1K ADA, is chosen randomly to receive $$5\%$$ of the total epoch airdrop.

### Compensation for low block production

The lower the delegation the lower the likelihood of MAL pool being elected to be slot leader. The pool only earns rewards for successfully producing blocks. Hence, when delegation is small blocks are not produced every epoch or when only one block is produced the minimum (enforced by Cardano protocol) fixed fee eats almost half of the generated profits.

To compensate for this a boost $$b$$ is introduced for total active delegation $$D$$ under 4M ADA to reward the early delegators.

### Whale-balancing mechanism

Each project faces the possibility of single actor ending up holding a significant portion of the tokens.

Such an allocation reduces price smoothness (one person selling might significantly impact the current token market price, which happens in a jump, hence not smooth). Price smoothness is very desirable metric for healthy price evolution and avoiding stress mechanics.

What's more, a lot of value in every blockchain project is derived directly from the community, and in turn this is proportionally represented by how decentralised the token itself is (how many entities hold similar amounts).

Token decentralisation directly impacts a tokens perceived value, which can be observed through many examples of NFT projects where scarcity is balanced against enough people having the asset to create a network effect.

In case of highly centralised currency, a whale total holding might increase in absolute value if distributing a portion of the stake among the community. We used this observation and the decentralisation to be the major goal of tokenomics to create whale-balancing mechanism.

Whale-balancing removes some of the rewards from whales and redistributes them to the smallest delegators. We believe, based on performed simulations (using Markov chain Monte Carlo - MCMC) method, in such amount that net value of whale holding is intact, but at the same time, the net value of all holders is increased (due to now higher decentralisation of the token).

Whale-balancing is achieved strictly via $$p=0.9398$$ scaling factor.

### Lottery

Lottery introduces an element of randomness to token allocation. Each epoch $$\%L = 10\%$$ is allocated to a single delegator with delegation $$\geq1000$$ ADA.

By the law of large numbers, the majority of delegators will have small stakes, therefore, it is yet another whale-balancing mechanism. However, the sheer unpredictibility of it makes it impossible to control.

Such unpredictability has 2 main advantages - natural escape from local equilibrium toward global one and introduction of surprise that everyone likes.

### Active vs live stake

Airdrops are computed using active stake. Live stake is the current delegation to the pool. Active stake is delegation that is currently contribution to the block production. Initially, when the pool is changed the user's stake remains active with the current pool for 2 more epochs, and only in 3rd epoch starts contributing to the block producton in the new pool. Therefore, it is only logical that in all calculations we take the active stake.