Skip to content

FluidEthenaRateConfigHandler ​

Git Source

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

solidity
modifier validAddress(address value_);

onlyRebalancer ​

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

solidity
modifier onlyRebalancer();

constructor ​

solidity
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.

solidity
function rebalance() external onlyRebalancer;

calculateMagnifier ​

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

solidity
function calculateMagnifier() public view returns (uint256 magnifier_);

Returns

NameTypeDescription
magnifier_uint256the calculated magnifier value.

currentMagnifier ​

returns the currently configured borrow magnifier at the VAULT.

solidity
function currentMagnifier() public view returns (uint256);

getSUSDeYieldRate ​

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

solidity
function getSUSDeYieldRate() public view returns (uint256 rate_);

Returns

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