Fetching Leverage Parameters

Contract Addresses:

View the latest FLI contract addresses here.

How to fetch the latest FLI parameters:

All parameters are stored in the FlexibleLeverageStrategyAdapter contract and are stored in 5 structs: ContractSettings, ExecutionSettings, MethodologySettings, IncentiveSettings and ExchangeSettings.

struct ContractSettings {
    ISetToken setToken;                             // Instance of leverage token
    ICompoundLeverageModule leverageModule;         // Instance of Compound leverage module
    IComptroller comptroller;                       // Instance of Compound Comptroller
    IChainlinkAggregatorV3 collateralPriceOracle;   // Chainlink oracle feed that returns prices in 8 decimals for collateral asset
    IChainlinkAggregatorV3 borrowPriceOracle;       // Chainlink oracle feed that returns prices in 8 decimals for borrow asset
    ICErc20 targetCollateralCToken;                 // Instance of target collateral cToken asset
    ICErc20 targetBorrowCToken;                     // Instance of target borrow cToken asset
    address collateralAsset;                        // Address of underlying collateral
    address borrowAsset;                            // Address of underlying borrow asset
    uint256 collateralDecimalAdjustment;            // Decimal adjustment for chainlink oracle of the collateral asset. Equal to 28-collateralDecimals (10^18 * 10^18 / 10^decimals / 10^8)
    uint256 borrowDecimalAdjustment;                // Decimal adjustment for chainlink oracle of the borrowing asset. Equal to 28-borrowDecimals (10^18 * 10^18 / 10^decimals / 10^8)
}

struct MethodologySettings { 
    uint256 targetLeverageRatio;                     // Long term target ratio in precise units (10e18)
    uint256 minLeverageRatio;                        // In precise units (10e18). If current leverage is below, rebalance target is this ratio
    uint256 maxLeverageRatio;                        // In precise units (10e18). If current leverage is above, rebalance target is this ratio
    uint256 recenteringSpeed;                        // % at which to rebalance back to target leverage in precise units (10e18)
    uint256 rebalanceInterval;                       // Period of time required since last rebalance timestamp in seconds
}

struct ExecutionSettings { 
    uint256 unutilizedLeveragePercentage;            // Percent of max borrow left unutilized in precise units (1% = 10e16)
    uint256 slippageTolerance;                       // % in precise units to price min token receive amount from trade quantities
    uint256 twapCooldownPeriod;                      // Cooldown period required since last trade timestamp in seconds
}

struct ExchangeSettings {
    uint256 twapMaxTradeSize;                        // Max trade size in collateral base units
    uint256 exchangeLastTradeTimestamp;              // Timestamp of last trade made with this exchange
    uint256 incentivizedTwapMaxTradeSize;            // Max trade size for incentivized rebalances in collateral base units
    bytes leverExchangeData;                         // Arbitrary exchange data passed into rebalance function for levering up
    bytes deleverExchangeData;                       // Arbitrary exchange data passed into rebalance function for delevering
}

struct IncentiveSettings {
    uint256 etherReward;                             // ETH reward for incentivized rebalances
    uint256 incentivizedLeverageRatio;               // Leverage ratio for incentivized rebalances
    uint256 incentivizedSlippageTolerance;           // Slippage tolerance percentage for incentivized rebalances
    uint256 incentivizedTwapCooldownPeriod;          // TWAP cooldown in seconds for incentivized rebalances
}

To retrieve this data simply call the associated getter function. This can be done simply in the read tab on Etherscan. E.g. BTC FLI Adapter. The fetched data in each returned struct will correspond to the order above.

/**
 * Explicit getter functions for parameter structs are defined as workaround to issues fetching structs that have dynamic types.
 */
function getStrategy() external view returns (ContractSettings memory) { return strategy; }
function getMethodology() external view returns (MethodologySettings memory) { return methodology; }
function getExecution() external view returns (ExecutionSettings memory) { return execution; }
function getIncentive() external view returns (IncentiveSettings memory) { return incentive; }
function getExchangeSettings(string memory _exchangeName) external view returns (ExchangeSettings memory)

Members of the Leverage Indices Pod also maintain a FLI Parameter Tracking Notion page where current parameters are stored. Please note that the Notion page is updated manually, so the most timely parameter information can be retrieved following the instructions above.

Last updated