# Suidaiya Minting

### The Minting **Difficulty**

Similar to the Bitcoin's mining difficulty, the **minting difficulty** determines the minimum threshold in order to mint the next Suidaiya. The minting difficulty is a global network parameter, which decides the requirement in order to mint the next Suidaiya. This difficulty will start with a very low number, such that most users are able to find them within a few thousands of computation cycles.&#x20;

However, the difficulty will be adjusted according to the past supply, by multiplying with a **Difficulty Adjusting Coefficient (DAC)** which is a factor between **1/2** and **2.** This mechanism exists to ensure that there’s a constant supply and to maintain an expected mint interval of **\~10 minutes**, as explained in the [#the-minting-cycles](#the-minting-cycles "mention").

### The Minting Cycle

There are different cycles at which there will be different difficulties. The main reason to have this self-adjusting mechanism is to make sure there will be an expected flow of Suidaiya's minted, by making it either interesting or less interesting to mint the next Suidaiya. When no Suidaiya's are minted, the **Difficulty Adjusting Coefficient (DAC)** will drop, making it cheaper to mint a Suidaiya. When there is too much demand, the **DAC** will increase again, to at most a factor 2.&#x20;

{% hint style="info" %}
Note that the current cycle determines the **Difficulty Adjusting Coefficient (DAC)** of the next cycle!
{% endhint %}

1. &#x20;**❄️ Freeze**\
   After the previous Suidaiya is minted, there will be first a **4 minutes** freezing period, where **no** next Suidaiya can be **minted**. It is ensured that no other Suidaiya can be minted until this freezing period is over.<br>
2. **📈 Difficulty Increase**\
   After the freezing period, there is the phase of increasing difficulty and will last for a similar **4 minutes**. However, during this period, the DAC will be increasing continuously. The difficulty is increases as it is multiplied with this coefficient, making it slightly harder to mint the next Suidaiya.<br>
3. **🟰 Stable Difficulty**\
   Similar to the increasing difficulty period, but the difficulty will remain stable at **1**. \
   This period lasts for **4 minutes**.<br>
4. **📉 Difficulty Decrease** \
   During this period, the difficulty will be decreased continuously. This period lasts for **8 minutes**. The DAC coefficient will be a factor between **1/2** and **1**. The difficulty will be multiplied with this coefficient, making it slightly easier to mint the next Suidaiya.<br>
5. **🟰 Stable Difficulty**\
   Similar to the precious stable period, but the difficulty will remain stable at most at **1/2**. This period will last until the next Suidaiya is minted.

### Minting Fee

$$
MintFee = TokenRewardAmount \* UnitCost \* PriceAdjustFactor
$$

The M**int Fee** exists of three components and can be fully referenced in [#minting-fee](#minting-fee "mention"):

* The **TokenRewardAmount** needs to be paid in order to mint a new Suidaiya collectible. This parameter increases as the number of Suidaiya's minted increases. This amount will however be fully rewarded in [usddaiya-token](https://suidaiya.gitbook.io/suidaiya/protocol/usddaiya-token "mention") back to the minter of the Suidaiya. <br>
* The **UnitCost** is a base cost that will be charged depending on the NFT ID range, and can be found in the table below:

| From (NFT ID) | To (NFT ID) | Unit Cost |
| ------------- | ----------- | --------- |
| 0             | 999         | 0 SUI     |
| 1000          | 4999        | 0.3 SUI   |
| 5000          | 9999        | 0.4 SUI   |
| 10000         | 14999       | 0.5 SUI   |
| 15000         | 17499       | 0.6 SUI   |
| 17500         | 19999       | 0.7 SUI   |
| 20000         | 21000       | 0.8 SUI   |

* The **PriceAdjustFactor (PAF)** will initially be set at **1.0**, but will be adjusted to reflect the current market demand for Suidaiya collectibles. The AdjustFunction is a function that is dependent on the phase of the [#the-minting-cycle](#the-minting-cycle "mention") we are currently in. More information about how the adjustfunc(x) can be found [priceadjustfactor](https://suidaiya.gitbook.io/suidaiya/reference/priceadjustfactor "mention").&#x20;

$$
PriceAdjustFactor = LastPriceAdjustFactor \* AdjustFunc(x)
$$

{% hint style="info" %}
The PAF follows a curve similar to the [#the-minting-difficulty](#the-minting-difficulty "mention"), but the main difference is that it is immediately effective for the current cycle. Note that if the  PAF is low, the multiplying effect makes sure that the price is adjusted rapidly. e.g. If PAF = 1, but due to low demand it drops to 1/3, then next round if this stays the case, we multiply again by 1/3 we, such that after 2 rounds this already becomes 1/9 of a factor. So the adjusting mechanism works exponentially.&#x20;
{% endhint %}
