Skip to content

Variables ​

Git Source

Inherits: ERC20, ERC20Permit, Error, Constants, IFToken

State Variables ​

TOKEN_NAME_PREFIX ​

prefix for token name. fToken will append the underlying asset name

solidity
string private constant TOKEN_NAME_PREFIX = "Fluid ";

TOKEN_SYMBOL_PREFIX ​

prefix for token symbol. fToken will append the underlying asset symbol

solidity
string private constant TOKEN_SYMBOL_PREFIX = "f";

_rewardsRateModel ​

address of the LendingRewardsRateModel.

solidity
IFluidLendingRewardsRateModel internal _rewardsRateModel;

__placeholder_gap ​

solidity
uint96 private __placeholder_gap;

_liquidityExchangePrice ​

exchange price for the underlying assset in the liquidity protocol (without rewards)

solidity
uint64 internal _liquidityExchangePrice;

_tokenExchangePrice ​

exchange price between fToken and the underlying assset (with rewards)

solidity
uint64 internal _tokenExchangePrice;

_lastUpdateTimestamp ​

timestamp when exchange prices were updated the last time

solidity
uint40 internal _lastUpdateTimestamp;

_status ​

status for reentrancy guard

solidity
uint8 internal _status;

_rewardsActive ​

flag to signal if rewards are active without having to read slot 6

solidity
bool internal _rewardsActive;

_rebalancer ​

rebalancer address allowed to call rebalance() and source for funding rewards (ReserveContract).

solidity
address internal _rebalancer;

Functions ​

constructor ​

solidity
constructor(IFluidLiquidity liquidity_, IFluidLendingFactory lendingFactory_, IERC20 asset_)
    validAddress(address(liquidity_))
    validAddress(address(lendingFactory_))
    validAddress(address(asset_))
    Constants(liquidity_, lendingFactory_, asset_)
    ERC20(
        string(abi.encodePacked(TOKEN_NAME_PREFIX, IERC20Metadata(address(asset_)).name())),
        string(abi.encodePacked(TOKEN_SYMBOL_PREFIX, IERC20Metadata(address(asset_)).symbol()))
    )
    ERC20Permit(string(abi.encodePacked(TOKEN_NAME_PREFIX, IERC20Metadata(address(asset_)).name())));

Parameters

NameTypeDescription
liquidity_IFluidLiquidityliquidity contract address
lendingFactory_IFluidLendingFactorylending factory contract address
asset_IERC20underlying token address

_checkValidAddress ​

checks that address is not the zero address, reverts if so. Calling the method in the modifier reduces bytecode size as modifiers are inlined into bytecode

solidity
function _checkValidAddress(address value_) internal pure;

validAddress ​

validates that an address is not the zero address

solidity
modifier validAddress(address value_);