{
  "openapi": "3.1.0",
  "info": {
    "title": "Ingravity Autonomous EVM Security & DeFi Intelligence Swarm",
    "version": "3.9.5",
    "description": "Deterministic Solidity security, EVM pre-sign transaction firewall, BigInt DeFi MEV/liquidation math, token honeypot forensics and multi-contract protocol review for AI agents, paid per call via x402 v2 (USDC on Base).",
    "contact": {
      "name": "David del Moral — Founder & Lead Security Researcher",
      "email": "daviddelmoral79@gmail.com",
      "url": "https://red-shape-1b3b.daviddelmoral79.workers.dev"
    },
    "x-pricing-catalog": {
      "model": "Hybrid M2M (Low Base Micro-Floor + Proportional % on Saved/Protected Capital)",
      "settlementAsset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "beneficiaryWallet": "0xAA99e12320a3db0116ef56D2e19F70f6796Bad0f",
      "network": "Base Mainnet (eip155:8453)",
      "services": [
        {
          "path": "/api/v1/fast-ping",
          "baseFloorUsd": "$0.03 USDC",
          "signalOnlyUsd": "$0.03 USDC",
          "proportionalRateOverCapital": "Flat $0.03 Binary SAFE/DANGER Only (No Forensics)",
          "summary": "Ultra-Fast Binary Address Safety Ping ($0.03 USDC Flat - Boolean SAFE/DANGER Only)"
        },
        {
          "path": "/api/v1/audit-solidity",
          "baseFloorUsd": "$0.85 USDC",
          "signalOnlyUsd": "$0.35 USDC",
          "proportionalRateOverCapital": "+0.15% Live TVL SLA | 5%-10% Atomic Safe-Harbor Split",
          "summary": "Deterministic 24-Vector Solidity Audit, Fixes & Safe-Harbor Guard ($0.85 Floor / $0.35 Signal + Optional 0.15% SLA or 5%-10% Live Rescue Split)"
        },
        {
          "path": "/api/v1/tx-firewall",
          "baseFloorUsd": "$0.10 USDC",
          "signalOnlyUsd": "$0.10 USDC",
          "proportionalRateOverCapital": "+0.15% Pre-Flight | 5%-10% Rescate",
          "summary": "Pre-Flight EVM Firewall & Live RPC EIP-1967 Forensics ($0.10 Floor + 0.15% Pre-Flight / 5%-10% Rescue)"
        },
        {
          "path": "/api/v1/defi-math-guard",
          "baseFloorUsd": "$0.15 USDC",
          "signalOnlyUsd": "$0.10 USDC",
          "proportionalRateOverCapital": "+0.15% on Protected Swap Value (> $200 USD)",
          "summary": "Exact BigInt AMM Slippage, MEV Sandwich & Liquidation Guard ($0.15 Floor + 0.15% Swap / $0.10 Signal)"
        },
        {
          "path": "/api/v1/token-rug-scanner",
          "baseFloorUsd": "$0.50 USDC",
          "signalOnlyUsd": "$0.25 USDC",
          "proportionalRateOverCapital": "+0.15% on Protected Position Size (> $200 USD)",
          "summary": "Token Honeypot & Live Base RPC Bytecode/Proxy Forensics by tokenAddress ($0.50 Floor + 0.15% Position / $0.25 Signal)"
        },
        {
          "path": "/api/v1/protocol-dossier",
          "baseFloorUsd": "$12.00 USDC",
          "signalOnlyUsd": "$3.50 USDC",
          "proportionalRateOverCapital": "+0.15% Live TVL SLA | 5%-10% Atomic Safe-Harbor Split",
          "summary": "Multi-Contract DeFi Protocol Dossier & Invariant Engine ($12.00 Floor / $3.50 Signal + Optional 0.15% SLA or 5%-10% Live Rescue Split)"
        },
        {
          "path": "/api/v1/deep-exploit-bounty",
          "baseFloorUsd": "$45.00 USDC",
          "signalOnlyUsd": "$9.50 USDC",
          "proportionalRateOverCapital": "5% - 10% Atomic EIP-5792 / Sequential EOA Safe-Harbor Split on Rescued Capital",
          "summary": "Institutional Flash-Loan Simulation & Atomic Safe-Harbor Rescue ($45.00 Floor / $9.50 Triage + 5%-10% Atomic Split on Saved Capital)"
        }
      ]
    },
    "x-settlement": {
      "network": "eip155:8453",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "payTo": "0xAA99e12320a3db0116ef56D2e19F70f6796Bad0f",
      "baseBuilderCode": "bc_i26d7owr"
    },
    "x-guidance": "POST JSON to one endpoint: /api/v1/fast-ping (Base: $0.03 + Flat $0.03 Binary SAFE/DANGER Only (No Forensics) / Signal: $0.03), /api/v1/audit-solidity (Base: $0.85 + +0.15% Live TVL SLA | 5%-10% Atomic Safe-Harbor Split / Signal: $0.35), /api/v1/tx-firewall (Base: $0.10 + +0.15% Pre-Flight | 5%-10% Rescate / Signal: $0.10), /api/v1/defi-math-guard (Base: $0.15 + +0.15% on Protected Swap Value (> $200 USD) / Signal: $0.10), /api/v1/token-rug-scanner (Base: $0.50 + +0.15% on Protected Position Size (> $200 USD) / Signal: $0.25), /api/v1/protocol-dossier (Base: $12.00 + +0.15% Live TVL SLA | 5%-10% Atomic Safe-Harbor Split / Signal: $3.50), /api/v1/deep-exploit-bounty (Base: $45.00 + 5% - 10% Atomic EIP-5792 / Sequential EOA Safe-Harbor Split on Rescued Capital / Signal: $9.50). Pass header 'X-Agent-Budget: <usd>' to auto-select the Signal Only tier or auto-cap fee. Settlement: x402 v2, USDC on Base (eip155:8453) to 0xAA99e12320a3db0116ef56D2e19F70f6796Bad0f."
  },
  "servers": [
    {
      "url": "https://red-shape-1b3b.daviddelmoral79.workers.dev"
    }
  ],
  "paths": {
    "/api/v1/fast-ping": {
      "post": {
        "operationId": "fastPingAddressSafety",
        "tags": [
          "Fast Ping",
          "Binary Address Check",
          "Impulse M2M",
          "Anti-Drainer Boolean"
        ],
        "summary": "Ultra-Fast Binary Address Safety Ping ($0.03 USDC Flat - Boolean SAFE/DANGER Only)",
        "description": "Designed for high-frequency autonomous bots with maxAutoPay <= $0.05 USDC. Returns strictly a binary SAFE or DANGER boolean verdict on any Base Mainnet address (0x...) with zero forensic leakage. For calldata decoding, storage slots, and remediation calldata, use POST /api/v1/tx-firewall ($0.10 USDC).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "address": {
                    "type": "string",
                    "description": "Base Mainnet contract, token, or spender address (0x...)"
                  },
                  "chainId": {
                    "type": "integer",
                    "description": "EVM Chain ID (default: 8453 Base Mainnet)"
                  }
                },
                "required": [
                  "address"
                ]
              },
              "example": {
                "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "chainId": 8453
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deterministic JSON analysis report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "status": "SAFE",
                  "verdict": "SAFE",
                  "action": "PROCEED",
                  "signal": "GREEN_LIGHT",
                  "isSafe": true,
                  "targetAddress": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
                  "chainId": 8453,
                  "forensicDetails": "LOCKED_IN_FAST_PING_TIER"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required ($0.03 USDC on Base Mainnet eip155:8453 via x402 v2)"
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {
                "version": 2,
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0xAA99e12320a3db0116ef56D2e19F70f6796Bad0f",
                "baseBuilderCode": "bc_i26d7owr"
              }
            }
          ],
          "price": {
            "mode": "hybrid",
            "currency": "USD",
            "baseFloorAmount": "0.03",
            "essentialSignalOnlyAmount": "0.03",
            "proportionalRateOverCapital": "Flat $0.03 Binary SAFE/DANGER Only (No Forensics)",
            "pricingPolicy": "Hybrid M2M: Low Base Micro-Floor (<$200 USD) + Proportional % on Saved Capital, auto-capped at X-Agent-Budget"
          }
        }
      }
    },
    "/api/v1/audit-solidity": {
      "post": {
        "operationId": "auditSolidityContract",
        "tags": [
          "Solidity Security",
          "Smart Contract Audit",
          "ERC-4626",
          "24 SWC Vectors"
        ],
        "summary": "Deterministic 24-Vector Solidity Audit, Fixes & Safe-Harbor Guard ($0.85 Floor / $0.35 Signal + Optional 0.15% SLA or 5%-10% Live Rescue Split)",
        "description": "Deterministic O(N) lexical sanitization covering 24 SWC/DeFi attack vectors with line-by-line executable remediation patches. Pre-deployment code pays flat $0.85 USDC ($0.35 Signal) with zero upfront % surcharge. When an optional deployed Base contractAddress (0x...) is provided, verifies real on-chain USDC/WETH/ETH/cbBTC liquidity via RPC and generates an optional Atomic EIP-5792 / sequential EOA Safe-Harbor rescue split (90%-95% to owner treasury, 5%-10% whitehat bounty on saved capital).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "description": "Raw Solidity (.sol) smart contract source code to audit"
                  },
                  "contractName": {
                    "type": "string",
                    "description": "Optional contract identifier"
                  },
                  "contractAddress": {
                    "type": "string",
                    "description": "Optional deployed Base Mainnet contract address (0x...) for live RPC liquidity verification & Safe-Harbor rescue calldata"
                  },
                  "ownerTreasury": {
                    "type": "string",
                    "description": "Optional protocol owner/multisig recipient (0x...) for 90%-95% rescued capital"
                  }
                },
                "required": [
                  "code"
                ]
              },
              "example": {
                "code": "pragma solidity ^0.8.20; contract Vault { mapping(address => uint256) public bal; function withdraw(uint256 a) external { (bool ok,) = msg.sender.call{value: a}(\"\"); require(ok); bal[msg.sender] -= a; } }",
                "contractName": "Vault.sol"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deterministic JSON analysis report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "contractName": "Vault.sol",
                  "securityScore": 49,
                  "grade": "D",
                  "status": "CRITICAL_DO_NOT_DEPLOY",
                  "summary": {
                    "CRITICAL": 1,
                    "HIGH": 0,
                    "MEDIUM": 0,
                    "LOW": 1,
                    "GAS": 0,
                    "total": 2
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required ($0.85 USDC on Base Mainnet eip155:8453 via x402 v2)"
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {
                "version": 2,
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0xAA99e12320a3db0116ef56D2e19F70f6796Bad0f",
                "baseBuilderCode": "bc_i26d7owr"
              }
            }
          ],
          "price": {
            "mode": "hybrid",
            "currency": "USD",
            "baseFloorAmount": "0.85",
            "essentialSignalOnlyAmount": "0.35",
            "proportionalRateOverCapital": "+0.15% Live TVL SLA | 5%-10% Atomic Safe-Harbor Split",
            "pricingPolicy": "Hybrid M2M: Low Base Micro-Floor (<$200 USD) + Proportional % on Saved Capital, auto-capped at X-Agent-Budget"
          }
        }
      }
    },
    "/api/v1/tx-firewall": {
      "post": {
        "operationId": "inspectEvmTransactionFirewall",
        "tags": [
          "EVM Firewall",
          "Wallet Drainer Protection",
          "Permit2",
          "EIP-1967 Storage"
        ],
        "summary": "Pre-Flight EVM Firewall & Live RPC EIP-1967 Forensics ($0.10 Floor + 0.15% Pre-Flight / 5%-10% Rescue)",
        "description": "Live Base Mainnet RPC inspection (eth_getCode + EIP-1967 storage slots) + Ready-to-sign EIP-5792 / sequential EOA revocation calldata. Hybrid Pricing: $0.10 USDC base floor (<$200 USD), plus 0.15% Pre-Flight protection / 5%-10% Whitehat Safe-Harbor rescue bounty.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "chainId": {
                    "type": "integer",
                    "description": "EVM Chain ID (e.g., 8453 for Base)"
                  },
                  "from": {
                    "type": "string",
                    "description": "Sender wallet address (0x...)"
                  },
                  "to": {
                    "type": "string",
                    "description": "Target contract or recipient address (0x...)"
                  },
                  "value": {
                    "type": "string",
                    "description": "Native ETH value in wei (decimal string)"
                  },
                  "data": {
                    "type": "string",
                    "description": "Hexadecimal transaction calldata (0x...)"
                  }
                },
                "required": [
                  "to",
                  "data"
                ]
              },
              "example": {
                "chainId": 8453,
                "to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "value": "0",
                "data": "0x095ea7b3000000000000000000000000deadbeef00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deterministic JSON analysis report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "verdict": "BLOCK_DRAINER",
                  "riskScore": 90,
                  "selector": "0x095ea7b3",
                  "decodedAction": "ERC20.approve(spender, UNLIMITED)",
                  "agentDirective": "ABORT_SIGNATURE: Replace infinite approval with exact amount and verify spender."
                }
              }
            }
          },
          "402": {
            "description": "Payment Required ($0.10 USDC on Base Mainnet eip155:8453 via x402 v2)"
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {
                "version": 2,
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0xAA99e12320a3db0116ef56D2e19F70f6796Bad0f",
                "baseBuilderCode": "bc_i26d7owr"
              }
            }
          ],
          "price": {
            "mode": "hybrid",
            "currency": "USD",
            "baseFloorAmount": "0.10",
            "essentialSignalOnlyAmount": "0.10",
            "proportionalRateOverCapital": "+0.15% Pre-Flight | 5%-10% Rescate",
            "pricingPolicy": "Hybrid M2M: Low Base Micro-Floor (<$200 USD) + Proportional % on Saved Capital, auto-capped at X-Agent-Budget"
          }
        }
      }
    },
    "/api/v1/defi-math-guard": {
      "post": {
        "operationId": "computeDefiSlippageAndLiquidation",
        "tags": [
          "DeFi Math",
          "MEV Sandwich Protection",
          "AMM Slippage",
          "BigInt Precision"
        ],
        "summary": "Exact BigInt AMM Slippage, MEV Sandwich & Liquidation Guard ($0.15 Floor + 0.15% Swap / $0.10 Signal)",
        "description": "48-step exact BigInt binary search for optimal MEV sandwich vectors and mathematically provable minAmountOut. Hybrid Pricing: $0.15 USDC base floor or $0.10 USDC Signal Only tier, plus 0.15% on protected swap volume.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amm": {
                    "type": "object",
                    "properties": {
                      "reserveIn": {
                        "type": "string",
                        "description": "Pool input token reserve in atomic units"
                      },
                      "reserveOut": {
                        "type": "string",
                        "description": "Pool output token reserve in atomic units"
                      },
                      "amountIn": {
                        "type": "string",
                        "description": "Swap input amount in atomic units"
                      },
                      "feeBps": {
                        "type": "integer",
                        "description": "Pool fee in basis points (default 30 = 0.30%)"
                      },
                      "userSlippageBps": {
                        "type": "integer",
                        "description": "Proposed slippage tolerance in bps (e.g. 100 = 1%)"
                      }
                    },
                    "required": [
                      "reserveIn",
                      "reserveOut",
                      "amountIn"
                    ]
                  },
                  "leverage": {
                    "type": "object",
                    "properties": {
                      "entryPrice": {
                        "type": "string",
                        "description": "Entry asset price (e.g. '2500.00')"
                      },
                      "leverage": {
                        "type": "string",
                        "description": "Leverage multiplier (e.g. '10')"
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "LONG",
                          "SHORT"
                        ]
                      },
                      "maintenanceMarginBps": {
                        "type": "integer",
                        "description": "Maintenance margin in bps (default 50)"
                      }
                    }
                  }
                }
              },
              "example": {
                "amm": {
                  "reserveIn": "500000000000000000000",
                  "reserveOut": "1250000000000",
                  "amountIn": "25000000000000000000",
                  "feeBps": 30,
                  "userSlippageBps": 100
                },
                "leverage": {
                  "entryPrice": "2500.00",
                  "leverage": "10",
                  "side": "LONG",
                  "maintenanceMarginBps": 50
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deterministic JSON analysis report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "amm": {
                    "exactAmountOut": "59362905626",
                    "purePriceImpactBps": 473,
                    "mevRisk": "CRITICAL",
                    "recommendedSlippageBps": 25
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required ($0.15 USDC on Base Mainnet eip155:8453 via x402 v2)"
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {
                "version": 2,
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0xAA99e12320a3db0116ef56D2e19F70f6796Bad0f",
                "baseBuilderCode": "bc_i26d7owr"
              }
            }
          ],
          "price": {
            "mode": "hybrid",
            "currency": "USD",
            "baseFloorAmount": "0.15",
            "essentialSignalOnlyAmount": "0.10",
            "proportionalRateOverCapital": "+0.15% on Protected Swap Value (> $200 USD)",
            "pricingPolicy": "Hybrid M2M: Low Base Micro-Floor (<$200 USD) + Proportional % on Saved Capital, auto-capped at X-Agent-Budget"
          }
        }
      }
    },
    "/api/v1/token-rug-scanner": {
      "post": {
        "operationId": "scanTokenRugpullAndHoneypot",
        "tags": [
          "Rugpull Scanner",
          "Honeypot Detection",
          "Token Forensics",
          "Live Base RPC Bytecode",
          "EIP-1167 Clones"
        ],
        "summary": "Token Honeypot & Live Base RPC Bytecode/Proxy Forensics by tokenAddress ($0.50 Floor + 0.15% Position / $0.25 Signal)",
        "description": "Audits any Base Mainnet token directly by tokenAddress (0x...) without requiring Solidity source code! Performs live Base RPC bytecode selector disassembly (blacklist, hidden mint, dynamic sell tax, pause switches), EIP-1967/EIP-1167 proxy implementation inspection, plus 14-rule AST analysis when optional .sol code is supplied. Hybrid Pricing: $0.50 USDC Full Report or $0.25 USDC Signal Only tier.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tokenAddress": {
                    "type": "string",
                    "description": "Base Mainnet ERC-20 token contract address (0x...) - no Solidity source code required"
                  },
                  "chainId": {
                    "type": "integer",
                    "description": "EVM Chain ID (default: 8453 for Base Mainnet)"
                  },
                  "code": {
                    "type": "string",
                    "description": "Optional Solidity (.sol) source code if auditing pre-deployment"
                  },
                  "tokenName": {
                    "type": "string",
                    "description": "Optional token ticker or name"
                  }
                }
              },
              "example": {
                "tokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "chainId": 8453
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deterministic JSON analysis report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "action": "PROCEED",
                  "signal": "GREEN_LIGHT",
                  "canSell": true,
                  "tokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                  "rugProbabilityScore": 0,
                  "verdict": "CLEAN",
                  "isHoneypotLikely": false
                }
              }
            }
          },
          "402": {
            "description": "Payment Required ($0.50 USDC on Base Mainnet eip155:8453 via x402 v2)"
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {
                "version": 2,
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0xAA99e12320a3db0116ef56D2e19F70f6796Bad0f",
                "baseBuilderCode": "bc_i26d7owr"
              }
            }
          ],
          "price": {
            "mode": "hybrid",
            "currency": "USD",
            "baseFloorAmount": "0.50",
            "essentialSignalOnlyAmount": "0.25",
            "proportionalRateOverCapital": "+0.15% on Protected Position Size (> $200 USD)",
            "pricingPolicy": "Hybrid M2M: Low Base Micro-Floor (<$200 USD) + Proportional % on Saved Capital, auto-capped at X-Agent-Budget"
          }
        }
      }
    },
    "/api/v1/protocol-dossier": {
      "post": {
        "operationId": "generateMultiContractProtocolDossier",
        "tags": [
          "DeFi Protocol Audit",
          "Cross-Contract Reentrancy",
          "Bug Bounty Dossier",
          "Invariant Engine"
        ],
        "summary": "Multi-Contract DeFi Protocol Dossier & Invariant Engine ($12.00 Floor / $3.50 Signal + Optional 0.15% SLA or 5%-10% Live Rescue Split)",
        "description": "Cross-contract call graph (up to 20 files), cross-contract Read-Only Reentrancy detection & 6 ERC-4626/Oracle invariants. Flat $12.00 USDC ($3.50 Signal) entry with zero upfront TVL scarecrow, plus live Base RPC liquidity verification and Atomic EIP-5792 / sequential EOA Safe-Harbor rescue split (5%-10% on saved capital) when contractAddress is deployed.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "protocolName": {
                    "type": "string",
                    "description": "DeFi protocol or project name"
                  },
                  "tvlTargetUsd": {
                    "type": "number",
                    "description": "Target or current TVL in USD for bounty calibration"
                  },
                  "contractAddress": {
                    "type": "string",
                    "description": "Optional deployed Base Mainnet vault/pool address (0x...) for live on-chain TVL verification & Safe-Harbor rescue bundle"
                  },
                  "ownerTreasury": {
                    "type": "string",
                    "description": "Optional protocol multisig/treasury address (0x...) for 90%-95% rescued funds"
                  },
                  "contracts": {
                    "type": "array",
                    "description": "Array of Solidity contracts belonging to the protocol (1 to 20 files)",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Contract filename (e.g. AegisVault.sol)"
                        },
                        "code": {
                          "type": "string",
                          "description": "Solidity source code"
                        }
                      },
                      "required": [
                        "name",
                        "code"
                      ]
                    }
                  }
                },
                "required": [
                  "contracts"
                ]
              },
              "example": {
                "protocolName": "AegisYield",
                "tvlTargetUsd": 2000000,
                "contracts": [
                  {
                    "name": "AegisVault.sol",
                    "code": "pragma solidity ^0.8.20; contract AegisVault { function totalAssets() public view returns (uint256) { return 1000; } function withdraw(uint256 a) external { (bool s,) = msg.sender.call{value: a}(\"\"); require(s); } }"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deterministic JSON analysis report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "protocolName": "AegisYield",
                  "executiveSummary": {
                    "protocolSecurityScore": 45,
                    "grade": "D",
                    "deploymentReadiness": "BLOCK_LAUNCH"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required ($12.00 USDC on Base Mainnet eip155:8453 via x402 v2)"
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {
                "version": 2,
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0xAA99e12320a3db0116ef56D2e19F70f6796Bad0f",
                "baseBuilderCode": "bc_i26d7owr"
              }
            }
          ],
          "price": {
            "mode": "hybrid",
            "currency": "USD",
            "baseFloorAmount": "12.00",
            "essentialSignalOnlyAmount": "3.50",
            "proportionalRateOverCapital": "+0.15% Live TVL SLA | 5%-10% Atomic Safe-Harbor Split",
            "pricingPolicy": "Hybrid M2M: Low Base Micro-Floor (<$200 USD) + Proportional % on Saved Capital, auto-capped at X-Agent-Budget"
          }
        }
      }
    },
    "/api/v1/deep-exploit-bounty": {
      "post": {
        "operationId": "simulateDeepExploitAndWhitehatBounty",
        "tags": [
          "Whale Whitehat Bounty",
          "Flash Loan Exploits",
          "Safe-Harbor Rescue",
          "Pelotazo M2M"
        ],
        "summary": "Institutional Flash-Loan Simulation & Atomic Safe-Harbor Rescue ($45.00 Floor / $9.50 Triage + 5%-10% Atomic Split on Saved Capital)",
        "description": "Flash-loan drain simulation + live Base Mainnet on-chain liquidity verification (USDC/WETH/ETH/cbBTC) + executable EIP-5792 wallet_sendCalls / sequential EOA Safe-Harbor rescue bundle that returns 90%-95% of vulnerable pool funds to ownerTreasury and settles 5%-10% whitehat bounty ($0 upfront bounty risk).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "protocolName": {
                    "type": "string",
                    "description": "Target protocol identifier"
                  },
                  "poolAddress": {
                    "type": "string",
                    "description": "Target Base Mainnet pool or vault address (0x...)"
                  },
                  "ownerTreasury": {
                    "type": "string",
                    "description": "Optional protocol owner/multisig recipient (0x...) for 90%-95% rescued assets"
                  },
                  "tvlUsd": {
                    "type": "number",
                    "description": "Estimated pool TVL in USD (auto-verified on-chain against Base RPC)"
                  },
                  "code": {
                    "type": "string",
                    "description": "Optional Solidity contract source code"
                  }
                },
                "required": [
                  "protocolName"
                ]
              },
              "example": {
                "protocolName": "BaseLendingPool",
                "poolAddress": "0x420DD381b31aEf6683db6B902084cB0FFECe40Da",
                "tvlUsd": 250000
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deterministic JSON analysis report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "protocol": "BaseLendingPool",
                  "tier": "institutional_whale_bounty",
                  "exploitImmunityScore": 82,
                  "vulnerabilitySeverity": "MEDIUM_ARBITRAGEABLE",
                  "whitehatRescuePlan": {
                    "standardWhitehatBountyPct": 10,
                    "entitledBountyRewardUsdc": 25000
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required ($45.00 USDC on Base Mainnet eip155:8453 via x402 v2)"
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {
                "version": 2,
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0xAA99e12320a3db0116ef56D2e19F70f6796Bad0f",
                "baseBuilderCode": "bc_i26d7owr"
              }
            }
          ],
          "price": {
            "mode": "hybrid",
            "currency": "USD",
            "baseFloorAmount": "45.00",
            "essentialSignalOnlyAmount": "9.50",
            "proportionalRateOverCapital": "5% - 10% Atomic EIP-5792 / Sequential EOA Safe-Harbor Split on Rescued Capital",
            "pricingPolicy": "Hybrid M2M: Low Base Micro-Floor (<$200 USD) + Proportional % on Saved Capital, auto-capped at X-Agent-Budget"
          }
        }
      }
    }
  }
}