Allocation per Epoch

Let $F$ be the total amount of funds the proposal and $\Delta A$ be the amount of funds allocated to the group of brokers every epoch, both in USD. The total amount of funds in the proposal is composed of contributions from one or more payers, which includes the owner of the proposal, and can be written as

$$ F = \sum_{i=1}^N k_i n_i $$

where $N$ is the number of tokens in the proposal, $k_i$ is the conversion rate for token $i$ in USD, and $n_i$ is the number of $i$ tokens in the proposal.

Since the allocation per epoch remains constant over time, at the end of each epoch, when the funds are allocated to the group of brokers, the conversion rate at that time is used to calculate the number of tokens that is allocated such that the number of tokens is weighted according to its proportion of the total funds in the proposal. In other words, if token ABC makes up 40% of the total funds in the proposal, then token ABC will make up 40% of the allocation. Thus, from the allocation per epoch is

$$ \Delta A = \sum_{i=1}^N \Delta A k_i \frac{n_i}{F} $$

To find the number of $i$ tokens that is distributed in the allocation, we simply equate one of the summed terms to $a_i$, the number of $i$ tokens allocated, converted into USD.

$$ k_i a_i = \Delta A k_i \frac{n_i}{F} \\ \therefore a_i = \Delta A \frac{n_i}{F} $$

Cancellation

When a proposal is cancelled, some funds are first distributed to the brokers, and any remaining funds are returned to their respective payers. The minimum horizon, $h_{\text{min}}$, is the number of epochs that the proposal must appropriate funding for at all times. This acts as security for the brokers working on the proposal.

When a proposal is cancelled, the funds that cover the minimum horizon, $B$, are distributed to the brokers, and any remaining funds is returned to its respective payer, where each payer receives $P_i$.

$$ B = \Delta A h_{\text{min}} $$

$$ P_i = n_i \left( 1 - \Delta A \frac{h_{\text{min}}}{F} \right) $$

When a broker leaves a proposal before the minimum number of epochs has passed, their stake is added into the pool of funds. So the question is, when a proposal is cancelled, to whom is this share of funds returned to? Though that broker has now technically contributed funds to the proposal, the stake is meant to incentivize committing to a period of continuous work, so the broker shouldn’t be rewarded with possible voting privileges when they left the proposal prematurely. Thus, the released staked funds will be treated as if they were the group of brokers were payers. This means that when a proposal is cancelled, any funds that were from brokers who left without their stake will be allocated to the brokers on top of the minimum horizon.

$$ B = \Delta A h_{\text{min}} + \sum_{j=1} s_j $$

The equation only changes slightly, where $s_j$ is the stake of broker $j$ if and only if that broker leaves the proposal before the minimum number of epochs.

An Illustrative Example

Let’s say there are three payers that provide three native tokens. At the time when the funds are added, the first payer provides $250 \text{ABC} \times 2.00 \text{USD} / \text{ABC} = 500 \text{USD}$, the second provides $1600 \text{IJK} \times 0.25 \text{USD} / \text{IJK} = 400 \text{USD}$, and the third $80 \text{XYZ} \times 1.25 \text{USD} / \text{XYZ} = 100 \text{USD}$. Thus the total funds in the proposal is

$$ F = \sum_{i=1}^3 k_i n_i = 1000 \text{USD} $$

Let’s say the allocation per epoch is $200 \text{USD}$. The number of tokens to be allocated are