# Early Exit Mechanism

Users may exit before the lock period ends, but doing so triggers a penalty. The penalty depends on how much time remains before the original unlock date.

**Penalty formula:**

`Penalty Amount = unlockAmount × max(N%, min(M%, lock_duration_left ÷ 4 years))`

**Where:**

| **Parameter**        | **Meaning**                         |
| -------------------- | ----------------------------------- |
| unlockAmount         | Principal to withdraw               |
| lock\_duration\_left | Remaining lock duration             |
| M%                   | Maximum penalty rate (example: 60%) |
| N%                   | Minimum penalty rate (example: 2%)  |

#### **Penalty Examples**

**Assuming:**

Stake = 10,000 ASTER ,Maximum penalty = 60% ,Minimum penalty = 2%

| **Scenario**       | **Remaining Lock** | **Penalty Rate** | **Penalty Amount** |
| ------------------ | ------------------ | ---------------- | ------------------ |
| Exit immediately   | 4 years            | 60%              | 6,000 $ASTER       |
| Exit after 1 year  | 3 years            | 60%              | 6,000 $ASTER       |
| Exit after 2 years | 2 years            | 50%              | 5,000 $ASTER       |
| Exit after 3 years | 1 year             | 25%              | 2,500 $ASTER       |
| Exit near maturity | 0.05 years         | 2%               | 200 $ASTER         |
| Exit at maturity   | 0                  | 0%               | 0 $ASTER           |

**Net withdrawal amount:**

`Net Amount = Principal − Penalty Amount + Accumulated Rewards`

Penalized tokens are redistributed according to protocol rules:

* A portion enters the next epoch reward pool
* A portion goes to the ecosystem fund
