FluidEthenaRateConfigHandler

Sets borrow rate for sUSDe/debtToken vaults based on sUSDe yield rate, by adjusting the borrowRateMagnifier

validAddress

modifier validAddress(address value_)

Validates that an address is not the zero address

onlyRebalancer

modifier onlyRebalancer()

Validates that an address is a rebalancer (taken from reserve contract)

constructor

constructor(contract IFluidReserveContract reserveContract_, contract IFluidLiquidity liquidity_, contract IFluidVaultT1 vault_, contract IStakedUSDe stakedUSDe_, address borrowToken_, uint256 ratePercentMargin_, uint256 maxRewardsDelay_, uint256 utilizationPenaltyStart_, uint256 utilization100PenaltyPercent_) public

rebalance

function rebalance() external

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.

calculateMagnifier

function calculateMagnifier() public view returns (uint256 magnifier_)

Calculates the new borrow rate magnifier based on sUSDe yield rate and utilization

Return Values

NameTypeDescription
magnifier_uint256the calculated magnifier value.

currentMagnifier

function currentMagnifier() public view returns (uint256)

returns the currently configured borrow magnifier at the VAULT.

getSUSDeYieldRate

function getSUSDeYieldRate() public view returns (uint256 rate_)

calculates updated vesting yield rate based on vestingAmount and totalAssets of StakedUSDe contract

Return Values

NameTypeDescription
rate_uint256sUSDe yearly yield rate scaled by 1e18 (1e18 = 1%, 1e20 = 100%)