> For the complete documentation index, see [llms.txt](https://docs.wisetoken.net/wise-token/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wisetoken.net/wise-token/wise-ethereum/wise-contract-functionality/circulation-epoch/staking/closing-stakes.md).

# Closing Stakes

A user may close a stake at any time. Depending on the stake's status (where the stake is in its lifecycle), different things will happen:

* Closing a **Pending** stake - the stake shares are destroyed.  The entire stake principal is minted back to the user, without interest or penalty.
* Closing an **Active** (premature) stake - the stake shares are destroyed.  The stake principal is penalized (see below) and minted back to the user along with all interest accumulated thus far.
* Closing a **Mature** stake - the stake shares are destroyed.  The entire stake principal and all interest accumulated is minted back to the user.  There are never any penalties for closing a Mature stake, no matter how late.

The penalty deducted from the principal (staked WISE) when closing an Active stake is as follows:

```
If the stake is one day long:
  penaltyAmount = stakedWise × 0.1
        
If the stake is two or more days long:
  penaltyAmount = stakedWise × (.1 + .8 × ((daysLeft - 1) / (stakedDays - 1)))
```

Thus, if you close an Active stake that was 100 days long on its final day before maturity, you get a 10% penalty applied to the principal.  If you close the same stake on the first day of it being Active, you get a 90% penalty.  The penalty scales linearly between those two extremes.

Any such WISE penalized from a stake's return is earmarked for distribution to all active stake shares that day.  These penalty distributions are only realized by those stakes' shares when each of those stakes end.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.wisetoken.net/wise-token/wise-ethereum/wise-contract-functionality/circulation-epoch/staking/closing-stakes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
