liqproof 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +536 -2
  3. package/bugs/README.md +144 -0
  4. package/bugs/coin-gecko-liquidity-report.md +283 -0
  5. package/bugs/collect-ds-aggregate.mjs +213 -0
  6. package/bugs/collect-evidence.mjs +458 -0
  7. package/bugs/collect-gt-aggregate.mjs +215 -0
  8. package/bugs/collect-raw-rpc.mjs +165 -0
  9. package/bugs/collect-sweep-context.mjs +162 -0
  10. package/bugs/dexscreener-fake-liquidity-report.md +310 -0
  11. package/bugs/evidence/aggregator-liquidity-claims.json +648 -0
  12. package/bugs/evidence/aggregator-liquidity-claims.md +103 -0
  13. package/bugs/evidence/bat-native-pool-drained.json +136 -0
  14. package/bugs/evidence/bat-native-pool-drained.md +51 -0
  15. package/bugs/evidence/chz-impersonator-pool-drained.json +136 -0
  16. package/bugs/evidence/chz-impersonator-pool-drained.md +51 -0
  17. package/bugs/evidence/gt-stale-reserve-after-drain.json +141 -0
  18. package/bugs/evidence/gt-stale-reserve-after-drain.md +31 -0
  19. package/bugs/evidence/raw-rpc-transcript.json +683 -0
  20. package/bugs/evidence/raw-rpc-transcript.md +308 -0
  21. package/bugs/evidence/sweep-context.json +325 -0
  22. package/bugs/evidence/sweep-context.md +55 -0
  23. package/bugs/evidence/verified-aggregate.json +526 -0
  24. package/bugs/evidence/verified-aggregate.md +24 -0
  25. package/bugs/evidence/verified-ds-liquidity-usd.json +1197 -0
  26. package/bugs/evidence/verified-ds-liquidity-usd.md +250 -0
  27. package/bugs/evidence/verified-gt-reserve-in-usd.json +1002 -0
  28. package/bugs/evidence/verified-gt-reserve-in-usd.md +218 -0
  29. package/bugs/fix-bundle-titles.mjs +72 -0
  30. package/bugs/geckoterminal-stale-reserve-after-drain.md +137 -0
  31. package/data/dataset-summary.md +103 -0
  32. package/data/impersonators.json +12888 -0
  33. package/data/verified-impersonators.json +725 -0
  34. package/data/wallets.json +23 -0
  35. package/dist/base58.js +70 -0
  36. package/dist/base58.js.map +1 -0
  37. package/dist/canonical.js +372 -0
  38. package/dist/canonical.js.map +1 -0
  39. package/dist/cli.js +830 -0
  40. package/dist/cli.js.map +1 -0
  41. package/dist/curve.js +255 -0
  42. package/dist/curve.js.map +1 -0
  43. package/dist/dashboard.js +485 -0
  44. package/dist/dashboard.js.map +1 -0
  45. package/dist/keccak.js +197 -0
  46. package/dist/keccak.js.map +1 -0
  47. package/dist/mcp.js +604 -0
  48. package/dist/mcp.js.map +1 -0
  49. package/dist/operator.js +180 -0
  50. package/dist/operator.js.map +1 -0
  51. package/dist/pda.js +86 -0
  52. package/dist/pda.js.map +1 -0
  53. package/dist/receipt.js +897 -0
  54. package/dist/receipt.js.map +1 -0
  55. package/dist/render.js +335 -0
  56. package/dist/render.js.map +1 -0
  57. package/dist/rpc.js +377 -0
  58. package/dist/rpc.js.map +1 -0
  59. package/dist/sources.js +599 -0
  60. package/dist/sources.js.map +1 -0
  61. package/dist/store.js +330 -0
  62. package/dist/store.js.map +1 -0
  63. package/dist/tokenmeta.js +424 -0
  64. package/dist/tokenmeta.js.map +1 -0
  65. package/dist/util.js +273 -0
  66. package/dist/util.js.map +1 -0
  67. package/dist/vaults.js +510 -0
  68. package/dist/vaults.js.map +1 -0
  69. package/dist/wallet.js +404 -0
  70. package/dist/wallet.js.map +1 -0
  71. package/dist/warnings.js +41 -0
  72. package/dist/warnings.js.map +1 -0
  73. package/dist/worker.js +857 -0
  74. package/dist/worker.js.map +1 -0
  75. package/dist/x402.js +549 -0
  76. package/dist/x402.js.map +1 -0
  77. package/docs/HACKATHON-SUBMISSION.md +264 -0
  78. package/docs/liqproof-plan.md +221 -0
  79. package/docs/llms.txt +32 -0
  80. package/docs/mcp-registry.md +165 -0
  81. package/docs/screenshots/01-dashboard.png +0 -0
  82. package/docs/screenshots/02-receipt-drained.png +0 -0
  83. package/docs/screenshots/03-receipt-impersonator.png +0 -0
  84. package/docs/screenshots/04-receipt-canonical.png +0 -0
  85. package/docs/x402-pricing.md +171 -0
  86. package/docs/zero-xyz.md +250 -0
  87. package/out/6eftxVbSAunVEoxUWdGhPdxg5UdsJ8Wkwy5w5YFuxouw.json +1171 -0
  88. package/out/6eftxVbSAunVEoxUWdGhPdxg5UdsJ8Wkwy5w5YFuxouw.md +52 -0
  89. package/out/6eftxVbSAunVEoxUWdGhPdxg5UdsJ8Wkwy5w5YFuxouw.svg +25 -0
  90. package/out/BTNiaZb6HaEFWeEtND4SXtZ7T6mgtDwSryHTAj6PuPyp.json +3975 -0
  91. package/out/BTNiaZb6HaEFWeEtND4SXtZ7T6mgtDwSryHTAj6PuPyp.md +90 -0
  92. package/out/BTNiaZb6HaEFWeEtND4SXtZ7T6mgtDwSryHTAj6PuPyp.svg +25 -0
  93. package/out/ENGkoidj2jNs73A7GZuseVmnkRg6EVF9tDtViwPz8o85.json +1446 -0
  94. package/out/ENGkoidj2jNs73A7GZuseVmnkRg6EVF9tDtViwPz8o85.md +66 -0
  95. package/out/ENGkoidj2jNs73A7GZuseVmnkRg6EVF9tDtViwPz8o85.svg +25 -0
  96. package/out/dataset.csv +67 -0
  97. package/out/impersonation-table.md +156 -0
  98. package/out/index.html +1179 -0
  99. package/package.json +78 -4
  100. package/scripts/assert-no-canonical-accusations.mjs +193 -0
  101. package/scripts/backfill.mjs +1063 -0
  102. package/scripts/bundle-evidence.mjs +237 -0
  103. package/scripts/bundle-stale-claim.mjs +417 -0
  104. package/scripts/capture-bch-evidence.mjs +58 -0
  105. package/scripts/check-orientation-fix.mjs +40 -0
  106. package/scripts/check-wallet.mjs +54 -0
  107. package/scripts/daily-refresh.mjs +451 -0
  108. package/scripts/decode-clmm-vaults.mjs +180 -0
  109. package/scripts/falsifiability.mjs +263 -0
  110. package/scripts/impersonator-mining.mjs +156 -0
  111. package/scripts/inspect-matches.mjs +73 -0
  112. package/scripts/operator-sweep.mjs +252 -0
  113. package/scripts/publish-release.mjs +248 -0
  114. package/scripts/refresh-store.mjs +78 -0
  115. package/scripts/survival-miner.mjs +951 -0
  116. package/scripts/test-keccak.mjs +103 -0
  117. package/scripts/verify-bch-1p95b.mjs +124 -0
  118. package/scripts/verify-clmm-1p95b.mjs +127 -0
  119. package/scripts/verify-clmm-control.mjs +84 -0
  120. package/scripts/verify-impersonators.mjs +138 -0
  121. package/scripts/verify-raw.mjs +110 -0
  122. package/scripts/verify-raw2.mjs +99 -0
  123. package/server.json +34 -0
  124. package/src/base58.ts +68 -0
  125. package/src/canonical.ts +447 -0
  126. package/src/cli.ts +941 -0
  127. package/src/curve.ts +349 -0
  128. package/src/dashboard.ts +504 -0
  129. package/src/keccak.ts +228 -0
  130. package/src/mcp.ts +735 -0
  131. package/src/operator.ts +219 -0
  132. package/src/receipt.ts +1219 -0
  133. package/src/render.ts +396 -0
  134. package/src/rpc.ts +435 -0
  135. package/src/sources.ts +714 -0
  136. package/src/store.ts +428 -0
  137. package/src/tokenmeta.ts +460 -0
  138. package/src/util.ts +276 -0
  139. package/src/vaults.ts +574 -0
  140. package/src/wallet.ts +459 -0
  141. package/src/warnings.ts +40 -0
  142. package/src/worker.ts +1086 -0
  143. package/src/x402.ts +717 -0
@@ -0,0 +1,165 @@
1
+ # Publishing LIQPROOF to the MCP Registry
2
+
3
+ The registry entry is one file: `server.json`, at the root of the repository
4
+ (or in a `mcp/` subdirectory, if you publish a monorepo). It is validated
5
+ against the official schema:
6
+
7
+ ```
8
+ https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json
9
+ ```
10
+
11
+ ---
12
+
13
+ ## `server.json`
14
+
15
+ **It exists.** The real file is [`server.json`](../server.json) at the
16
+ repository root — that is the file the publisher CLI reads; this document only
17
+ explains it.
18
+
19
+ ```json
20
+ {
21
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
22
+ "name": "io.github.aihbusiness77-pixel/liqproof",
23
+ "title": "LIQPROOF",
24
+ "description": "On-chain liquidity receipts: prove claimed liquidity against real pool vault balances.",
25
+ "version": "0.1.0",
26
+ "repository": {
27
+ "url": "https://github.com/aihbusiness77-pixel/liqproof",
28
+ "source": "github"
29
+ },
30
+ "websiteUrl": "https://aihbusiness77-pixel.github.io/liqproof/",
31
+ "packages": [
32
+ {
33
+ "registryType": "npm",
34
+ "registryBaseUrl": "https://registry.npmjs.org",
35
+ "identifier": "liqproof",
36
+ "version": "0.1.0",
37
+ "transport": {
38
+ "type": "stdio"
39
+ }
40
+ }
41
+ ],
42
+ "_meta": {
43
+ "io.modelcontextprotocol.registry/publisher-provided": {
44
+ "payment": {
45
+ "protocol": "x402",
46
+ "version": 2,
47
+ "network": "solana",
48
+ "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
49
+ "freeTierPerDay": 25
50
+ }
51
+ }
52
+ }
53
+ }
54
+ ```
55
+
56
+ > **There is no `remotes[]` entry yet, on purpose.** A registry entry that
57
+ > points at a URL which answers 404 is worse than no entry at all. The remote
58
+ > is added the moment the Worker is deployed and answers `POST /mcp` with a
59
+ > valid `initialize` response.
60
+
61
+ ### Field-by-field, against the schema
62
+
63
+ | Field | Required | Why this value |
64
+ |---|---|---|
65
+ | `$schema` | no | Points at the official schema so editors validate it. |
66
+ | `name` | **yes** | Reverse-DNS. `io.github.<owner>/<repo>` is the convention for a GitHub-published server. The schema's pattern is `^[a-zA-Z0-9.-]+/[a-zA-Z0-9._-]+$` — exactly one slash. |
67
+ | `description` | **yes** | 1–100 characters. **86 here** — the schema rejects anything longer, so keep it short and say what the server *does*, not how it does. |
68
+ | `version` | **yes** | SemVer, no ranges. `latest` is rejected. |
69
+ | `title` | no | Display name. |
70
+ | `repository` | no | `url` + `source` (`github`). The registry uses it for ownership verification of the npm package. |
71
+ | `websiteUrl` | no | The public site (GitHub Pages) — a real URL that answers 200 today. |
72
+ | `packages[]` | no | The npm package, started over stdio. `registryType`, `identifier` and `transport` are required per package; `version` is optional but a range is rejected. |
73
+ | `remotes[]` | no | The hosted Worker, over streamable HTTP. **Added only after the Worker is live.** |
74
+ | `_meta` | no | Reverse-DNS extension namespace. `io.modelcontextprotocol.registry/publisher-provided` is the registry's own slot for publisher metadata — the x402 payment configuration lives there so it does not pollute the schema. |
75
+
76
+ ### The npm ownership proof
77
+
78
+ The registry verifies that the npm package really belongs to this repository.
79
+ Two things make that work:
80
+
81
+ 1. `package.json` carries `"mcpName": "io.github.aihbusiness77-pixel/liqproof"`
82
+ — the same name as `server.json`.
83
+ 2. The package is published to npm **first**, at the version `server.json`
84
+ declares. A published version cannot be edited afterwards, so the order is
85
+ fixed: **npm → registry**.
86
+
87
+ ### The remote endpoint (pending)
88
+
89
+ ```json
90
+ { "type": "streamable-http", "url": "https://<worker>.<subdomain>.workers.dev/mcp" }
91
+ ```
92
+
93
+ The schema's `StreamableHttpTransport` requires `type` (`"streamable-http"`)
94
+ and `url` (must match `^https?://[^\s]+$`). Optional `headers` is an array of
95
+ `KeyValueInput` — use it only if the endpoint ever needs a static header.
96
+
97
+ > **Status: transport specified, endpoint not deployed.** The Worker currently
98
+ > serves the receipt API (`/receipt/{mint}`, `/health`, `/openapi.json`). The
99
+ > `/mcp` endpoint needs a streamable-HTTP transport in `src/mcp.ts`, which
100
+ > today speaks JSON-RPC over stdio only. The exact change is specified in
101
+ > [`docs/OPEN-REQUESTS.md`](./OPEN-REQUESTS.md) — including the JSON-RPC
102
+ > framing and the function signatures — so it can be implemented without a
103
+ > follow-up question.
104
+
105
+ ---
106
+
107
+ ## README blurb
108
+
109
+ Add this to the repository README, so the registry's link lands somewhere
110
+ useful:
111
+
112
+ ```markdown
113
+ ## MCP
114
+
115
+ LIQPROOF exposes the same receipts over the Model Context Protocol.
116
+
117
+ **Local (stdio):**
118
+
119
+ ```bash
120
+ npx -y liqproof mcp
121
+ ```
122
+
123
+ The server answers four questions about any Solana mint:
124
+
125
+ - `verify_token` — what the market claimed, what is actually deposited in
126
+ the pool vault, the deposit coverage, the token's on-chain identity, and
127
+ the verdict.
128
+ - `liquidity_timeline` — the reconstructed liquidity curve and the drain event.
129
+ - `find_fake_liquidity` — mine new pools from the free discovery feeds and
130
+ audit them.
131
+ - `survival_stats` — survival statistics from the local store.
132
+
133
+ Everything is read-only. No gas, no paid APIs, no chain mutation.
134
+ ```
135
+
136
+ ---
137
+
138
+ ## Publishing checklist
139
+
140
+ 1. `server.json` is at the repository root and validates against the schema.
141
+ 2. `npm publish` has run for the version in `packages[].version` — the
142
+ registry verifies that the published package and the repository agree.
143
+ 3. `package.json` carries the same `mcpName` as `server.json`.
144
+ 4. `description` is ≤ 100 characters.
145
+ 5. `version` is a concrete SemVer string, not a range and not `latest`.
146
+ 6. (Optional, after the Worker is live) The remote URL answers `POST /mcp`
147
+ with a valid `initialize` response — and only then is `remotes[]` added.
148
+
149
+ The registry's publishing flow is `mcp-publisher` (or
150
+ `npx @modelcontextprotocol/publisher`); it reads `server.json`, checks the
151
+ schema, and either creates the entry or prints the `_meta` block you need to
152
+ paste into the GitHub release notes.
153
+
154
+ ```
155
+ mcp-publisher init # scaffold server.json
156
+ mcp-publisher login github # GitHub OAuth — this proves the namespace
157
+ mcp-publisher publish # validate + publish
158
+ mcp-publisher publish --dry-run # validate without publishing
159
+ ```
160
+
161
+ To check that the entry is live:
162
+
163
+ ```
164
+ curl "https://registry.modelcontextprotocol.io/v0.1/servers?search=liqproof"
165
+ ```
@@ -0,0 +1,171 @@
1
+ # LIQPROOF pricing
2
+
3
+ **Everything below is paid in USDC on Solana, over x402 v2.**
4
+ No accounts, no subscriptions, no card, no API keys.
5
+
6
+ ---
7
+
8
+ ## The ladder
9
+
10
+ | Tier | Price | What you get |
11
+ |---|---|---|
12
+ | **Free** | **$0.00** | Up to **25 receipts per client per UTC day**. No payment header, no wallet, no friction. |
13
+ | **`receipt`** | **$0.25** | One liquidity receipt for one mint — JSON. |
14
+ | **`receipt+timeline`** | **$2.00** | One receipt **plus** the full reconstructed liquidity timeline (the on-chain curve, the drain event, the drain transaction). |
15
+ | **`batch`** | **$5.00** | Up to **30 mints**, receipt each, in one request. |
16
+ | **`dataset-snapshot`** | **$25.00** | A CSV snapshot of the whole audited dataset (one row per token: claim, deposit, coverage, self-denominated share, price impact, first/last seen). |
17
+
18
+ ### Why the free tier is 25
19
+
20
+ A paid tool nobody can evaluate is a dead tool. Twenty-five receipts a day is
21
+ enough for a prospective buyer to test the product on the tokens they care
22
+ about, and small enough that a scraper cannot extract the whole market for
23
+ free. The counter is per client, per UTC day, and it survives restarts: the
24
+ local server keeps it in the project's own on-disk cache, the Worker keeps it
25
+ in a Cloudflare KV binding.
26
+
27
+ ### Why `receipt+timeline` costs eight times more than `receipt`
28
+
29
+ Because it costs us eight times more. The plain receipt is a handful of RPC
30
+ calls; the timeline is a bisect over the pool's transaction history, bounded
31
+ by the free public RPC's ten `getTransaction` calls per ten seconds. That
32
+ work is the expensive part, and it is the part a buyer cannot reproduce
33
+ without waiting minutes for a rate limiter.
34
+
35
+ ---
36
+
37
+ ## Honest unit economics
38
+
39
+ We would rather lose a sale than pretend. Here is what one receipt actually
40
+ costs us:
41
+
42
+ | | |
43
+ |---|---|
44
+ | **Gas** | **$0.00** — we never submit anything to the chain. |
45
+ | **RPC calls** | ~2–5 free public RPC calls for a plain receipt; ~15–30 for a full timeline (rate-limited to ~10 `getTransaction` calls / 10 s). |
46
+ | **Aggregator calls** | 2–4 free-tier HTTP calls (GeckoTerminal, DexScreener, CoinGecko public). |
47
+ | **Paid APIs** | **none.** No Helius, no QuickNode, no Birdeye, no Nansen, no indexer. |
48
+ | **Hosting** | **$0.00** — Cloudflare Workers free tier, Cloudflare KV free tier, GitHub Pages, npm. |
49
+ | **Compute** | ~10 ms of CPU per cached receipt. |
50
+ | **Payment fees** | whatever the facilitator charges, currently **$0.00** on the free facilitators we use. |
51
+
52
+ **So what are we charging for?**
53
+
54
+ Not compute. We are charging for the **artifact, the evidence and the dataset**:
55
+
56
+ 1. **The artifact** — a receipt is a falsifiable, citable document with a
57
+ verdict, a methodology section, and links to every account it read. That
58
+ is a thing you can put in a report, a post-mortem, a lawsuit, or an
59
+ investment committee memo. It is not a number we looked up.
60
+ 2. **The evidence** — the vault addresses, the token-account balances, the
61
+ drain transaction, the slots, the timestamps. Anyone can re-derive the
62
+ numbers; almost nobody will, and the ones who do should not have to wait
63
+ behind our rate limiter to do it.
64
+ 3. **The dataset** — the CSV snapshot is the whole market audited, with the
65
+ coverage column that makes the traps sortable. That is a research
66
+ artifact, and research artifacts are what people pay for.
67
+ 4. **The liability** — a receipt that says `FAKE_LIQUIDITY` is an accusation.
68
+ We publish the evidence so the accusation can be checked, and we keep the
69
+ audit trail so it can be re-checked later.
70
+
71
+ If you think a receipt is worth less than a quarter, take the free tier.
72
+
73
+ ---
74
+
75
+ ## What the server does and does not do
76
+
77
+ ```
78
+ client ──GET /receipt/<mint>──▶ server
79
+ │
80
+ ├─ under the free allowance? → 200, receipt, no payment
81
+ ├─ PAYMENT-SIGNATURE present? → facilitator /verify ─▶ 200 or 402
82
+ └─ otherwise → 402 + x402 challenge
83
+ ```
84
+
85
+ **The server never calls `/settle`.** It only calls the facilitator's
86
+ `/verify` endpoint, which the x402 specification defines as read-only: it
87
+ validates payment state and must not commit payment state or write onchain
88
+ state. The client settles its own payment; the server only reads the proof.
89
+
90
+ There is no wallet, no key material and no transaction builder anywhere in
91
+ this codebase. `liqproof verify` greps every file under `src/` for those
92
+ paths and fails the build if it finds one.
93
+
94
+ ---
95
+
96
+ ## Configuration
97
+
98
+ | Variable | CLI flag | Default | Meaning |
99
+ |---|---|---|---|
100
+ | `PAY_TO` | `--payto` | *(none)* | Solana address that receives USDC. Without it, paid access answers `503` and the free tier still works. |
101
+ | `X402_FACILITATOR` | `--facilitator` | `https://dexter.cash/facilitator`, then `https://x402.dexter.cash`, then `https://x402.org/facilitator` | Facilitator base URL(s), tried in order. All free, all keyless. |
102
+ | `X402_PRICE_USD` | `--price` | `0.25` | Price of one receipt, in US dollars. |
103
+ | `X402_FREE_TIER` | `--free-tier` | `25` | Free receipts per client per UTC day. |
104
+ | `X402_NETWORK` | `--network` | `solana` | `solana` or `solana-devnet`. |
105
+ | `X402_API_KEY` | — | *(none)* | Optional facilitator API key (Coinbase CDP). Free tier, but not free of an account. |
106
+ | `X402_MAX_TX` | `--max-tx` | `120` | How many transactions the liquidity curve may scan. |
107
+
108
+ CLI environment variables: `LIQPROOF_PAYTO`, `LIQPROOF_FACILITATOR`,
109
+ `LIQPROOF_PRICE_USD`, `LIQPROOF_FREE_TIER`, `LIQPROOF_NETWORK`,
110
+ `LIQPROOF_MAX_TX`, `LIQPROOF_PORT`, `LIQPROOF_HOST`.
111
+
112
+ ---
113
+
114
+ ## Paying, by hand
115
+
116
+ The challenge the server sends is a plain JSON document (and the same JSON,
117
+ base64-encoded, in the `PAYMENT-REQUIRED` response header):
118
+
119
+ ```json
120
+ {
121
+ "x402Version": 2,
122
+ "error": "PAYMENT-SIGNATURE header is required",
123
+ "resource": {
124
+ "url": "https://liqproof.example.workers.dev/receipt/BTNiaZb6HaEFWeEtND4SXtZ7T6mgtDwSryHTAj6PuPyp",
125
+ "description": "LIQPROOF liquidity receipt for BTNiaZb6HaEFWeEtND4SXtZ7T6mgtDwSryHTAj6PuPyp",
126
+ "mimeType": "application/json"
127
+ },
128
+ "accepts": [
129
+ {
130
+ "scheme": "exact",
131
+ "network": "solana",
132
+ "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
133
+ "amount": "250000",
134
+ "payTo": "<your address>",
135
+ "maxTimeoutSeconds": 300,
136
+ "description": "LIQPROOF liquidity receipt for BTNiaZb6HaEFWeEtND4SXtZ7T6mgtDwSryHTAj6PuPyp",
137
+ "extra": {
138
+ "name": "USDC",
139
+ "version": "2",
140
+ "decimals": 6,
141
+ "networkCaip2": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"
142
+ }
143
+ }
144
+ ]
145
+ }
146
+ ```
147
+
148
+ `amount` is in **atomic units of USDC** — 6 decimals — so `250000` is $0.25.
149
+ `asset` is the USDC mint on the network named in `network`.
150
+
151
+ Pay it, then retry the same request with the payment payload in the
152
+ `PAYMENT-SIGNATURE` header (base64-encoded JSON). The legacy `X-PAYMENT`
153
+ header is accepted too.
154
+
155
+ To see the exact challenge for a mint without starting a server:
156
+
157
+ ```bash
158
+ liqproof x402 <mint> --payto=<your address>
159
+ ```
160
+
161
+ stdout is the challenge JSON and nothing else, so it pipes straight into
162
+ `jq`. The base64 header value goes to stderr.
163
+
164
+ ---
165
+
166
+ ## See also
167
+
168
+ - [`docs/mcp-registry.md`](./mcp-registry.md) — publishing the MCP server.
169
+ - [`docs/zero-xyz.md`](./zero-xyz.md) — the tool listing.
170
+ - [`docs/llms.txt`](./llms.txt) — agent-facing discovery.
171
+ - [`deploy/README.md`](../deploy/README.md) — the $0 deployment.
@@ -0,0 +1,250 @@
1
+ ---
2
+ title: LIQPROOF
3
+ slug: liqproof
4
+ one_liner: On-chain liquidity receipts — prove fake liquidity with signed on-chain evidence.
5
+ categories:
6
+ - crypto
7
+ - finance
8
+ - data
9
+ - developer-tools
10
+ tags:
11
+ - solana
12
+ - liquidity
13
+ - due-diligence
14
+ - on-chain-data
15
+ - x402
16
+ - mcp
17
+ - read-only
18
+ - zero-cost
19
+ pricing:
20
+ model: x402
21
+ currency: USDC
22
+ network: solana
23
+ free_tier: 25 receipts/day
24
+ tiers:
25
+ - name: receipt
26
+ price: 0.25
27
+ unit: USD
28
+ description: One liquidity receipt for one mint (JSON).
29
+ - name: receipt+timeline
30
+ price: 2.00
31
+ unit: USD
32
+ description: One receipt plus the reconstructed liquidity timeline and drain event.
33
+ - name: batch
34
+ price: 5.00
35
+ unit: USD
36
+ description: Up to 30 mints, receipt each, in one request.
37
+ - name: dataset-snapshot
38
+ price: 25.00
39
+ unit: USD
40
+ description: CSV snapshot of the whole audited dataset.
41
+ homepage: https://liqproof.example.workers.dev
42
+ repository: https://github.com/aihbusiness77-pixel/liqproof
43
+ license: MIT
44
+ pricing_url: https://github.com/aihbusiness77-pixel/liqproof/blob/main/docs/x402-pricing.md
45
+ ---
46
+
47
+ # LIQPROOF
48
+
49
+ ## One-liner
50
+
51
+ **On-chain liquidity receipts — prove fake liquidity with signed on-chain evidence.**
52
+
53
+ ## Long description
54
+
55
+ A pool can claim **$1,914,000,000** of liquidity. Its vault holds
56
+ **$0.000001**. The money was pulled out in one transaction, **27 minutes**
57
+ after the pool was created — and the aggregator still shows the number.
58
+
59
+ A second pool can claim **$136,104,320**. LIQPROOF reads the vault on
60
+ Solana mainnet and finds **$27.64** of real USDC. The receipt says so, links
61
+ to the transaction, and cannot be edited.
62
+
63
+ LIQPROOF is a read-only audit tool for Solana liquidity. For any token mint
64
+ it answers four questions with on-chain evidence:
65
+
66
+ 1. **What did the market claim?** The aggregator-reported liquidity, in USD.
67
+ 2. **What is actually there?** The pool vault's token-account balance, read
68
+ straight from the chain — not from the same source that made the claim.
69
+ 3. **When did it change?** A liquidity curve reconstructed from
70
+ `preTokenBalances`/`postTokenBalances` in transaction metadata, with the
71
+ drain event and the drain transaction identified.
72
+ 4. **Can you really trade it?** A live Jupiter quote and its price impact.
73
+
74
+ The headline metric is **deposit coverage**:
75
+
76
+ ```
77
+ coverage = deposited USD / claimed USD
78
+ ```
79
+
80
+ It is falsifiable, timestampable, and impossible to fake without actually
81
+ depositing the money. It needs no account, no API key and no paid indexer.
82
+
83
+ **Cost:** $0 infrastructure. No gas, no paid APIs, no chain mutation, no
84
+ npm runtime dependencies. The server cannot move money — it only reads
85
+ public chain state and verifies other people's payments through a free
86
+ x402 facilitator.
87
+
88
+ **Verdicts:** `FAKE_LIQUIDITY`, `UNBACKED_LIQUIDITY`, `NO_DEPTH`, `DRAINED`,
89
+ `THIN`, `CONSISTENT`, `NO_ROUTE`, `UNKNOWN`.
90
+
91
+ A canonical token is never reported as fake. If LIQPROOF cannot resolve the
92
+ real token behind a name, it refuses to issue an accusation and says
93
+ `UNKNOWN` instead.
94
+
95
+ ## Pricing
96
+
97
+ | Tier | Price | What you get |
98
+ |---|---|---|
99
+ | **Free** | **$0.00** | Up to 25 receipts per client per UTC day. No payment, no wallet, no account. |
100
+ | **`receipt`** | **$0.25** | One liquidity receipt for one mint — JSON. |
101
+ | **`receipt+timeline`** | **$2.00** | One receipt plus the full reconstructed liquidity timeline and drain event. |
102
+ | **`batch`** | **$5.00** | Up to 30 mints, receipt each, in one request. |
103
+ | **`dataset-snapshot`** | **$25.00** | CSV snapshot of the whole audited dataset. |
104
+
105
+ Paid in USDC on Solana over **x402 v2**. See
106
+ [the full pricing and unit economics](https://github.com/aihbusiness77-pixel/liqproof/blob/main/docs/x402-pricing.md).
107
+
108
+ ## Categories
109
+
110
+ - **crypto** — Solana, SPL tokens, DEX pools
111
+ - **finance** — liquidity, market depth, tradeability
112
+ - **data** — reproducible on-chain datasets, CSV exports
113
+ - **developer-tools** — REST API, OpenAPI 3.1, MCP server, CLI
114
+
115
+ ## Tags
116
+
117
+ `solana` · `liquidity` · `due-diligence` · `on-chain-data` · `x402` · `mcp` ·
118
+ `read-only` · `zero-cost` · `market-manipulation` · `rug-detection` ·
119
+ `defi` · `usdc`
120
+
121
+ ---
122
+
123
+ ## Tool manifest
124
+
125
+ ```json
126
+ {
127
+ "name": "liqproof",
128
+ "version": "0.1.0",
129
+ "license": "MIT",
130
+ "runtime": {
131
+ "node": ">=22.5.0",
132
+ "install": "npm i -g liqproof"
133
+ },
134
+ "entrypoints": {
135
+ "cli": "liqproof",
136
+ "mcp_stdio": "liqproof mcp",
137
+ "http": "liqproof serve --port=8787",
138
+ "remote_http": "https://liqproof.example.workers.dev/receipt/{mint}"
139
+ },
140
+ "capabilities": [
141
+ "receipt",
142
+ "liquidity-timeline",
143
+ "pool-scan",
144
+ "survival-statistics",
145
+ "openapi",
146
+ "x402-payments"
147
+ ],
148
+ "constraints": {
149
+ "networkAccess": ["read-only"],
150
+ "chainMutation": false,
151
+ "gasCost": 0,
152
+ "paidApis": false,
153
+ "requiresApiKey": false,
154
+ "requiresWallet": false
155
+ },
156
+ "tags": ["solana", "liquidity", "due-diligence", "on-chain-data", "x402", "mcp"]
157
+ }
158
+ ```
159
+
160
+ ## MCP schema fragment
161
+
162
+ ```json
163
+ {
164
+ "mcpServers": {
165
+ "liqproof": {
166
+ "type": "http",
167
+ "url": "https://liqproof.example.workers.dev/mcp"
168
+ }
169
+ }
170
+ }
171
+ ```
172
+
173
+ Tools exposed by the MCP server:
174
+
175
+ | Tool | Input | Returns |
176
+ |---|---|---|
177
+ | `verify_token` | `mint`, `include_curve?` | claimed vs deposited USD, coverage, self-denominated %, price impact, on-chain identity, canonical/impostor status, verdict |
178
+ | `liquidity_timeline` | `mint`, `max_transactions?` | timestamped deposit/withdrawal events, peak deposit ever held |
179
+ | `find_fake_liquidity` | `limit?`, `min_claimed_usd?`, `include_curve?` | audited pools ranked by how badly the claim overstates the deposit |
180
+ | `survival_stats` | `days?` | fake vs consistent counts, average coverage, verdict breakdown |
181
+
182
+ The full MCP Registry `server.json` is in
183
+ [`docs/mcp-registry.md`](https://github.com/aihbusiness77-pixel/liqproof/blob/main/docs/mcp-registry.md).
184
+
185
+ ## Payment configuration
186
+
187
+ ```json
188
+ {
189
+ "protocol": "x402",
190
+ "version": 2,
191
+ "network": "solana",
192
+ "asset": {
193
+ "symbol": "USDC",
194
+ "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
195
+ "decimals": 6
196
+ },
197
+ "payTo": "<deployment address>",
198
+ "scheme": "exact",
199
+ "maxTimeoutSeconds": 300,
200
+ "challengeHeader": "payment-required",
201
+ "paymentHeader": "payment-signature",
202
+ "legacyPaymentHeader": "x-payment",
203
+ "freeTier": {
204
+ "receiptsPerDay": 25,
205
+ "perClient": true,
206
+ "resetsAt": "00:00 UTC"
207
+ },
208
+ "facilitators": [
209
+ "https://dexter.cash/facilitator",
210
+ "https://x402.dexter.cash",
211
+ "https://x402.org/facilitator"
212
+ ],
213
+ "settlement": {
214
+ "serverCalls": ["/verify"],
215
+ "serverNeverCalls": ["/settle"],
216
+ "note": "Read-only by construction. The client settles its own payment; the server only reads the proof."
217
+ },
218
+ "prices": {
219
+ "receipt": { "usd": 0.25, "atomic": "250000" },
220
+ "receipt+timeline": { "usd": 2.00, "atomic": "2000000" },
221
+ "batch": { "usd": 5.00, "atomic": "5000000", "maxMints": 30 },
222
+ "dataset-snapshot": { "usd": 25.00, "atomic": "25000000" }
223
+ }
224
+ }
225
+ ```
226
+
227
+ ## Try it
228
+
229
+ ```bash
230
+ # One receipt, free, straight from the chain.
231
+ liqproof receipt BTNiaZb6HaEFWeEtND4SXtZ7T6mgtDwSryHTAj6PuPyp
232
+
233
+ # Over HTTP, with the x402 challenge.
234
+ curl -i https://liqproof.example.workers.dev/receipt/BTNiaZb6HaEFWeEtND4SXtZ7T6mgtDwSryHTAj6PuPyp
235
+
236
+ # The exact 402 challenge, as JSON.
237
+ liqproof x402 BTNiaZb6HaEFWeEtND4SXtZ7T6mgtDwSryHTAj6PuPyp
238
+ ```
239
+
240
+ ## Honest limitations
241
+
242
+ - The coverage threshold is empirical. It separates every trap we have
243
+ measured from every honest pool we have measured, but it is a threshold,
244
+ not a proof.
245
+ - `THIN` is a fact, not an accusation: a constant-product AMM naturally
246
+ becomes one-sided as the price moves.
247
+ - The free public RPC rate-limits hard (`getTransaction` is 10 calls / 10 s).
248
+ A full timeline takes minutes; a plain receipt takes seconds.
249
+ - Aggregator-reported claims can be up to 15 minutes stale. The receipt
250
+ states when it was generated.