> 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/aave-v3-strategy/impairments-and-losses.md).

# Impairments and Losses

The Aave V3 Strategy has one counterparty, the Aave reserve, so its loss tooling is small. A reversible impairment lowers the value Lenders can exit at while the position is in doubt. A one-way `recognizeLoss()` shuts the strategy down when a loss is final.

## Impairments

The Strategy Delegate or Operational Admin writes the position down with `impair(assets)`, which adds `assets` to `impairedAssets`. `removeImpairment(assets)` reverses it. Both require `assets` to be non-zero, and `removeImpairment()` also requires `assets <= impairedAssets`. Neither touches the Aave position, `lastRecordedTotalAssets` or `assetsUnderManagement()`.

The impairment surfaces through one view:

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

The Strategy Manager subtracts `unrealizedLosses()` from AUM when it converts shares to exit assets, so redemptions price in the write-down while reported AUM stays unchanged. 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).

## Recognising a loss

`recognizeLoss()` takes no arguments. It is an all-or-nothing shutdown of the strategy instance, not a partial write-off. The Strategy Delegate or Operational Admin calls it once a loss is final. It cannot be undone.

The call sets `isLossRecognized = true`, zeroes `lastRecordedTotalAssets` and `impairedAssets`, and emits `LossRecognized()`. From then on:

* `assetsUnderManagement()`, `availableToWithdraw()` and `unrealizedLosses()` return `0`.
* Fees accrued but not yet harvested are forfeited. The strategy never harvests again.
* The aTokens stay in the contract until `recoverPosition()` moves them.
* Funding, withdrawals, impairment changes and the strategy's setters revert with `MAV3S:LOSS_RECOGNIZED`.

The Strategy Manager still holds shares for each Pool against an AUM of `0`. Each Pool's `totalAssets()` drops by its whole position in the strategy. `processRedemption()` reverts with `MSM:PR:ZERO_ASSETS` because the shares convert to no assets, and `fundStrategyManager()` reverts when it calls `fundUnderlyingStrategy()`. The Strategy Manager is finished once a loss is recognised. See [Known Issues and Operational Controls](https://docs.maple.finance/technical-resources/security/known-issues-and-operational-controls.md).

## Recovering the position

`recoverPosition()` sends whatever remains in Aave to the Maple Treasury. The Strategy Delegate or Operational Admin can call it only after a loss is recognised, and it reverts if the strategy holds no aTokens. It transfers the strategy's entire aToken balance, the aTokens themselves rather than the underlying asset, and emits `PositionRecovered(amount)`. It can run again if the balance becomes non-zero later.

Working out which Lenders the loss affected and distributing any recovered value to them happens off-chain.

## Aave liquidity and the 100% utilisation revert

Every fee harvest withdraws from Aave. When the reserve is fully utilised, Aave's `withdraw()` reverts, and with it any strategy function that harvests: `fundUnderlyingStrategy()`, `withdrawFromUnderlyingStrategy()`, `setStrategyDelegateFeeRate()` and `setStrategyProtocolFeeRate()`. Funding reverts only when fees have accrued since the last checkpoint, because the strategy skips the Aave call when there is nothing to withdraw.

This is an availability condition, not a loss. The position keeps earning interest, `availableToWithdraw()` reports the shortfall, and the calls succeed once borrowers repay or new suppliers restore liquidity. `impair()`, `removeImpairment()`, `recognizeLoss()` and `recoverPosition()` do not harvest and remain callable throughout. See [Known Issues and Operational Controls](https://docs.maple.finance/technical-resources/security/known-issues-and-operational-controls.md).


---

# 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/aave-v3-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.
