> For the complete documentation index, see [llms.txt](https://docs-v4.venus.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-v4.venus.io/technical-reference/reference-isolated-pools/comptroller/comptroller-storage.md).

# ComptrollerStorage

This page describes the state exposed by the [`ComptrollerStorage` v4.4.0 source](https://github.com/VenusProtocol/isolated-pools/blob/v4.4.0/contracts/ComptrollerStorage.sol). It is **not** a slot-by-slot storage layout.

For an upgrade review, resolve the current Comptroller beacon implementation from the [engine version map](/technical-reference/reference-isolated-pools.md#mainnet-implementation-map) and use the compiler-generated storage layout for that exact build. The complete layout includes inherited upgradeable contracts, internal mappings and arrays, and reserved gaps that public getters do not reveal.

## Structures

```solidity
struct LiquidationOrder {
    VToken vTokenCollateral;
    VToken vTokenBorrowed;
    uint256 repayAmount;
}

struct AccountLiquiditySnapshot {
    uint256 totalCollateral;
    uint256 weightedCollateral;
    uint256 borrows;
    uint256 effects;
    uint256 liquidity;
    uint256 shortfall;
}

struct RewardSpeeds {
    address rewardToken;
    uint256 supplySpeed;
    uint256 borrowSpeed;
}

struct Market {
    bool isListed;
    uint256 collateralFactorMantissa;
    uint256 liquidationThresholdMantissa;
    mapping(address => bool) accountMembership;
}
```

## Public state getters

| Getter                                      | Meaning                                                                                              |
| ------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `oracle()`                                  | ResilientOracle used for pool liquidity and liquidation checks                                       |
| `closeFactorMantissa()`                     | maximum regular-liquidation repayment fraction, scaled by `1e18`                                     |
| `liquidationIncentiveMantissa()`            | gross collateral seizure multiplier, scaled by `1e18`                                                |
| `accountAssets(account, index)`             | markets entered by an account                                                                        |
| `markets(vToken)`                           | listing, collateral factor, and liquidation threshold; the nested membership mapping is not returned |
| `allMarkets(index)`                         | historical market array; use `isMarketListed` to distinguish current listing                         |
| `borrowCaps(vToken)` / `supplyCaps(vToken)` | current market caps                                                                                  |
| `minLiquidatableCollateral()`               | threshold separating regular and batch liquidation paths                                             |
| `isForcedLiquidationEnabled(vToken)`        | whether liquidity checks can be skipped for forced liquidation of that borrowed market               |
| `prime()`                                   | Prime contract used by borrow policy, or zero where not configured                                   |
| `approvedDelegates(user, delegate)`         | permission for delegated borrow and redeem flows                                                     |

The implementation also exposes immutable `poolRegistry()` and inherited `maxLoopsLimit()` configuration outside `ComptrollerStorage` itself.

## Internal state that a getter-only list misses

* `_actionPaused[market][action]`, exposed through `actionPaused`;
* `rewardsDistributors` and `rewardsDistributorExists`, exposed through reward getters;
* constants that constrain close and collateral factors;
* the v4.4.0 `uint256[47] __gap`;
* inherited `Ownable2StepUpgradeable`, `AccessControlledV8`, max-loop, reentrancy, and other parent storage.

Never infer storage slots from the order of the table above. Beacon upgrades affect every Comptroller proxy using that beacon, while each proxy retains its own storage.


---

# 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-v4.venus.io/technical-reference/reference-isolated-pools/comptroller/comptroller-storage.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.
