{
  "id": "phs1-swap-phantom",
  "title": "The Phantom Swap",
  "extends": "ph1-send-phantom",
  "context": {
    "wallet": "Phantom extension 26.31.0",
    "platform": "Chrome extension",
    "network": "mainnet",
    "settings": "defaults",
    "version": "26.31.0",
    "observed": "2026-10-02",
    "captures": [
      {
        "run": "20261002-114440-swap-phantom",
        "tx": "0xf51e4db3af41122c437fd35d18112b317eeadd4a735666e28df46a7f54383bb9",
        "note": "real swap: 0.0005 ETH → USDC via DexRouter"
      },
      {
        "run": "20261002-113457-swap-phantom",
        "note": "dry: stopped at the confirm screen"
      }
    ]
  },
  "_comment": "Phantom's built-in Swap, ETH→USDC. The swap tab opens on Solana (SOL→USDC) over a trending-memecoin list. Opening it POSTs every address from your seed across chains (swap/v2/initialize). Quotes stream from Phantom's server; the quote screen showed a 0.85% Phantom fee and Auto slippage 4.9% for ETH→USDC. The tx went to router 0x8feab81d…b4f6 (Sourcify name DexRouter). The signed swap did NOT go through Phantom's RPC: it was POSTed to Phantom's submission service. No address screening and no recents upload on this flow. Real mainnet tx 0xf51e4db3af41122c437fd35d18112b317eeadd4a735666e28df46a7f54383bb9.",
  "prepend_steps": [
    {
      "id": "ph-swap-init",
      "phase": "discover",
      "name": "Phantom swap · initialize (every address you own)",
      "host": "api.phantom.app/swap/v2/initialize",
      "actor": "phantom-apis",
      "purpose": "Opening Swap POSTs your addresses on every chain from the seed — Solana, Bitcoin (bc1q…), Ethereum, Base, BNB and more — plus the pair you pick",
      "need": "T",
      "carries": [
        "ip",
        "all_addresses",
        "token_pair"
      ],
      "returns": "swap session setup",
      "can_block": true,
      "on_failure": "blocks",
      "worst_lie": {
        "outcome": "false_belief"
      },
      "removable_by": "none",
      "provenance": {
        "status": "observed",
        "ref": "20261002-114440-swap-phantom · POST /swap/v2/initialize {network, sellCaip19, buyCaip19, addresses:{solana:101, bip122 (bc1q…), eip155:1, eip155:8453, eip155:56, eip155:4663, …}}"
      },
      "notes": "The swap screen opens on Solana (SOL → USDC) with a trending-memecoin list; the first initialize is for Solana."
    },
    {
      "id": "ph-swap-quote",
      "phase": "discover",
      "name": "Phantom swap · streamed quotes",
      "host": "api.phantom.app/swap/v2/stream/quotes",
      "actor": "phantom-apis",
      "purpose": "A server-sent stream of quotes for your address; the chosen one carries the calldata you sign. Quote screen: 0.85% Phantom fee, Auto slippage 4.9%.",
      "need": "RC",
      "carries": [
        "ip",
        "selected_address",
        "token_pair",
        "amount"
      ],
      "returns": "the price you accept and the bytes you sign",
      "can_block": true,
      "on_failure": "blocks",
      "worst_lie": {
        "outcome": "funds_lost",
        "note": "a bad route or minimum-out drains value within slippage"
      },
      "removable_by": "none",
      "provenance": {
        "status": "observed",
        "ref": "20261002-114440-swap-phantom · GET /swap/v2/stream/quotes?taker=eip155:1/address:0xd3fd… (text/event-stream)"
      },
      "births": [
        "unsigned_tx",
        "swap_route"
      ],
      "tx_input": "field",
      "fixed_by": [
        "open-simulation"
      ]
    }
  ],
  "insert_steps": [
    {
      "after": "ph-simulate",
      "step": {
        "id": "ph-submit",
        "phase": "broadcast",
        "name": "Phantom submission service",
        "host": "api.phantom.app/v0/submission/chain/ethereum/network/mainnet/submit",
        "actor": "phantom-apis",
        "purpose": "Swaps skip the RPC: the signed tx (base64) is POSTed to Phantom's submission service, then its status is streamed back",
        "need": "W",
        "carries": [
          "ip",
          "signed_tx",
          "selected_address",
          "amount"
        ],
        "returns": "submission id + status stream",
        "can_block": true,
        "on_failure": "blocks",
        "worst_lie": {
          "outcome": "none",
          "note": "cannot alter a signed tx; decides how and when it reaches builders"
        },
        "removable_by": "none",
        "provenance": {
          "status": "observed",
          "ref": "20261002-114440-swap-phantom · POST /v0/submission/chain/ethereum/network/mainnet/submit {kind: transaction, transaction: <signed, base64>}; GET /v0/status/submissions/*/stream"
        },
        "fixed_by": [
          "cr-broadcast"
        ]
      }
    }
  ],
  "drop_steps": [
    "ph-send-raw",
    "ph-recents",
    "ph-screen"
  ]
}
