MorphoStorage

Git Source

Inherits: Initializable, Ownable2StepUpgradeable

Author: Morpho Labs

The storage shared by Morpho's contracts.

State Variables

_pool

The address of Aave's pool.

IPool internal _pool;

_addressesProvider

The address of the pool addresses provider.

IPoolAddressesProvider internal _addressesProvider;

_eModeCategoryId

The e-mode category of the deployed Morpho.

uint8 internal _eModeCategoryId;

_marketsCreated

The list of created markets.

address[] internal _marketsCreated;

_market

The markets data.

mapping(address => Types.Market) internal _market;

_marketBalances

The markets balances data.

mapping(address => Types.MarketBalances) internal _marketBalances;

_userCollaterals

The collateral markets entered by users.

mapping(address => EnumerableSet.AddressSet) internal _userCollaterals;

_userBorrows

The borrow markets entered by users.

mapping(address => EnumerableSet.AddressSet) internal _userBorrows;

_isManagedBy

Users allowances to manage other users' accounts. delegator => manager => isManagedBy

mapping(address => mapping(address => bool)) internal _isManagedBy;

_userNonce

The nonce of users. Used to prevent replay attacks with EIP-712 signatures.

mapping(address => uint256) internal _userNonce;

_defaultIterations

The default number of iterations to use in the matching process.

Types.Iterations internal _defaultIterations;

_positionsManager

The address of the positions manager on which calls are delegated to.

address internal _positionsManager;

_rewardsManager

The address of the rewards manager to track pool rewards for users.

IRewardsManager internal _rewardsManager;

_treasuryVault

The address of the treasury vault, recipient of the reserve fee.

address internal _treasuryVault;

_isClaimRewardsPaused

Whether claiming rewards is paused or not.

bool internal _isClaimRewardsPaused;

Functions

constructor

Contract constructor.

The implementation contract disables initialization upon deployment to avoid being hijacked.

constructor();