{
  "openapi": "3.1.0",
  "info": {
    "title": "PONZI FACTORY API",
    "version": "2.0.0",
    "summary": "Read the roster, prepare a launch, simulate it before you spend gas.",
    "description": "Free: the roster, knob schemas, trust tiers, floors, and unsigned launch transactions. Metered (x402): live simulation against the target chain. No accounts and no custody — every launch is signed by the caller’s own wallet. See /auth.md.",
    "license": {
      "name": "Public documentation",
      "url": "https://www.ponzifactory.xyz/auth.md"
    }
  },
  "servers": [
    {
      "url": "https://www.ponzifactory.xyz"
    }
  ],
  "x-service-info": {
    "name": "PONZI FACTORY",
    "categories": [
      "blockchain",
      "developer-tools",
      "defi",
      "smart-contracts"
    ],
    "pricing": "freemium",
    "custody": "none",
    "payment": {
      "methods": [
        "x402"
      ],
      "network": "eip155:84532",
      "asset": "USDC",
      "payTo": "0xc7B4E2Ae037ab8c27C6032359B5b2Dfd8B15400c"
    },
    "commerce": {
      "acp": "https://www.ponzifactory.xyz/.well-known/acp.json",
      "ucp": "https://www.ponzifactory.xyz/.well-known/ucp"
    }
  },
  "paths": {
    "/api/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Liveness and version",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/archetypes": {
      "get": {
        "operationId": "listArchetypes",
        "summary": "Every archetype on the roster",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "LIVE",
                "GUIDED"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/archetypes/{id}": {
      "get": {
        "operationId": "getArchetype",
        "summary": "One archetype by factory id or slug",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "No such archetype"
          }
        }
      }
    },
    "/api/archetypes/{id}/schema": {
      "get": {
        "operationId": "getLaunchSchema",
        "summary": "Launch knob schema, bounds, defaults and launch() signature",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/launch/prepare": {
      "post": {
        "operationId": "prepareLaunch",
        "summary": "Build an unsigned launch transaction",
        "description": "Validates the knobs, encodes launch() with the factory ABI, and returns {to, data, value, chainId} plus the trust-tier disclosure. Free. You sign it yourself; this API never takes custody.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "archetype",
                  "chain",
                  "name"
                ],
                "properties": {
                  "archetype": {
                    "type": "string",
                    "description": "Factory id, e.g. curve, rebase, tontine.",
                    "enum": [
                      "curve",
                      "taxtoken",
                      "farm",
                      "rebase",
                      "roi",
                      "fomo",
                      "cd",
                      "node",
                      "points",
                      "peg",
                      "gungame",
                      "tontine",
                      "crash",
                      "potato",
                      "grid",
                      "wolf",
                      "bribe",
                      "mint",
                      "keys"
                    ]
                  },
                  "chain": {
                    "type": [
                      "string",
                      "integer"
                    ],
                    "description": "Chain id or key, e.g. 8453 or \"base\"."
                  },
                  "name": {
                    "type": "string",
                    "description": "Token / game name."
                  },
                  "symbol": {
                    "type": "string",
                    "description": "Ticker. Required unless the archetype is name-only."
                  },
                  "params": {
                    "type": "object",
                    "description": "Knob values keyed by field id; omitted knobs take their default."
                  },
                  "from": {
                    "type": "string",
                    "description": "Signer address. Required for /api/v1 simulation (eth_call needs a sender)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters"
          }
        }
      }
    },
    "/api/chains": {
      "get": {
        "operationId": "listChains",
        "summary": "Floors, with which factories are live on each",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/deployments": {
      "get": {
        "operationId": "listDeployments",
        "summary": "Factory addresses per chain",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/trust-tiers": {
      "get": {
        "operationId": "listTrustTiers",
        "summary": "On-chain trust tiers and the powers each grants",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/routes": {
      "get": {
        "operationId": "listRoutes",
        "summary": "Public pages, each with a markdown twin",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/launch/simulate": {
      "post": {
        "operationId": "simulateLaunch",
        "summary": "Simulate a launch against the live chain (paid)",
        "description": "eth_call + eth_estimateGas of a prepared launch against the target chain RPC, so an agent learns whether the factory would accept its knobs before spending gas. Costs us a live RPC round trip per call, which is why it is the paid one.",
        "x-payment-info": {
          "intent": "charge",
          "method": "x402",
          "amount": "0.01",
          "currency": "USDC",
          "network": "eip155:84532",
          "asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
          "payTo": "0xc7B4E2Ae037ab8c27C6032359B5b2Dfd8B15400c",
          "facilitator": "https://x402.org/facilitator",
          "description": "Per-call charge, settled in USDC over x402. No account, no subscription."
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "archetype",
                  "chain",
                  "name"
                ],
                "properties": {
                  "archetype": {
                    "type": "string",
                    "description": "Factory id, e.g. curve, rebase, tontine.",
                    "enum": [
                      "curve",
                      "taxtoken",
                      "farm",
                      "rebase",
                      "roi",
                      "fomo",
                      "cd",
                      "node",
                      "points",
                      "peg",
                      "gungame",
                      "tontine",
                      "crash",
                      "potato",
                      "grid",
                      "wolf",
                      "bribe",
                      "mint",
                      "keys"
                    ]
                  },
                  "chain": {
                    "type": [
                      "string",
                      "integer"
                    ],
                    "description": "Chain id or key, e.g. 8453 or \"base\"."
                  },
                  "name": {
                    "type": "string",
                    "description": "Token / game name."
                  },
                  "symbol": {
                    "type": "string",
                    "description": "Ticker. Required unless the archetype is name-only."
                  },
                  "params": {
                    "type": "object",
                    "description": "Knob values keyed by field id; omitted knobs take their default."
                  },
                  "from": {
                    "type": "string",
                    "description": "Signer address. Required for /api/v1 simulation (eth_call needs a sender)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — retry with an X-PAYMENT header per x402",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/launch/quote": {
      "post": {
        "operationId": "quoteLaunch",
        "summary": "Priced launch quote with live gas (paid)",
        "description": "A prepared launch plus live gas price, estimated gas, and the total native-token cost to deploy it on the chosen floor.",
        "x-payment-info": {
          "intent": "charge",
          "method": "x402",
          "amount": "0.01",
          "currency": "USDC",
          "network": "eip155:84532",
          "asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
          "payTo": "0xc7B4E2Ae037ab8c27C6032359B5b2Dfd8B15400c",
          "facilitator": "https://x402.org/facilitator",
          "description": "Per-call charge, settled in USDC over x402. No account, no subscription."
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "archetype",
                  "chain",
                  "name"
                ],
                "properties": {
                  "archetype": {
                    "type": "string",
                    "description": "Factory id, e.g. curve, rebase, tontine.",
                    "enum": [
                      "curve",
                      "taxtoken",
                      "farm",
                      "rebase",
                      "roi",
                      "fomo",
                      "cd",
                      "node",
                      "points",
                      "peg",
                      "gungame",
                      "tontine",
                      "crash",
                      "potato",
                      "grid",
                      "wolf",
                      "bribe",
                      "mint",
                      "keys"
                    ]
                  },
                  "chain": {
                    "type": [
                      "string",
                      "integer"
                    ],
                    "description": "Chain id or key, e.g. 8453 or \"base\"."
                  },
                  "name": {
                    "type": "string",
                    "description": "Token / game name."
                  },
                  "symbol": {
                    "type": "string",
                    "description": "Ticker. Required unless the archetype is name-only."
                  },
                  "params": {
                    "type": "object",
                    "description": "Knob values keyed by field id; omitted knobs take their default."
                  },
                  "from": {
                    "type": "string",
                    "description": "Signer address. Required for /api/v1 simulation (eth_call needs a sender)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — retry with an X-PAYMENT header per x402"
          }
        }
      }
    }
  }
}