# Penalty

Each Deimos has a required **serving period of 360 days** and is expected to be full-time online and ready to take storage and computing tasks when needed. When a Deimos is not functioning normally, penalties will occur.

**Penalties will occur in the following situations:**

1. &#x20;**Offline**: the Deimos goes offline and adversely affects the network.
2. &#x20;**Collateral early withdraws**: the Deimos owner withdraws the collateral or the device is taken down by the network (in which case the collateral will be returned to the miners) before the serving period ends.

## **Node Offline**

**`online_score`** (a number between 0 and 1) is the network's score for Deimos stability, proving that the node has committed its time and resources. It will be used as a reduction factor for mining rewards, directly affecting the future earnings of a Deimos.

If a Deimos is **`unstable`**, the online\_score decays by a proportional constant. When the node comes online again, the online\_score starts to recover linearly slowly.

online\_score updates every hour, and the default online\_score for each new device is one.

If *`device t`* is deemed to be unstable in an hour, the online\_score will start the linear attenuation with an attenuation strength of 1/72

**`online_score(t) = Max(0, online_score(t-1)-1/72)`**&#x20;

If *device t* is determined to be stable in an hour, online\_score will start a linear recovery, and the recovery strength will be 1/(7\*24)&#x20;

**`online_score(t) = Min(1, online_score(t-1)+1/168)`**

{% hint style="info" %}
Example

A device has been offline for 3 days, its online\_score has decreased from one to zero.

The online\_score will only increase from zero to one when the device is online for 7 consecutive days.&#x20;

In other words, it's easier to lose your online\_score than to regain it.
{% endhint %}

## **C**ollateral Early Withdraw

<mark style="background-color:blue;">`Penalty amount = 50% * max (remaining serving period/360 days, 1/2) * full collateral amount`</mark>
