# Fraktion Supplier

{% hint style="info" %}
This function allows to fix automatically every week the new supply of fraktions for a given content and a given profitability
{% endhint %}

### Free Fraktion

Free Fraktion are minted only once when a user is consuming the content for the first time. There is no supply before the minting.

### Initial Supply

The number of Fraktions for the initial drop is the same for every content : `Date 0`

| Profitability | Initial Drop | Initial Price |
| ------------- | ------------ | ------------- |
| Common        | 20           | FRK 90        |
| Premium       | 7            | FRK 500       |
| Gold          | 3            | FRK 1200      |
| Diamond       | 1            | FRK 3000      |

### New Supply

Every week (`Date 0` + `7 days`), we check for every profitability if all the fraktions have been sold.

**Case 1 : If all the fraktions haven’t been sold**

No more fraktion are supplied

The price of the fraktions that haven’t been minted yet is recalculated depending on the algorithm decribed [here](https://www.notion.so/Update-du-27-09-22-85d3073e47554ab5807babf20b947f77).

**Case 2 : All the fraktions have been sold**

New fraktions are supplied.

The number of new fraktions $$n\_w$$ supplied depends on :

* the number of fraktions minted during the former week
* the velocity at which the fraktions were minted

{% hint style="success" %}
$$n\_w$$ is in the range of 80% and 200% of the number of fraktions minted the last week, $$\rho\_{w-1}$$.
{% endhint %}

Let $$t\_k$$ the timestamp when the fraktion $$k$$ is minted

Let $$t\_0$$ the timestamp of the last weekly anniversary (when the new fraktions were supposed to be supplied the last week). $$t\_0=t-168$$.

$$t\_0$$ and $$t\_k$$ are set in hour

$$
n\_w=m\_{w-1}\times\bigg(80%+(200%-80%)\times \mu\_{w-1} \bigg)
$$

where&#x20;

$$
\mu\_{w-1}=1-\frac{\sum\_{k=1}^{m\_{w-1}}(t\_k-t\_0)}{m\_{w-1}\times24\times7}=1-\left(\frac{\sum\_{k=1}^{m\_{w-1}}t\_k}{m\_{w-1}}-t\_0\right)\times\frac{1}{168}
$$

Example :

{% embed url="<https://docs.google.com/spreadsheets/d/10VtFagjbk4pvKma1Y2FIpRvbPV9zMQPTZMUBop7zzIs/edit?usp=sharing>" %}
