DIM · Dagon Inference Marketplace

The onboarding self-check

Open Sell (/providers/onboard) in the app. It walks through six steps and ends with a self-check of your gateway's signed output. Nothing you type there leaves the page except the check requests themselves, and the page only ever asks for public keys.

Fixture builds stay at Preview

What the self-check can prove depends on how the app was built. Only a build with VITE_MARKETPLACE_DATA=http (a live-data build) fetches your gateway; every other build, including the public demo site whose header reads Demo: fixture data on devnet, not live, is a fixture build. In a fixture build:

  • The listing and capacity checks read the built-in fixture snapshot, never your gateway. The snapshot has no entry for your origin, so with nothing pasted the listing check fails with "This build cannot fetch your live gateway listing" and the other checks are blocked.
  • Listing, capacity and probe output you paste is verified locally against your draft.
  • The unpaid probe is the only request sent to your gateway, and only after the listing verifies. Its response is usually not readable from the browser (see below), so paste it as well.
  • Discovery is answered from the fixture snapshot, which cannot establish live discovery.

The route therefore stays at Preview, however good your pasted output is: Published and Verified need the listing and capacity fetched from your gateway by the browser, and Discoverable needs a pinned live indexer. The readiness ladder and the CORS workaround below apply only to a live-data build; Discoverable also needs VITE_DISCOVERY_API_URL and the indexer's pinned key in VITE_IM_INDEXER_KEY.

The six steps

Step What you enter What it produces
1. Install gateway Model server URL and served model name, gateway port, Solana RPC URL; Bun or Docker The vllm serve command, the gateway start command, and key-generation commands
2. Model and serving stack Family, weights revision, quantization, engine and version, GPU and count, max concurrency, public gateway origin, regions, ZDR The model identity and policy
3. Price schedule Four rates in USDC per million tokens (up to 6 decimals), fee and minimum Hold in µUSDC, first-token limit in ms The schedule, with a live charge preview and a comparison against listed routes
4. Payout and keys Payout token account, seller ID (listing public key), optional settler and receipt public keys, key epoch The keys section of the config
5. Publish listing Nothing new gateway.json, an unsigned preview of the listing, and the derived model_identity_id, schedule_digest and route_id
6. Self-check Optionally, pasted curl output Five checks and the readiness ladder

The derived IDs are computed with the same @im/protocol functions buyers and indexers use, so they match what your gateway will publish byte for byte. The route nonce is generated in the browser; regenerate it only before publishing.

The generated config writes the ledger to the SQLite database data/ledger.sqlite, next to the config. Configs generated before this change used data/ledger.jsonl; that file is also a SQLite database, so keep the path a running gateway already uses rather than renaming it, because the ledger holds unsettled vouchers.

The five checks

Check Question it answers Passes when
Listing fetch Is there a listing envelope to check? /.well-known/inference-marketplace.json returns {doc, sig, key} with v: 1, a seller_id and at least one route.
Signature and digests Does this exact listing verify under your seller key and match your draft? The signature verifies under the seller ID from step 4; seller_id equals the signing key; receipt_keys is well formed and binds the route's key_epoch to its receipt_key; model_identity_id, schedule_digest and route_id recompute; identity, schedule (ignoring effective_from), policy, payout account, nonce, key epoch and any declared settler or receipt key equal your draft.
Capacity endpoint Is a signed, fresh capacity report served for this route? A report for the route verifies under the listing key, is less than 120 s old and not from the future, has consistent counts, and does not advertise more than the listed max_concurrency. Over 90 s old is a warning.
Unpaid test probe Does the gateway refuse a request that carries no payment Hold? POST /v1/chat/completions without a Hold returns 402 with malformed_hold. A 2xx fails: your public URL reaches a model server directly.
Indexer discovery Does the pinned live indexer return and attest to this exact seller route? The indexer's signed response verifies under its pinned key, and its copy of your listing and route equals what your gateway serves.

Each later check is blocked until the one it depends on passes: a listing that fails to verify blocks capacity, probe and discovery.

The readiness ladder

Rung Evidence required
Preview None: generated from your answers.
Published The listing fetched from your public gateway verifies under your seller key and matches this route.
Verified That listing plus a fresh signed capacity report from the same gateway.
Discoverable A verified response for this exact route from the pinned live indexer.

Each rung is a separate claim with its own evidence. A pass is evidence at one moment only: capacity is fresh for 120 s.

Running it against your gateway

Live checks run in your browser, send no credentials, follow no redirects and give up after 8 seconds or 256 KiB. The probe carries no payment, so it cannot spend anything. Private-network origins (loopback, RFC 1918, link-local, .local, dotless hosts) are never contacted unless you switch on local development in step 2.

In a live-data build, the reference gateway lets the marketplace read its public documents, the listing and the capacity report, cross-origin, and also its receipt lookup. It answers GET and its preflight with Access-Control-Allow-Origin set to the requesting origin when that origin is on its corsOrigins allow-list. By default the list holds https://marketplace.dagon.so, https://dim-marketplace.pages.dev, https://*.dim-marketplace.pages.dev and the local dev and preview servers on ports 5173 and 4173 (configuration). It never sends credentials headers, and the chat and voucher endpoints send no CORS headers. So the listing, signature and capacity checks run live, but the unpaid test probe cannot be read from the browser, and neither can a gateway older than this change. For those, for a proxy that strips the headers, and in a fixture build:

  1. Paste mode. Run these from any machine that can reach the gateway and paste each output into the matching box:

    curl -s https://gpu.example.com/.well-known/inference-marketplace.json
    curl -s https://gpu.example.com/im/v1/capacity
    curl -si -X POST https://gpu.example.com/v1/chat/completions -H 'content-type: application/json' -d '{"model":"YOUR_MODEL","messages":[{"role":"user","content":"ping"}],"max_tokens":1}'

    Pasted signatures and timestamps are verified locally, but a valid paste does not prove your gateway serves that output now, and pasted probe text is unsigned.

  2. Older gateways only: allow cross-origin reads of the two public documents at your edge (this helps only a live-data build). Both are public signed documents, so a wildcard is safe. Remove these lines once the gateway sends its own header, because two Access-Control-Allow-Origin values make the browser reject the response. In the nginx server block from gateway setup:

    location = /.well-known/inference-marketplace.json {
        add_header Access-Control-Allow-Origin "*" always;
        proxy_pass http://127.0.0.1:8787;
    }
    location = /im/v1/capacity {
        add_header Access-Control-Allow-Origin "*" always;
        proxy_pass http://127.0.0.1:8787;
    }

    The probe's response stays unreadable from another origin either way: this covers only the two documents, so paste the probe output.

Prototype demo

Switch the check mode to Prototype demo to see what each failure looks like without a gateway. It signs a listing with a throwaway key and can inject one fault at a time: schedule digest mismatch, tampered after signing, stale capacity report, unreachable capacity endpoint, wrong endpoint in listing, or a receipt key missing from receipt_keys. Prototype runs never advance past Preview and are never indexed.

When discovery fails

There is no registration endpoint. Each indexer polls only the sellers its operator has pinned. If the discovery check says the pinned indexer does not return your route, ask that indexer's operator to add your origin and seller ID, then keep capacity fresh. The verifier docs describe the operator side.

In a live-data build the browser also reads the indexer directly. The reference discovery API sends no CORS headers yet, so unless the app and the indexer share an origin, or a proxy in front of the indexer adds the header, the check fails with "Indexer lookup failed".