FluidEthenaRateConfigHandler ​
Inherits:Variables, Error, Events
Sets borrow rate for sUSDe/debtToken vaults based on sUSDe yield rate, by adjusting the borrowRateMagnifier
Functions ​
validAddress ​
Validates that an address is not the zero address
modifier validAddress(address value_);
onlyRebalancer ​
Validates that an address is a rebalancer (taken from reserve contract)
modifier onlyRebalancer();
constructor ​
constructor(
IFluidReserveContract reserveContract_,
IFluidLiquidity liquidity_,
IFluidVaultT1 vault_,
IStakedUSDe stakedUSDe_,
address borrowToken_,
uint256 ratePercentMargin_,
uint256 maxRewardsDelay_,
uint256 utilizationPenaltyStart_,
uint256 utilization100PenaltyPercent_
)
validAddress(address(reserveContract_))
validAddress(address(liquidity_))
validAddress(address(vault_))
validAddress(address(stakedUSDe_))
validAddress(borrowToken_);
rebalance ​
Rebalances the borrow rate magnifier for VAULT
based on borrow rate at Liquidity in relation to sUSDe yield rate (getSUSDEYieldRate()
). Emits LogUpdateBorrowRateMagnifier
in case of update. Reverts if no update is needed. Can only be called by an authorized rebalancer.
function rebalance() external onlyRebalancer;
calculateMagnifier ​
Calculates the new borrow rate magnifier based on sUSDe yield rate and utilization
function calculateMagnifier() public view returns (uint256 magnifier_);
Returns
Name | Type | Description |
---|---|---|
magnifier_ | uint256 | the calculated magnifier value. |
currentMagnifier ​
returns the currently configured borrow magnifier at the VAULT
.
function currentMagnifier() public view returns (uint256);
getSUSDeYieldRate ​
calculates updated vesting yield rate based on vestingAmount
and totalAssets
of StakedUSDe contract
function getSUSDeYieldRate() public view returns (uint256 rate_);
Returns
Name | Type | Description |
---|---|---|
rate_ | uint256 | sUSDe yearly yield rate scaled by 1e18 (1e18 = 1%, 1e20 = 100%) |