BorrowerLens
Functions
predictBorrowerAddress
function predictBorrowerAddress(
IUniswapV3Pool pool,
address owner,
bytes12 salt,
address caller,
Factory factory
) external view returns (address borrower);
getSummary
function getSummary(Borrower account)
external
view
returns (
uint256 balanceEth,
uint256 balance0,
uint256 balance1,
uint256 liabilities0,
uint256 liabilities1,
uint256 slot0,
uint128[] memory liquidity
);
getHealth
Mirrors the logic in BalanceSheet.isHealthy
, but returns numbers instead of a boolean
function getHealth(Borrower account) external view returns (uint256 healthA, uint256 healthB);
isInUse
function isInUse(Borrower borrower) external view returns (bool, IUniswapV3Pool);
getUniswapPositions
function getUniswapPositions(Borrower account)
public
view
returns (int24[] memory positions, uint128[] memory liquidity, uint256[] memory fees);
_health
function _health(
uint160 sqrtPriceX96,
uint256 assets0,
uint256 assets1,
uint256 liabilities0,
uint256 liabilities1
) private pure returns (uint256 health);