Wallet portfolio, history, compliance & PnL audit
workflow_treasury_audit[$0.04] Trigger When: auditing wallet history, multi-asset portfolio USD value, or agent readiness. Workflow Outcome: aggregates ETH/WETH/USDC portfolio, nonce history, top counterparties, taint, and PnL. Do not use for DeFi borrow liquidation checks (use workflow_defi_shield) or protocol audits (use workflow_protocol_audit). lookback_blocks is clamped to 100-2000 (default 1000) to keep eth_getLogs fast across public RPCs. Live RPC/log scan, read-only non-custodial; 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_treasury_audit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | EVM chain (base, ethereum, arbitrum, optimism) | base |
| wallet | No | 0x wallet address to audit | |
| lookback_blocks | No | Recent block window for USDC Transfer logs (100-2000) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | ||
| wallet | No | ||
| balances | No | ||
| degraded | No | ||
| endpoint | No | ||
| ops_ready | No | ||
| portfolio | No | ||
| rpc_source | No | ||
| block_window | No | ||
| nonce_health | No | ||
| non_custodial | No | ||
| schema_version | No | ||
| wallet_history | No | ||
| usdc_pnl_ledger | No | ||
| recommended_actions | No |