Multi-Contract DeFi Protocol Auditor
ingravity_generateMultiContractProtocolDossierAudits 1-20 interdependent Solidity contracts (contracts array of {name, code}, required; optional protocolName and tvlTargetUsd=1000000) for cross-contract read-only reentrancy, centralization, and 6 ERC-4626/oracle invariants. Strictly read-only: pass optional contractAddress, chainId (8453 Base default, 42161, 10, 137, 1), and ownerTreasury to verify live RPC TVL and build unsigned EIP-5792/EOA Safe-Harbor rescue steps (90%-95% to ownerTreasury). Set tier to FULL ($12.00 USDC, default) for call-graph and findings or ESSENTIAL ($3.50 USDC) for score and counts; unpaid returns isError: true, empty contracts throws -32602, and CRITICAL/HIGH patches stay sealed until 0.15% SLA or 5%-10% rescue settlement. Use for multi-file protocols; use ingravity_auditSolidityContract for single files or ingravity_simulateDeepExploitAndWhitehatBounty without source.
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": {
"contracts": "<contracts>"
},
"name": "ingravity_generateMultiContractProtocolDossier"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tier | No | Billing & output depth: FULL ($12.00 USDC) returns callGraphEdges, per-contract findings, invariants, and Safe-Harbor rescue calldata (subject to Anti-Bypass sealing on CRITICAL/HIGH until proportional settlement); ESSENTIAL ($3.50 USDC) returns readiness score, grade, status, and severity counts only. | FULL |
| chainId | No | EVM Chain ID used when optional contractAddress is supplied for live RPC liquidity lookup (8453 Base, 42161 Arbitrum, 10 Optimism, 137 Polygon, 1 Ethereum; unknown falls back to 8453). | |
| contracts | Yes | Non-empty array of Solidity contracts belonging to the protocol (1 to 20 {name, code} objects; additional items beyond 20 are ignored). | |
| protocolName | No | DeFi protocol or project name echoed in executiveSummary. | DeFi Protocol |
| tvlTargetUsd | No | Target or declared TVL in USD used for bug bounty reward calibration when live RPC TVL is absent or lower. | |
| ownerTreasury | No | Optional protocol multisig/treasury recipient (0x...) designated to receive 90%-95% of rescued funds in unsigned Safe-Harbor calldata. | |
| contractAddress | No | Optional deployed EVM vault/pool address (0x...) on chainId for live RPC TVL verification and unsigned Safe-Harbor rescue bundle generation. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grade | Yes | Letter grade derived from protocolSecurityScore. | |
| action | Yes | Protocol deployment gate directive. | |
| signal | Yes | Traffic-light risk indicator. | |
| chainId | Yes | Resolved EVM chain ID. | |
| settled | Yes | Whether x402 USDC payment settled cleanly. | |
| summary | Yes | Aggregated finding severity totals and failed invariant count. | |
| protocolName | Yes | Evaluated protocol name. | |
| contractAudits | No | Per-contract security audits and findings (FULL tier only). | |
| executiveSummary | No | Consolidated protocol score, LOC, centralizationRiskIndex, and readiness breakdown (FULL tier only). | |
| deploymentReadiness | Yes | Launch readiness classification. | |
| bugBountyCalibration | No | Recommended bounty reward schedule by severity calibrated to TVL (FULL tier only). | |
| crossContractAnalysis | No | Cross-contract call graph, read-only reentrancy findings, admin privilege map, and invariant checks (FULL tier only). | |
| protocolSecurityScore | Yes | Weighted multi-contract security score from 0 to 100. | |
| verifiedOnChainTvlUsd | Yes | Live on-chain TVL verified via RPC when contractAddress is supplied (0 otherwise). | |
| capitalSalvageAndSafeHarbor | No | Unsigned Safe-Harbor rescue bundle or optional pre-deploy circuit breaker (FULL tier only). | |
| proportionalRescueCommissionPolicy | No | 0.15% Pre-Flight SLA and 5%-10% Safe-Harbor settlement metadata (FULL tier only). |