Skip to content

Constants ​

Git Source

State Variables ​

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 = 1e12;

SECONDS_PER_YEAR ​

Ignoring leap years

solidity
uint256 internal constant SECONDS_PER_YEAR = 365 days;

MAX_REWARDS_RATE ​

max allowed reward rate is 50%

solidity
uint256 internal constant MAX_REWARDS_RATE = 50 * 1e12;

LIQUIDITY ​

address of the Liquidity contract.

solidity
IFluidLiquidity internal immutable LIQUIDITY;

LENDING_FACTORY ​

address of the Lending factory contract.

solidity
IFluidLendingFactory internal immutable LENDING_FACTORY;

ASSET ​

address of the underlying asset contract.

solidity
IERC20 internal immutable ASSET;

DECIMALS ​

number of decimals for the fToken, same as ASSET

solidity
uint8 internal immutable DECIMALS;

LIQUIDITY_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_SLOT;

LIQUIDITY_TOTAL_AMOUNTS_SLOT ​

solidity
bytes32 internal immutable LIQUIDITY_TOTAL_AMOUNTS_SLOT;

LIQUIDITY_USER_SUPPLY_SLOT ​

solidity
bytes32 internal immutable LIQUIDITY_USER_SUPPLY_SLOT;

Functions ​

constructor ​

solidity
constructor(IFluidLiquidity liquidity_, IFluidLendingFactory lendingFactory_, IERC20 asset_);

Parameters

NameTypeDescription
liquidity_IFluidLiquidityliquidity contract address
lendingFactory_IFluidLendingFactorylending factory contract address
asset_IERC20underlying 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);