2025-12-18 13:07:35 +08:00
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
pragma solidity ^0.8.0;
|
|
|
|
|
|
|
|
|
|
import "./LendingConfiguration.sol";
|
|
|
|
|
|
|
|
|
|
abstract contract LendingStorage is LendingConfiguration {
|
|
|
|
|
|
|
|
|
|
address public baseToken;
|
2025-12-24 16:41:26 +08:00
|
|
|
address public lendingPriceSource;
|
2025-12-18 13:07:35 +08:00
|
|
|
|
|
|
|
|
uint64 public supplyKink;
|
|
|
|
|
uint64 public supplyPerSecondInterestRateSlopeLow;
|
|
|
|
|
uint64 public supplyPerSecondInterestRateSlopeHigh;
|
|
|
|
|
uint64 public supplyPerSecondInterestRateBase;
|
|
|
|
|
|
|
|
|
|
uint64 public borrowKink;
|
|
|
|
|
uint64 public borrowPerSecondInterestRateSlopeLow;
|
|
|
|
|
uint64 public borrowPerSecondInterestRateSlopeHigh;
|
|
|
|
|
uint64 public borrowPerSecondInterestRateBase;
|
|
|
|
|
|
|
|
|
|
uint64 public storeFrontPriceFactor;
|
|
|
|
|
uint104 public baseBorrowMin;
|
|
|
|
|
uint104 public targetReserves;
|
|
|
|
|
|
|
|
|
|
mapping(address => AssetConfig) public assetConfigs;
|
|
|
|
|
address[] public assetList;
|
|
|
|
|
|
|
|
|
|
struct UserBasic {
|
2025-12-26 13:38:10 +08:00
|
|
|
int104 principal;
|
2025-12-18 13:07:35 +08:00
|
|
|
}
|
|
|
|
|
mapping(address => UserBasic) public userBasic;
|
|
|
|
|
|
|
|
|
|
mapping(address => mapping(address => uint256)) public userCollateral;
|
|
|
|
|
|
|
|
|
|
uint104 public totalSupplyBase;
|
|
|
|
|
uint104 public totalBorrowBase;
|
|
|
|
|
|
|
|
|
|
uint256 public supplyIndex;
|
|
|
|
|
uint256 public borrowIndex;
|
|
|
|
|
uint256 public lastAccrualTime;
|
|
|
|
|
|
|
|
|
|
mapping(address => uint256) public collateralReserves;
|
2025-12-26 13:38:10 +08:00
|
|
|
}
|