Measures the total value locked (TVL) in the PhoLend protocol on CrossFi chain:
- TVL: Available liquidity in the lending pool per asset (from Protocol Data Provider)
- Borrows: Sum of stable and variable debt token balances
- Net TVL: Total deposits minus total borrows
Data is fetched from:
- Protocol Data Provider for TVL
- Direct debt token balances for borrows
Supported assets:
- XFI (Native CrossFi token, 18 decimals)
- WETH (from Base, 18 decimals)
- USDC (from Base, 6 decimals)
- USDT (from Arbitrum, 6 decimals)
- WBTC (from Arbitrum, 8 decimals)
The protocol uses AAVE v2 style lending where:
- TVL is tracked through Protocol Data Provider
- Borrows are tracked through stableDebtTokens and variableDebtTokens
- Asset prices are provided by DIA Oracle
- Liquidation thresholds and loan-to-value ratios are set per asset