> For the complete documentation index, see [llms.txt](https://docs.maple.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maple.finance/technical-resources/strategies/sky-strategy/impairments-and-losses.md). Agents can also search and read this documentation through its [MCP server](https://docs.maple.finance/~gitbook/mcp).

# Impairments and Losses

The Sky Strategy has one counterparty, Sky's savings system through one PSM. It therefore offers a reversible write-down for a position that looks doubtful, and a single, final switch that writes the whole strategy off.

## Impairments

The Strategy Delegate or Operational Admin calls `impair(assets)` to record that `assets` of the position may not be recoverable. The call adds `assets` to `impairedAssets` and emits `Impaired(assets)`. It changes nothing else. The sUSDS balance, `assetsUnderManagement()`, `availableToWithdraw()` and `lastRecordedTotalAssets` are unaffected.

Impairments reach the Pools through one view:

```
unrealizedLosses() = min(impairedAssets, assetsUnderManagement())
```

The [Strategy Manager](https://docs.maple.finance/technical-resources/strategies/strategy-manager.md) reads this value, caps it at its own AUM and apportions it to each Pool by shares. The `min()` means unrealized losses can never exceed what the strategy reports as AUM, and they fall to `0` automatically once AUM does. While `impairedAssets` is non-zero, Liquidity Bots and the Liquidity Router cannot act on the Strategy Manager. The Strategy Delegate remains an Operator. See [Liquidity Bot Actions](https://docs.maple.finance/technical-resources/admin-functions/liquidity-bot-actions.md#the-impairment-block).

`removeImpairment(assets)` reverses a write-down. The same callers may use it, `assets` must be non-zero and must not exceed `impairedAssets`. It emits `ImpairmentRemoved(assets)`.

Both functions revert once a loss is recognized.

## Recognizing a loss

`recognizeLoss()` takes no arguments. It is a one-way shutdown of the whole strategy, not a partial write-off. The Strategy Delegate or Operational Admin calls it once the position is considered lost. It requires that a loss has not already been recognized.

On success the strategy:

* Sets `isLossRecognized` to `true`. Nothing ever sets it back.
* Resets `lastRecordedTotalAssets` and `impairedAssets` to `0`.
* Emits `LossRecognized()`.

It does not harvest fees first. Every other function that moves `lastRecordedTotalAssets` collects accrued fees before resetting the baseline, but `recognizeLoss()` zeroes the baseline directly. Any yield that accrued since the last harvest is never paid to the Strategy Delegate or the Treasury. Since `currentTotalAssets` reads as `0` from this point, the strategy also has no way to compute that figure later.

### Effects

From the moment `isLossRecognized` is `true`:

* `assetsUnderManagement()`, `availableToWithdraw()` and `unrealizedLosses()` return `0`, regardless of the sUSDS balance the strategy still holds.
* The Strategy Manager reports zero AUM, so every Pool's shares in it are worth zero and the loss is reflected in the Pool share prices the next time they are read.
* Funding, withdrawals, impairment changes and the strategy's setters revert with `MSS:LOSS_RECOGNIZED`.

## Recovering the position

`recoverPosition()` is the only function that requires `isLossRecognized` to be `true`. The Strategy Delegate or Operational Admin calls it to move whatever the strategy still holds to the Maple Treasury:

1. Read the strategy's sUSDS balance. Revert with `MSS:RP:ZERO_BALANCE` if it is zero.
2. Transfer the entire balance of sUSDS shares to `mapleTreasury()`.
3. Emit `PositionRecovered(shares)`.

The shares move as sUSDS. The strategy does not redeem them for USDS or convert them through the PSM, so recovery works even while the PSM is halted. In practice the call succeeds once, because the second call finds a zero balance.

Nothing on the contract can return recovered value to the Pools. Working out which Lenders bore the loss, converting the recovered sUSDS and distributing it to them is an off-chain process.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.maple.finance/technical-resources/strategies/sky-strategy/impairments-and-losses.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
