Multi-protocol lending health & rescue calldata builder
workflow_defi_shield[$0.04] Trigger When: guarding a DeFi wallet against liquidation or stale approvals. Workflow Outcome: stress-tests Aave/Compound health factor (-10%/-20%) and builds unsigned repay & revoke txs. Do not use for pool yield discovery (use defi_yield_pools) or wallet PnL logs (use workflow_treasury_audit). The -10% and -20% collateral drops are fixed stress simulations, while target_health_factor sets the safety target used to size unsigned_aave_repay_tx. Live Aave/Compound RPCs, read-only non-custodial (no broadcast); requires x402 USDC or Stripe MPP (10 free lifetime calls via /api/free/*) at 30-60 req/min.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "workflow_defi_shield"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | EVM chain (base, ethereum, arbitrum, optimism) | base |
| wallet | No | 0x wallet address to inspect | |
| target_health_factor | No | Target Aave health factor (1.1-5.0) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | ||
| cached | No | ||
| wallet | No | ||
| aave_v3 | No | ||
| degraded | No | ||
| endpoint | No | ||
| rpc_source | No | ||
| non_custodial | No | ||
| schema_version | No | ||
| usdc_wallet_balance | No | ||
| compound_v3_usdc_debt | No | ||
| unsigned_aave_repay_tx | No | ||
| unsigned_multicall3_revoke_tx | No | ||
| stale_unlimited_usdc_approvals | No |