{
  "title": "Wallet-policy test cases",
  "model_version": 2,
  "scope": "The team, quote, balances and results are invented for an educational example. These tests do not verify an active custody policy. Replace account and contract aliases with verified identities in a controlled native test workflow.",
  "units": "USDC amounts use six decimals. WETH amounts use eighteen decimals. Amount strings are raw units. Times are example seconds.",
  "policies": {
    "v1": "V1 swap allow without receiver constraint, separate approval allow, default block.",
    "v2": "V2 swap allow with receiver = TradingWallet, separate approval allow, default block.",
    "broad_first": "Broad router CALL allow, wrong-receiver swap block, V2 swap allow, separate approval allow, default block."
  },
  "review_gate": "PROCEED_IN_MODEL means the example policy allows the request, both independent approvers are present and the assumed simulation results is complete. Otherwise the review decision is HOLD.",
  "cases": [
    {
      "id": "WP-01",
      "transaction_intent": "Swap 1,000 USDC for at least 0.396 WETH back to the trading wallet.",
      "policy": "v2",
      "inputs": {
        "chain": "Ethereum",
        "source": "TradingWallet",
        "initiator": "TradeOp",
        "operation": "CALL",
        "native_value": "0",
        "destination": "ApprovedRouter",
        "method": "exactInputSingle",
        "decoded": true,
        "token_in": "USDC",
        "token_out": "WETH",
        "amount_in": "1000000000",
        "min_out": "396000000000000000",
        "receiver": "TradingWallet",
        "deadline": 1120,
        "spender": null,
        "approval_amount": null,
        "fee": 3000,
        "sqrt_price_limit_x96": "0"
      },
      "evidence": {
        "snapshot_time": 1000,
        "simulation_available": true,
        "exact_request": true,
        "successful": true,
        "effects_match_intent": true,
        "approvers": [
          "ApproverOne",
          "ApproverTwo"
        ]
      },
      "expected_decision": {
        "policy": "ALLOW",
        "review": "PROCEED_IN_MODEL"
      },
      "reason": "The swap conditions, independent approvals and assumed simulation results are complete.",
      "evidence_still_required": "Native active-policy revision, encoded request, authenticated identities, rule trace and fresh exact-request simulation. No native test has been run."
    },
    {
      "id": "WP-02",
      "transaction_intent": "Redirect the same swap output under the flawed policy.",
      "policy": "v1",
      "inputs": {
        "chain": "Ethereum",
        "source": "TradingWallet",
        "initiator": "TradeOp",
        "operation": "CALL",
        "native_value": "0",
        "destination": "ApprovedRouter",
        "method": "exactInputSingle",
        "decoded": true,
        "token_in": "USDC",
        "token_out": "WETH",
        "amount_in": "1000000000",
        "min_out": "396000000000000000",
        "receiver": "OtherWallet",
        "deadline": 1120,
        "spender": null,
        "approval_amount": null,
        "fee": 3000,
        "sqrt_price_limit_x96": "0"
      },
      "evidence": {
        "snapshot_time": 1000,
        "simulation_available": true,
        "exact_request": true,
        "successful": true,
        "effects_match_intent": false,
        "approvers": [
          "ApproverOne",
          "ApproverTwo"
        ]
      },
      "expected_decision": {
        "policy": "ALLOW",
        "review": "HOLD"
      },
      "reason": "V1 omits the receiver condition. Expected effects violate the custody instruction.",
      "evidence_still_required": "Native V1 rule trace and isolated simulation showing the output recipient. Do not broadcast the unwanted transfer."
    },
    {
      "id": "WP-03",
      "transaction_intent": "Attempt output redirection under the receiver fix.",
      "policy": "v2",
      "inputs": {
        "chain": "Ethereum",
        "source": "TradingWallet",
        "initiator": "TradeOp",
        "operation": "CALL",
        "native_value": "0",
        "destination": "ApprovedRouter",
        "method": "exactInputSingle",
        "decoded": true,
        "token_in": "USDC",
        "token_out": "WETH",
        "amount_in": "1000000000",
        "min_out": "396000000000000000",
        "receiver": "OtherWallet",
        "deadline": 1120,
        "spender": null,
        "approval_amount": null,
        "fee": 3000,
        "sqrt_price_limit_x96": "0"
      },
      "evidence": {
        "snapshot_time": 1000,
        "simulation_available": true,
        "exact_request": true,
        "successful": true,
        "effects_match_intent": true,
        "approvers": [
          "ApproverOne",
          "ApproverTwo"
        ]
      },
      "expected_decision": {
        "policy": "BLOCK",
        "review": "HOLD"
      },
      "reason": "V2 requires receiver = TradingWallet.",
      "evidence_still_required": "Native rejection and matched default-block rule for the altered encoded receiver."
    },
    {
      "id": "WP-04",
      "transaction_intent": "Try the wrong receiver when a broad allow comes first.",
      "policy": "broad_first",
      "inputs": {
        "chain": "Ethereum",
        "source": "TradingWallet",
        "initiator": "TradeOp",
        "operation": "CALL",
        "native_value": "0",
        "destination": "ApprovedRouter",
        "method": "exactInputSingle",
        "decoded": true,
        "token_in": "USDC",
        "token_out": "WETH",
        "amount_in": "1000000000",
        "min_out": "396000000000000000",
        "receiver": "OtherWallet",
        "deadline": 1120,
        "spender": null,
        "approval_amount": null,
        "fee": 3000,
        "sqrt_price_limit_x96": "0"
      },
      "evidence": {
        "snapshot_time": 1000,
        "simulation_available": true,
        "exact_request": true,
        "successful": true,
        "effects_match_intent": false,
        "approvers": [
          "ApproverOne",
          "ApproverTwo"
        ]
      },
      "expected_decision": {
        "policy": "ALLOW",
        "review": "HOLD"
      },
      "reason": "The earlier router allow matches before the later receiver block.",
      "evidence_still_required": "Full effective ordered policy and native evaluation trace proving which rule wins."
    },
    {
      "id": "WP-05",
      "transaction_intent": "Submit a swap with the receiver field missing.",
      "policy": "v2",
      "inputs": {
        "chain": "Ethereum",
        "source": "TradingWallet",
        "initiator": "TradeOp",
        "operation": "CALL",
        "native_value": "0",
        "destination": "ApprovedRouter",
        "method": "exactInputSingle",
        "decoded": true,
        "token_in": "USDC",
        "token_out": "WETH",
        "amount_in": "1000000000",
        "min_out": "396000000000000000",
        "receiver": null,
        "deadline": 1120,
        "spender": null,
        "approval_amount": null,
        "fee": 3000,
        "sqrt_price_limit_x96": "0"
      },
      "evidence": {
        "snapshot_time": 1000,
        "simulation_available": true,
        "exact_request": true,
        "successful": true,
        "effects_match_intent": true,
        "approvers": [
          "ApproverOne",
          "ApproverTwo"
        ]
      },
      "expected_decision": {
        "policy": "BLOCK",
        "review": "HOLD"
      },
      "reason": "A missing receiver cannot equal TradingWallet.",
      "evidence_still_required": "Native decoder behavior for an absent or truncated receiver and confirmation of rejection."
    },
    {
      "id": "WP-06",
      "transaction_intent": "Exceed the input ceiling by one raw unit.",
      "policy": "v2",
      "inputs": {
        "chain": "Ethereum",
        "source": "TradingWallet",
        "initiator": "TradeOp",
        "operation": "CALL",
        "native_value": "0",
        "destination": "ApprovedRouter",
        "method": "exactInputSingle",
        "decoded": true,
        "token_in": "USDC",
        "token_out": "WETH",
        "amount_in": "1000000001",
        "min_out": "396000000000000000",
        "receiver": "TradingWallet",
        "deadline": 1120,
        "spender": null,
        "approval_amount": null,
        "fee": 3000,
        "sqrt_price_limit_x96": "0"
      },
      "evidence": {
        "snapshot_time": 1000,
        "simulation_available": true,
        "exact_request": true,
        "successful": true,
        "effects_match_intent": true,
        "approvers": [
          "ApproverOne",
          "ApproverTwo"
        ]
      },
      "expected_decision": {
        "policy": "BLOCK",
        "review": "HOLD"
      },
      "reason": "The input exceeds 1,000 USDC by 0.000001 USDC.",
      "evidence_still_required": "Native raw-unit interpretation and amount boundary rejection."
    },
    {
      "id": "WP-07",
      "transaction_intent": "Buy a different output asset.",
      "policy": "v2",
      "inputs": {
        "chain": "Ethereum",
        "source": "TradingWallet",
        "initiator": "TradeOp",
        "operation": "CALL",
        "native_value": "0",
        "destination": "ApprovedRouter",
        "method": "exactInputSingle",
        "decoded": true,
        "token_in": "USDC",
        "token_out": "Token C",
        "amount_in": "1000000000",
        "min_out": "396000000000000000",
        "receiver": "TradingWallet",
        "deadline": 1120,
        "spender": null,
        "approval_amount": null,
        "fee": 3000,
        "sqrt_price_limit_x96": "0"
      },
      "evidence": {
        "snapshot_time": 1000,
        "simulation_available": true,
        "exact_request": true,
        "successful": true,
        "effects_match_intent": true,
        "approvers": [
          "ApproverOne",
          "ApproverTwo"
        ]
      },
      "expected_decision": {
        "policy": "BLOCK",
        "review": "HOLD"
      },
      "reason": "Only WETH is permitted.",
      "evidence_still_required": "Exact token addresses, chain and native rejection of the changed asset."
    },
    {
      "id": "WP-08",
      "transaction_intent": "Wrap the request in an unsupported batch method.",
      "policy": "v2",
      "inputs": {
        "chain": "Ethereum",
        "source": "TradingWallet",
        "initiator": "TradeOp",
        "operation": "CALL",
        "native_value": "0",
        "destination": "ApprovedRouter",
        "method": "multicall",
        "decoded": true,
        "token_in": "USDC",
        "token_out": "WETH",
        "amount_in": "1000000000",
        "min_out": "396000000000000000",
        "receiver": "TradingWallet",
        "deadline": 1120,
        "spender": null,
        "approval_amount": null,
        "fee": 3000,
        "sqrt_price_limit_x96": "0"
      },
      "evidence": {
        "snapshot_time": 1000,
        "simulation_available": true,
        "exact_request": true,
        "successful": true,
        "effects_match_intent": true,
        "approvers": [
          "ApproverOne",
          "ApproverTwo"
        ]
      },
      "expected_decision": {
        "policy": "BLOCK",
        "review": "HOLD"
      },
      "reason": "The single-swap allow does not cover batches.",
      "evidence_still_required": "Native batch decoding and confirmation that no other rule admits the wrapper."
    },
    {
      "id": "WP-09",
      "transaction_intent": "Grant the exact next-trade allowance from a zero starting allowance.",
      "policy": "v2",
      "inputs": {
        "chain": "Ethereum",
        "source": "TradingWallet",
        "initiator": "TradeOp",
        "operation": "CALL",
        "native_value": "0",
        "destination": "USDC",
        "method": "approve",
        "decoded": true,
        "token_in": null,
        "token_out": null,
        "amount_in": null,
        "min_out": null,
        "receiver": null,
        "deadline": null,
        "spender": "ApprovedRouter",
        "approval_amount": "1000000000",
        "fee": null,
        "sqrt_price_limit_x96": null
      },
      "evidence": {
        "snapshot_time": 1000,
        "simulation_available": true,
        "exact_request": true,
        "successful": true,
        "effects_match_intent": true,
        "approvers": [
          "ApproverOne",
          "ApproverTwo"
        ]
      },
      "expected_decision": {
        "policy": "ALLOW",
        "review": "PROCEED_IN_MODEL"
      },
      "reason": "The separate approval rule permits exactly 1,000 USDC to ApprovedRouter.",
      "evidence_still_required": "Native zero starting allowance, spender identity, approval trace and post-approval allowance."
    },
    {
      "id": "WP-10",
      "transaction_intent": "Grant an unlimited token allowance.",
      "policy": "v2",
      "inputs": {
        "chain": "Ethereum",
        "source": "TradingWallet",
        "initiator": "TradeOp",
        "operation": "CALL",
        "native_value": "0",
        "destination": "USDC",
        "method": "approve",
        "decoded": true,
        "token_in": null,
        "token_out": null,
        "amount_in": null,
        "min_out": null,
        "receiver": null,
        "deadline": null,
        "spender": "ApprovedRouter",
        "approval_amount": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
        "fee": null,
        "sqrt_price_limit_x96": null
      },
      "evidence": {
        "snapshot_time": 1000,
        "simulation_available": true,
        "exact_request": true,
        "successful": true,
        "effects_match_intent": true,
        "approvers": [
          "ApproverOne",
          "ApproverTwo"
        ]
      },
      "expected_decision": {
        "policy": "BLOCK",
        "review": "HOLD"
      },
      "reason": "The approval amount is neither zero nor exactly 1,000 USDC.",
      "evidence_still_required": "Native rejection of maximum uint256 approval and remaining allowance inventory."
    },
    {
      "id": "WP-11",
      "transaction_intent": "Approve one raw unit more than the next trade.",
      "policy": "v2",
      "inputs": {
        "chain": "Ethereum",
        "source": "TradingWallet",
        "initiator": "TradeOp",
        "operation": "CALL",
        "native_value": "0",
        "destination": "USDC",
        "method": "approve",
        "decoded": true,
        "token_in": null,
        "token_out": null,
        "amount_in": null,
        "min_out": null,
        "receiver": null,
        "deadline": null,
        "spender": "ApprovedRouter",
        "approval_amount": "1000000001",
        "fee": null,
        "sqrt_price_limit_x96": null
      },
      "evidence": {
        "snapshot_time": 1000,
        "simulation_available": true,
        "exact_request": true,
        "successful": true,
        "effects_match_intent": true,
        "approvers": [
          "ApproverOne",
          "ApproverTwo"
        ]
      },
      "expected_decision": {
        "policy": "BLOCK",
        "review": "HOLD"
      },
      "reason": "The separate approval rule rejects an amount above the exact allowance.",
      "evidence_still_required": "Native approval-amount boundary rejection. The swap ceiling alone is insufficient."
    },
    {
      "id": "WP-12",
      "transaction_intent": "Propose the otherwise valid swap as OtherOp.",
      "policy": "v2",
      "inputs": {
        "chain": "Ethereum",
        "source": "TradingWallet",
        "initiator": "OtherOp",
        "operation": "CALL",
        "native_value": "0",
        "destination": "ApprovedRouter",
        "method": "exactInputSingle",
        "decoded": true,
        "token_in": "USDC",
        "token_out": "WETH",
        "amount_in": "1000000000",
        "min_out": "396000000000000000",
        "receiver": "TradingWallet",
        "deadline": 1120,
        "spender": null,
        "approval_amount": null,
        "fee": 3000,
        "sqrt_price_limit_x96": "0"
      },
      "evidence": {
        "snapshot_time": 1000,
        "simulation_available": true,
        "exact_request": true,
        "successful": true,
        "effects_match_intent": true,
        "approvers": [
          "ApproverOne",
          "ApproverTwo"
        ]
      },
      "expected_decision": {
        "policy": "BLOCK",
        "review": "HOLD"
      },
      "reason": "Only authenticated TradeOp may initiate this permission.",
      "evidence_still_required": "Native credential-to-initiator mapping and unauthorized-initiation result."
    },
    {
      "id": "WP-13",
      "transaction_intent": "Count the same approver twice for the valid swap.",
      "policy": "v2",
      "inputs": {
        "chain": "Ethereum",
        "source": "TradingWallet",
        "initiator": "TradeOp",
        "operation": "CALL",
        "native_value": "0",
        "destination": "ApprovedRouter",
        "method": "exactInputSingle",
        "decoded": true,
        "token_in": "USDC",
        "token_out": "WETH",
        "amount_in": "1000000000",
        "min_out": "396000000000000000",
        "receiver": "TradingWallet",
        "deadline": 1120,
        "spender": null,
        "approval_amount": null,
        "fee": 3000,
        "sqrt_price_limit_x96": "0"
      },
      "evidence": {
        "snapshot_time": 1000,
        "simulation_available": true,
        "exact_request": true,
        "successful": true,
        "effects_match_intent": true,
        "approvers": [
          "ApproverOne",
          "ApproverOne"
        ]
      },
      "expected_decision": {
        "policy": "ALLOW",
        "review": "HOLD"
      },
      "reason": "The swap fits the policy but the independent approval pair is absent.",
      "evidence_still_required": "Native distinct-approver enforcement, group membership and binding to the exact transaction."
    },
    {
      "id": "WP-14",
      "transaction_intent": "Request signing without available simulation results.",
      "policy": "v2",
      "inputs": {
        "chain": "Ethereum",
        "source": "TradingWallet",
        "initiator": "TradeOp",
        "operation": "CALL",
        "native_value": "0",
        "destination": "ApprovedRouter",
        "method": "exactInputSingle",
        "decoded": true,
        "token_in": "USDC",
        "token_out": "WETH",
        "amount_in": "1000000000",
        "min_out": "396000000000000000",
        "receiver": "TradingWallet",
        "deadline": 1120,
        "spender": null,
        "approval_amount": null,
        "fee": 3000,
        "sqrt_price_limit_x96": "0"
      },
      "evidence": {
        "snapshot_time": 1000,
        "simulation_available": false,
        "exact_request": true,
        "successful": true,
        "effects_match_intent": true,
        "approvers": [
          "ApproverOne",
          "ApproverTwo"
        ]
      },
      "expected_decision": {
        "policy": "ALLOW",
        "review": "HOLD"
      },
      "reason": "A policy match cannot replace missing simulation results.",
      "evidence_still_required": "Fresh exact-request simulation with trace, balance changes, allowances and snapshot identity."
    },
    {
      "id": "WP-15",
      "transaction_intent": "Submit calldata that cannot be decoded.",
      "policy": "v2",
      "inputs": {
        "chain": "Ethereum",
        "source": "TradingWallet",
        "initiator": "TradeOp",
        "operation": "CALL",
        "native_value": "0",
        "destination": "ApprovedRouter",
        "method": "exactInputSingle",
        "decoded": false,
        "token_in": "USDC",
        "token_out": "WETH",
        "amount_in": "1000000000",
        "min_out": "396000000000000000",
        "receiver": "TradingWallet",
        "deadline": 1120,
        "spender": null,
        "approval_amount": null,
        "fee": 3000,
        "sqrt_price_limit_x96": "0"
      },
      "evidence": {
        "snapshot_time": 1000,
        "simulation_available": true,
        "exact_request": true,
        "successful": true,
        "effects_match_intent": true,
        "approvers": [
          "ApproverOne",
          "ApproverTwo"
        ]
      },
      "expected_decision": {
        "policy": "BLOCK",
        "review": "HOLD"
      },
      "reason": "Unreadable calldata cannot satisfy the narrow method and argument checks.",
      "evidence_still_required": "Native malformed-payload rejection and confirmation of the default behavior on decode failure."
    }
  ],
  "identities": {
    "TradingWallet": "The team trading wallet",
    "ApprovedRouter": "The exact approved Ethereum Uniswap v3 SwapRouter deployment, to be identified before a native test",
    "TradeOp": "The authorized trading account",
    "OtherOp": "An account without trading permission",
    "ApproverOne": "The first independent approver",
    "ApproverTwo": "The second independent approver",
    "OtherWallet": "A wallet outside the permitted proceeds destination"
  },
  "swap_parameters": {
    "method": "exactInputSingle",
    "fee": 3000,
    "sqrtPriceLimitX96": "0",
    "quote_output_weth_raw": "400000000000000000",
    "minimum_output_weth_raw": "396000000000000000",
    "starting_wallet_usdc_raw": "50000000000",
    "receiver_field": "The receiver input below maps to the recipient argument in the router ABI. These are decoded test fields, not broadcastable transaction payloads."
  }
}
