FluidLendingFactory
Inherits:LendingFactoryVariables, LendingFactoryAdmin
creates Fluid lending protocol fTokens, which are interacting with Fluid Liquidity.
fTokens are ERC20 & ERC4626 compatible tokens that allow to deposit to Fluid Liquidity to earn interest.
Tokens are created at a deterministic address (see computeToken()
), only executable by allow-listed auths.
Note the deployed token starts out with no config at Liquidity contract. This must be done by Liquidity auths in a separate step, otherwise no deposits will be possible. This contract is not upgradeable. It supports adding new fToken creation codes for future new fToken types.
Functions
constructor
initialize liquidity contract address & owner
constructor(IFluidLiquidity liquidity_, address owner_)
validAddress(address(liquidity_))
validAddress(owner)
LendingFactoryVariables(liquidity_, owner_);
computeToken
computes deterministic token address for asset_
for a lending protocol
function computeToken(address asset_, string calldata fTokenType_) public view returns (address token_);
Parameters
Name | Type | Description |
---|---|---|
asset_ | address | address of the asset |
fTokenType_ | string | type of fToken: - if it's the native token, it should use NativeUnderlying - otherwise it should use fToken - could be more types available, check fTokenTypes() |
Returns
Name | Type | Description |
---|---|---|
token_ | address | detemrinistic address of the computed token |