FluidVaultTicksBranchesResolver
Fluid Vault protocol ticks & branches resolver
FluidVaultTicksBranchesResolver__AddressZero
error FluidVaultTicksBranchesResolver__AddressZero()
thrown if an input param address is zero
constructor
constructor(contract IFluidVaultResolver vaultResolver_) public
constructor sets the immutable vault resolver address
getTicksDebt
function getTicksDebt(address vault_, int256 fromTick_, uint256 totalTicks_) public view returns (struct Structs.TickDebt[] ticksDebt_, int256 toTick_)
getMultipleVaultsTicksDebt
function getMultipleVaultsTicksDebt(address[] vaults_, int256[] fromTicks_, uint256[] totalTicks_) public view returns (struct Structs.VaultsTickDebt[] vaultsTickDebt_)
getAllVaultsTicksDebt
function getAllVaultsTicksDebt(uint256 totalTicks_) public view returns (struct Structs.VaultsTickDebt[] vaultsTickDebt_)
getBranchesDebt
function getBranchesDebt(address vault_, uint256 fromBranchId_, uint256 toBranchId_) public view returns (struct Structs.BranchDebt[] branchesDebt_)
getMultipleVaultsBranchesDebt
function getMultipleVaultsBranchesDebt(address[] vaults_, uint256[] fromBranchIds_, uint256[] toBranchIds_) external view returns (struct Structs.BranchesDebt[] branchesDebt_)
getAllVaultsBranchesDebt
function getAllVaultsBranchesDebt() external view returns (struct Structs.BranchesDebt[] branchesDebt_)
_populateTicksDebt
function _populateTicksDebt(address vault_, int256 toTick_, int256 mapId_, uint256 tickHasDebt_, uint256 count_, uint256 vaultSupplyExchangePrice_, uint256 vaultBorrowExchangePrice_) internal view returns (struct Structs.TickDebt[] ticksDebt_)
_tickHelper
function _tickHelper(uint256 tickRaw_) internal pure returns (int256 tick)
_countTicksWithDebt
function _countTicksWithDebt(address vault_, int256 toTick_, int256 mapId_, uint256 tickHasDebt_) internal view returns (uint256 count_)
_getBranchDebt
function _getBranchDebt(address vault_, uint256 vaultVariables_, uint256 branchId_) internal view returns (struct Structs.BranchDebt)
_getActiveBranchDebt
function _getActiveBranchDebt(uint256 vaultVariables_, uint256 currentBranchData_, uint256 branchId_, uint256 status_) internal pure returns (struct Structs.BranchDebt branchDebt_)
_getClosedOrMergedBranchDebt
function _getClosedOrMergedBranchDebt(uint256 currentBranchData_, uint256 branchId_, uint256 status_) internal pure returns (struct Structs.BranchDebt branchDebt_)
_getLiquidatedBranchDebt
function _getLiquidatedBranchDebt(address vault_, uint256 currentBranchData_, uint256 branchId_, uint256 status_, int256 minimaTick_) internal view returns (struct Structs.BranchDebt branchDebt_)
_getCollateralRaw
function _getCollateralRaw(uint256 currentBranchData_, uint256 debtLiquidity_, int256 minimaTick_) internal pure returns (uint256 collateralRaw_, uint256 ratio_)