Files
assetxContracts/contracts/ytLending/LendingConfiguration.sol

42 lines
1.8 KiB
Solidity
Raw Normal View History

2025-12-18 13:07:35 +08:00
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @title LendingConfiguration
* @notice
*/
contract LendingConfiguration {
struct AssetConfig {
address asset; // 资产地址
uint8 decimals; // 小数位数
2025-12-22 13:25:06 +08:00
uint64 borrowCollateralFactor; // 借款抵押率
uint64 liquidateCollateralFactor; // 清算抵押率
uint64 liquidationFactor; // 清算折扣
2025-12-18 13:07:35 +08:00
uint128 supplyCap; // 供应上限
}
struct Configuration {
2025-12-22 13:25:06 +08:00
address baseToken; // 基础资产
2025-12-24 16:41:26 +08:00
address lendingPriceSource; // 借贷价格源
2025-12-18 13:07:35 +08:00
// 利率模型参数
uint64 supplyKink; // 供应拐点利用率
uint64 supplyPerYearInterestRateSlopeLow; // 供应拐点前斜率
uint64 supplyPerYearInterestRateSlopeHigh; // 供应拐点后斜率
uint64 supplyPerYearInterestRateBase; // 供应基础利率
uint64 borrowKink; // 借款拐点利用率
uint64 borrowPerYearInterestRateSlopeLow; // 借款拐点前斜率
uint64 borrowPerYearInterestRateSlopeHigh; // 借款拐点后斜率
uint64 borrowPerYearInterestRateBase; // 借款基础利率
// 其他核心参数
uint64 storeFrontPriceFactor; // 清算价格折扣
uint104 baseBorrowMin; // 最小借款额
uint104 targetReserves; // 目标储备金
AssetConfig[] assetConfigs; // 抵押资产配置数组
}
}