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.
solidity
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 ​
solidity
function asset() public view virtual override returns (address);
totalAssets ​
solidity
function totalAssets() public view virtual override returns (uint256);
convertToShares ​
solidity
function convertToShares(uint256 assets_) public view virtual override returns (uint256);
convertToAssets ​
solidity
function convertToAssets(uint256 shares_) public view virtual override returns (uint256);
previewDeposit ​
returned amount might be slightly different from actual amount at execution.
solidity
function previewDeposit(uint256 assets_) public view virtual override returns (uint256);
previewMint ​
solidity
function previewMint(uint256 shares_) public view virtual override returns (uint256);
previewWithdraw ​
solidity
function previewWithdraw(uint256 assets_) public view virtual override returns (uint256);
previewRedeem ​
returned amount might be slightly different from actual amount at execution.
solidity
function previewRedeem(uint256 shares_) public view virtual override returns (uint256);
maxDeposit ​
solidity
function maxDeposit(address) public view virtual override returns (uint256);
maxMint ​
solidity
function maxMint(address) public view virtual override returns (uint256);
maxWithdraw ​
solidity
function maxWithdraw(address owner_) public view virtual override returns (uint256);
maxRedeem ​
solidity
function maxRedeem(address owner_) public view virtual override returns (uint256);
minDeposit ​
returns minimum amount required for deposit (rounded up)
solidity
function minDeposit() public view returns (uint256);