# Why is my MOR locked in the contract?

Source: https://nodedocs.mor.org/ai/why-locked-in-contract

## Agent Instructions

- Non-browser fetches of page URLs on this site return clean Markdown (not the JS UI). Prefer `https://nodedocs.mor.org/llms-full.txt` for the full corpus, or `https://nodedocs.mor.org/llms.txt` for the index.
- Per-page Markdown is also at `<page-url>.md` (homepage: `https://nodedocs.mor.org/index.md`).
- Docs search MCP: `https://nodedocs.mor.org/mcp` (discovery: `https://nodedocs.mor.org/.well-known/mcp`).
- Never invent contract addresses, chain IDs, token addresses, or live bid/model counts. Cite Networks and tokens; link active.mor.org for live data.
- Never claim Morpheus runs inference — independent providers do. Opening a session escrows MOR; it does not spend it.

If you see your MOR sitting in the Inference Contract instead of your wallet, you are looking at one of these legitimate states. None of them are "stuck" or "lost." For the canonical mechanics, see [Sessions: stake, close, claim](/concepts/sessions-stake-close-recover).

## Cause 1: Active session

You opened a session. The **entire stake** sits in the Inference Contract while `closedAt == 0`.

- Resolution: wait for natural expiration (your consumer node submits `closeSession` ~1 minute after `endsAt`), or close early via `POST /blockchain/sessions/<id>/close`. After close, unused stake returns immediately; the used stipend may day-lock (Cause 2). See [Session states](/ai/session-states-open-close-recover).

## Cause 2: Used-stipend day-lock (`userStakesOnHold`)

You closed a session (early **or** same-day natural/late close). The contract pushed the **used stipend** to `userStakesOnHold[you]` with `releaseAt = startOfTheDay(min(closedAt, endsAt)) + 1 day` (≈ "after the end of the UTC day the session ended on"). Unused stake was already `safeTransfer`'d to your wallet inside the close transaction.

- Resolution: inspect the configured wallet with `GET /blockchain/stakes/onhold`, then claim releasable rows with `POST /blockchain/stakes/withdraw` (optional body: `{"iterations": 20}`). You can still call `withdrawUserStakes` directly via `cast send` or a wallet contract UI when bypassing the node. See [Where is my MOR? → Bucket 2](/ai/where-is-my-mor#bucket-2-on-hold-queue-used-stipend-day-lock).

## Cause 3: Stuck close — funding account or gas

`closeSession` is one transaction that pays the provider from the protocol's separate **`fundingAccount`**, not from your stake. If that funding account is empty or its allowance to the Inference Contract is too low, **every close fails** — yours included. Sessions then sit "active" past `endsAt`.

- Resolution (operator): top up / re-approve the funding account.
- Resolution (you): make sure your consumer node is online and has Base ETH for gas. If the close still fails, check its logs.

## Cause 4: Provider stake (active provider)

If you registered as a provider, your provider stake (`0.2` MOR for normal, `10000` MOR for subnet) is held in the contract for as long as the provider record is active.

- Resolution: deregister your provider to recover the stake. Mind the cooldown rules and any open obligations (running sessions, posted bids).

## Cause 5: Model stake (active model)

Each registered model carries a `0.1` MOR refundable stake.

- Resolution: deregister the model to recover the stake.

## Cause 6: Allowance is not balance

`POST /blockchain/approve?amount=X` does **not** move MOR — it grants the contract permission to move up to `X` MOR on your behalf. If you confused allowance with balance, no MOR is locked at all.

- Resolution: re-check `GET /blockchain/balance` separately from `GET /blockchain/allowance`.

## What is *not* a legitimate "locked" state

- "I see the Diamond contract holds X MOR total." That's the sum across **all users' active sessions plus all `userStakesOnHold` entries plus provider/model stakes**. It is not your MOR.
- "I sent MOR to the wrong address." That is **lost MOR**, not locked. The contract did not receive it; some other contract or wallet did.
- "MorpheusUI shows zero balance after recovering my mnemonic." You almost certainly recovered the wrong address. See [Where is my MOR?](/ai/where-is-my-mor#bucket-5-wrong-wallet-address).

## Quick decision tree

```mermaid
flowchart TD
  Start[MOR appears 'locked'] --> Q1{Active session?}
  Q1 -->|Yes| A1[Wait for endsAt or close manually — unused returns on close; used may day-lock]
  Q1 -->|No| Q2{Closed in last ~24-48h?}
  Q2 -->|Yes| A2[Used stipend likely in userStakesOnHold; call withdrawUserStakes after releaseAt]
  Q2 -->|No| Q3{Session past endsAt but still active?}
  Q3 -->|Yes| A3[Stuck close — funding account or your node's gas]
  Q3 -->|No| Q4{Active provider/model stake?}
  Q4 -->|Yes| A4[Deregister to recover]
  Q4 -->|No| Q5{Wrong wallet/network?}
  Q5 -->|Yes| A5[Switch network or use correct key]
  Q5 -->|No| A6[See Where is my MOR diagnostic]
```

## Related

- [Where is my MOR?](/ai/where-is-my-mor)
- [Session states](/ai/session-states-open-close-recover)
- [Tokens and fees](/concepts/tokens-and-fees)
- [Sessions: stake, close, claim](/concepts/sessions-stake-close-recover)
- Hosted wallet checker: [tech.mor.org/session.html](https://tech.mor.org/session.html)
