fTokenViews
Inherits:fTokenCore
fToken view methods. Implements view methods for ERC4626 compatibility
Functions
getData
returns config, rewards and exchange prices data in a single view method.
function getData()
public
view
returns (
IFluidLiquidity liquidity_,
IFluidLendingFactory lendingFactory_,
IFluidLendingRewardsRateModel lendingRewardsRateModel_,
IAllowanceTransfer permit2_,
address rebalancer_,
bool rewardsActive_,
uint256 liquidityBalance_,
uint256 liquidityExchangePrice_,
uint256 tokenExchangePrice_
);
Returns
Name | Type | Description |
---|---|---|
liquidity_ | IFluidLiquidity | address of the Liquidity contract. |
lendingFactory_ | IFluidLendingFactory | address of the Lending factory contract. |
lendingRewardsRateModel_ | IFluidLendingRewardsRateModel | address of the rewards rate model contract. changeable by LendingFactory auths. |
permit2_ | IAllowanceTransfer | address of the Permit2 contract used for deposits / mint with signature |
rebalancer_ | address | address of the rebalancer allowed to execute rebalance() |
rewardsActive_ | bool | true if rewards are currently active |
liquidityBalance_ | uint256 | current Liquidity supply balance of address(this) for the underyling asset |
liquidityExchangePrice_ | uint256 | (updated) exchange price for the underlying assset in the liquidity protocol (without rewards) |
tokenExchangePrice_ | uint256 | (updated) exchange price between fToken and the underlying assset (with rewards) |
asset
function asset() public view virtual override returns (address);
totalAssets
function totalAssets() public view virtual override returns (uint256);
convertToShares
function convertToShares(uint256 assets_) public view virtual override returns (uint256);
convertToAssets
function convertToAssets(uint256 shares_) public view virtual override returns (uint256);
previewDeposit
returned amount might be slightly different from actual amount at execution.
function previewDeposit(uint256 assets_) public view virtual override returns (uint256);
previewMint
function previewMint(uint256 shares_) public view virtual override returns (uint256);
previewWithdraw
function previewWithdraw(uint256 assets_) public view virtual override returns (uint256);
previewRedeem
returned amount might be slightly different from actual amount at execution.
function previewRedeem(uint256 shares_) public view virtual override returns (uint256);
maxDeposit
function maxDeposit(address) public view virtual override returns (uint256);
maxMint
function maxMint(address) public view virtual override returns (uint256);
maxWithdraw
function maxWithdraw(address owner_) public view virtual override returns (uint256);
maxRedeem
function maxRedeem(address owner_) public view virtual override returns (uint256);
minDeposit
returns minimum amount required for deposit (rounded up)
function minDeposit() public view returns (uint256);