Lending health factor and liquidation risk for a wallet: Aave v3 and Compound v3 on Base, Ethereum, Arbitrum
defi_healthUse when an agent must check if a wallet's loans are near liquidation. Input: address, optional chain (base, ethereum, arbitrum, all). Output: JSON per chain Aave v3 collateral, debt, borrowing power, LTV, health factor and liquidation distance %; Compound v3 supplied/borrowed base asset and isLiquidatable; summary with the lowest health factor. Read from contracts. Example: ?address=0x6246eee0355Dd7A93C888fE59e1151388A0cC5a1 Price: $0.003 USDC (Base or Solana) via x402.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"address": "<address>"
},
"name": "defi_health"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | Chain to check (default all) | |
| address | Yes | EVM wallet (EIP-55 checksum if mixed case). Bad address → 400 before payment (not charged) |