TokenInterface

balanceOf

function balanceOf(address) external view returns (uint256)

FluidVaultResolver

Fluid Vault protocol resolver Implements various view-only methods to give easy access to Vault protocol data.

constructor

constructor(address factory_, address liquidity_, address liquidityResolver_) public

getVaultAddress

function getVaultAddress(uint256 vaultId_) public view returns (address vault_)

getVaultId

function getVaultId(address vault_) public view returns (uint256 id_)

getTokenConfig

function getTokenConfig(uint256 nftId_) public view returns (uint256)

getVaultVariablesRaw

function getVaultVariablesRaw(address vault_) public view returns (uint256)

getVaultVariables2Raw

function getVaultVariables2Raw(address vault_) public view returns (uint256)

getAbsorbedLiquidityRaw

function getAbsorbedLiquidityRaw(address vault_) public view returns (uint256)

getPositionDataRaw

function getPositionDataRaw(address vault_, uint256 positionId_) public view returns (uint256)

getTickHasDebtRaw

function getTickHasDebtRaw(address vault_, int256 key_) public view returns (uint256)

getTickDataRaw

function getTickDataRaw(address vault_, int256 tick_) public view returns (uint256)

getTickIdDataRaw

function getTickIdDataRaw(address vault_, int256 tick_, uint256 id_) public view returns (uint256)

getBranchDataRaw

function getBranchDataRaw(address vault_, uint256 branch_) public view returns (uint256)

getRateRaw

function getRateRaw(address vault_) public view returns (uint256)

getRebalancer

function getRebalancer(address vault_) public view returns (address)

getTotalVaults

function getTotalVaults() public view returns (uint256)

getAllVaultsAddresses

function getAllVaultsAddresses() public view returns (address[] vaults_)

_getVaultConstants

function _getVaultConstants(address vault_) internal view returns (struct IFluidVaultT1.ConstantViews constants_)

_getVaultConfig

function _getVaultConfig(address vault_) internal view returns (struct Structs.Configs configs_)

_getExchangePricesAndRates

function _getExchangePricesAndRates(address vault_, struct Structs.Configs configs_, struct Structs.OverallTokenData liquiditySupplytokenData_, struct Structs.OverallTokenData liquidityBorrowtokenData_) internal view returns (struct Structs.ExchangePricesAndRates exchangePricesAndRates_)

_getTotalSupplyAndBorrow

function _getTotalSupplyAndBorrow(address vault_, struct Structs.ExchangePricesAndRates exchangePricesAndRates_, struct IFluidVaultT1.ConstantViews constantsVariables_) internal view returns (struct Structs.TotalSupplyAndBorrow totalSupplyAndBorrow_)

_getLimitsAndAvailability

function _getLimitsAndAvailability(struct Structs.TotalSupplyAndBorrow totalSupplyAndBorrow_, struct Structs.ExchangePricesAndRates exchangePricesAndRates_, struct IFluidVaultT1.ConstantViews constantsVariables_, struct Structs.Configs configs_, struct Structs.UserBorrowData liquidityBorrowtokenData_) internal view returns (struct Structs.LimitsAndAvailability limitsAndAvailability_)

getVaultState

function getVaultState(address vault_) public view returns (struct Structs.VaultState vaultState_)

getVaultEntireData

function getVaultEntireData(address vault_) public view returns (struct Structs.VaultEntireData vaultData_)

getVaultsEntireData

function getVaultsEntireData(address[] vaults_) external view returns (struct Structs.VaultEntireData[] vaultsData_)

getVaultsEntireData

function getVaultsEntireData() external view returns (struct Structs.VaultEntireData[] vaultsData_)

positionByNftId

function positionByNftId(uint256 nftId_) public view returns (struct Structs.UserPosition userPosition_, struct Structs.VaultEntireData vaultData_)

positionsNftIdOfUser

function positionsNftIdOfUser(address user_) public view returns (uint256[] nftIds_)

vaultByNftId

function vaultByNftId(uint256 nftId_) public view returns (address vault_)

positionsByUser

function positionsByUser(address user_) external view returns (struct Structs.UserPosition[] userPositions_, struct Structs.VaultEntireData[] vaultsData_)

totalPositions

function totalPositions() external view returns (uint256)

getVaultLiquidation

function getVaultLiquidation(address vault_, uint256 tokenInAmt_) public returns (struct Structs.LiquidationStruct liquidationData_)

fetches available liquidations

Parameters

NameTypeDescription
vault_addressaddress of vault for which to fetch
tokenInAmt_uint256token in aka debt to payback, leave 0 to get max

Return Values

NameTypeDescription
liquidationData_struct Structs.LiquidationStructliquidation related data. Check out structs.sol

getMultipleVaultsLiquidation

function getMultipleVaultsLiquidation(address[] vaults_, uint256[] tokensInAmt_) external returns (struct Structs.LiquidationStruct[] liquidationsData_)

getAllVaultsLiquidation

function getAllVaultsLiquidation() external returns (struct Structs.LiquidationStruct[] liquidationsData_)

getVaultAbsorb

function getVaultAbsorb(address vault_) public returns (struct Structs.AbsorbStruct absorbData_)

getVaultsAbsorb

function getVaultsAbsorb(address[] vaults_) public returns (struct Structs.AbsorbStruct[] absorbData_)

getVaultsAbsorb

function getVaultsAbsorb() public returns (struct Structs.AbsorbStruct[] absorbData_)