> For the complete documentation index, see [llms.txt](https://doc.monetrix.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.monetrix.xyz/guide/getting-started-2/stake.md).

# Stake & Unstake

**Staking is where you actually earn yield.** When you stake mxBTC, you receive **smxBTC**, a receipt token whose exchange rate to mxBTC grows as the protocol settles its earnings.

Unstaking is a two-step process with a cooldown period, or an instant exit for a small fee.

{% hint style="info" %}
**Current unstake cooldown: 1 day.** This value is read live from `BtcConfig.unstakeCooldown()` and can be adjusted by governance. The active value is always shown in the UI and is authoritative.
{% endhint %}

## How the exchange rate works

```
1 smxBTC = X mxBTC   (X grows over time)
```

The app shows the current rate under the **Earn** tab, e.g. `1 smxBTC = 1.0004 mxBTC`. When you stake, you receive `amount / X` smxBTC. When you unstake, you receive your smxBTC × (current rate) in mxBTC, which is more than you put in because the rate has grown.

* **Decimals**: mxBTC has 8 decimals (the same as UBTC), smxBTC has 14.
* **Yield is settled daily.** Each update reflects yield accrued over the previous UTC day (00:00 to 00:00 UTC). No claim transaction, no compound button.
* **Yield is denominated in BTC.** The rate grows in mxBTC terms; the dollar value of your position also moves with the BTC price.

## Stake

<figure><img src="https://3971154758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbU68iXKFy5nFlHmmSOQE%2Fuploads%2Fgit-blob-e7c7eea47b2a0b9637b96ad9198f26e99b0c650b%2Fmxbtc-stake.png?alt=media" alt="Stake mxBTC page: Earn tab with Stake selected, current rate 1 smxBTC = 1 mxBTC, mxBTC amount input and smxBTC receive estimate, Connect Wallet button" width="720"><figcaption></figcaption></figure>

### 1. Enter the amount

Select the **Earn** tab at the top, then **Stake**. Enter the mxBTC amount you want to stake. The app displays:

* Your mxBTC balance.
* The estimated smxBTC you'll receive at the current rate.

### 2. Approve mxBTC

Click **Approve & Stake mxBTC**. The first wallet prompt approves the smxBTC contract to pull your mxBTC.

{% hint style="info" %}
Approve is per-amount. If your existing approval already covers the amount, the button reads **Stake mxBTC** and the approval prompt is skipped. If you have a smaller approval left over, the app first resets it to zero, so you may see one extra prompt.
{% endhint %}

### 3. Stake

The next prompt is the stake itself. The transaction calls `smxBTC.deposit(amount, yourAddress)`. Your mxBTC is transferred in, and smxBTC is minted to your wallet at the current rate.

### That's it; yield starts now

Your smxBTC balance doesn't change, but its **redemption value in mxBTC** grows with each daily settlement. You can watch the `1 smxBTC = X mxBTC` line tick up.

## Unstake

Unstaking has two modes, chosen from the dropdown next to the button:

* **Standard**: no fee. Request now, claim after the cooldown.
* **Instant**: 0.3% fee. Receive mxBTC immediately, subject to availability (see below).

### 1. Request an unstake

Under the **Earn** tab, switch to **Unstake**. Enter the smxBTC amount you want to unstake. The app displays:

* Your smxBTC balance.
* The estimated mxBTC you'll receive at the current rate.

Click **Unstake smxBTC** and confirm. The transaction calls `smxBTC.cooldownShares(amount)`. No approval is needed for this step.

After this, the cooldown starts. A new card appears under **Pending Unstake** with status `Cooldown` and a countdown timer.

{% hint style="warning" %}
Your smxBTC is burned at request time and the corresponding mxBTC is held in escrow. The exchange rate at the time of the request is the rate used at claim; you don't get additional yield during the cooldown.
{% endhint %}

### 2. Wait for the cooldown

The **Waiting** row counts down. The cooldown length (currently **1 day**) is set in the protocol config and shown live in the UI. Governance can adjust this parameter; future changes will be announced before they take effect.

### 3. Claim your mxBTC

When the cooldown ends, the request's badge flips from `Cooldown` to `Ready` (green) and a **Claim mxBTC** button appears.

Click **Claim mxBTC** and confirm. The transaction calls `smxBTC.claimUnstake(requestId)` and sends the escrowed mxBTC to your wallet.

### Instant unstake

Select **Instant** from the dropdown. The app quotes the mxBTC you will receive and the 0.3% fee. If instant exit is available, click **Approve & Unstake smxBTC**: the first prompt approves smxBTC to the instant-unstake contract, the second calls `instantExit(amount)`. You receive mxBTC in the same transaction; no cooldown.

Instant exit is served from a protocol-funded buffer, so it is not always available. Instead of a quote, the app shows the reason when:

* Instant exit is paused.
* Your amount is below the instant minimum (currently **0.002 smxBTC**).
* The buffer is empty, or doesn't hold enough mxBTC for your amount. Try a smaller amount or use Standard.
* The instant queue is full.

## After unstaking

You now hold plain mxBTC. You can:

* **Re-stake it** to earn yield again.
* **Redeem it** to UBTC; see [Redeem mxBTC](https://doc.monetrix.xyz/guide/getting-started-2/redeem.md). Note that redeem has its own, separate cooldown.

## Troubleshooting

* **"Insufficient balance."** on Stake: check your mxBTC balance; you may need to [mint](https://doc.monetrix.xyz/guide/getting-started-2/mint.md) first.
* **"Insufficient balance."** on Unstake: you're trying to unstake more smxBTC than you hold.
* **Rate looks static**: the smxBTC rate updates once a day when the protocol settles earnings, not every block.
* **"Strategy operations are temporarily paused." banner**: the protocol's hedging operations are temporarily paused. Mint, stake, and cooldown requests still work; the rate won't move until operations resume.
