Constants ​
Constants ​
PERMIT2 ​
permit2 contract, deployed to same address on EVM networks, see https://github.com/Uniswap/permit2
solidity
IAllowanceTransfer internal constant PERMIT2 = IAllowanceTransfer(0x000000000022D473030F116dDEE9F6B43aC78BA3)EXCHANGE_PRICES_PRECISION ​
precision for exchange prices
solidity
uint256 internal constant EXCHANGE_PRICES_PRECISION = 1e12SECONDS_PER_YEAR ​
Ignoring leap years
solidity
uint256 internal constant SECONDS_PER_YEAR = 365 daysMAX_REWARDS_RATE ​
max allowed reward rate is 50%
solidity
uint256 internal constant MAX_REWARDS_RATE = 50 * 1e12LIQUIDITY ​
address of the Liquidity contract.
solidity
IFluidLiquidity internal immutable LIQUIDITYLENDING_FACTORY ​
address of the Lending factory contract.
solidity
IFluidLendingFactory internal immutable LENDING_FACTORYASSET ​
address of the underlying asset contract.
solidity
IERC20 internal immutable ASSETDECIMALS ​
number of decimals for the fToken, same as ASSET
solidity
uint8 internal immutable DECIMALSLIQUIDITY_EXCHANGE_PRICES_SLOT ​
slot ids in Liquidity contract for underlying token. Helps in low gas fetch from liquidity contract by skipping delegate call with readFromStorage
solidity
bytes32 internal immutable LIQUIDITY_EXCHANGE_PRICES_SLOTLIQUIDITY_TOTAL_AMOUNTS_SLOT ​
solidity
bytes32 internal immutable LIQUIDITY_TOTAL_AMOUNTS_SLOTLIQUIDITY_USER_SUPPLY_SLOT ​
solidity
bytes32 internal immutable LIQUIDITY_USER_SUPPLY_SLOTFunctions ​
constructor ​
solidity
constructor(IFluidLiquidity liquidity_, IFluidLendingFactory lendingFactory_, IERC20 asset_) ;Parameters
| Name | Type | Description |
|---|---|---|
liquidity_ | IFluidLiquidity | liquidity contract address |
lendingFactory_ | IFluidLendingFactory | lending factory contract address |
asset_ | IERC20 | underlying token address |
_getLiquiditySlotLinksAsset ​
gets asset address for liquidity slot links, extracted to separate method so it can be overridden if needed
solidity
function _getLiquiditySlotLinksAsset() internal view virtual returns (address);
