/
RiskFundStorage.sol
57 lines (47 loc) · 2.26 KB
/
RiskFundStorage.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity 0.8.13;
import { Ownable2StepUpgradeable } from "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol";
import { ReentrancyGuardUpgradeable } from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
contract ReserveHelpersStorage is Ownable2StepUpgradeable {
/// @notice Deprecated slot for assetReserves mapping
bytes32 private __deprecatedSlot1;
/// @notice Available asset's fund per pool in RiskFund
/// Comptroller(pool) -> Asset -> amount
mapping(address => mapping(address => uint256)) public poolAssetsFunds;
/// @notice Deprecated slot for poolRegistry address
bytes32 private __deprecatedSlot2;
/// @notice Deprecated slot for status variable
bytes32 private __deprecatedSlot3;
/// @dev This empty reserved space is put in place to allow future versions to add new
/// variables without shifting down storage in the inheritance chain.
uint256[46] private __gap;
}
contract MaxLoopsLimitHelpersStorage {
/// @notice Limit for the loops to avoid the DOS
/// @notice This state is deprecated, using it to prevent storage collision
uint256 public maxLoopsLimit;
/// @dev This empty reserved space is put in place to allow future versions to add new
/// variables without shifting down storage in the inheritance chain.
/// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
uint256[49] private __gap;
}
/// @title RiskFundV1Storage
/// @author Venus
/// @dev Risk fund V1 storage
contract RiskFundV1Storage is ReserveHelpersStorage, MaxLoopsLimitHelpersStorage {
/// @notice Address of base asset
address public convertibleBaseAsset;
/// @notice Address of shortfall contract
address public shortfall;
/// @notice This state is deprecated, using it to prevent storage collision
address private pancakeSwapRouter;
/// @notice This state is deprecated, using it to prevent storage collision
uint256 private minAmountToConvert;
}
/// @title RiskFundV2Storage
/// @author Venus
/// @dev Risk fund V2 storage
contract RiskFundV2Storage is RiskFundV1Storage, ReentrancyGuardUpgradeable {
/// @notice Risk fund converter address
address public riskFundConverter;
}