# Provably-Fair Weighted Lottery Resolver

> Provably-Fair Weighted Lottery Resolver is a paid API for AI agents from pyfile-agent.taile3ff35.ts.net:10000, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Executes a provably-fair weighted lottery draw with configurable house fee, returning winner(s) selected proportionally by ticket stake amounts.

## Facts

- Endpoint: GET https://pyfile-agent.taile3ff35.ts.net:10000/data/lottery/resolve
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/provably-fair-weighted-lottery-resolver-75902a72
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7TFAlb0pjSbDhZpzt2EzL

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability provably-fair-weighted-lottery-resolver-75902a72
```

Example prompt: Run a provably-fair weighted lottery draw for round 42 with a 5% house fee (500 bps) — tickets are: 0xAlice:1000, 0xBob:500, 0xCarol:250 — and tell me who wins and how much they get after the fee.

## When to prefer this

Choose this endpoint when you need a single, auditable, weighted-random winner selection from a set of participants with varying stake amounts, and you want the draw to be provably fair (verifiable via server seed commit). It computes the outcome only — it does not move funds, so it is safe to call without triggering any on-chain transaction. Prefer it over simple random selection when fairness auditability is required, and pair it with the sibling commit endpoint to pre-publish the hash before the draw.

## Known failure modes

- Missing or malformed tickets parameter (no address:amount pairs provided)
- Invalid fee_bps value (negative, non-integer, or exceeds 10000)
- Malformed address:amount format in ticket list (missing colon separator or non-numeric amounts)
- Zero total stake across all tickets causing division error
- Round ID not found or commit not yet issued for that round

## How this service works

Provably-fair weighted lottery draw + house fee. Operator holds stakes; this never moves funds. ?tickets=addr:amount,addr:amount&fee_bps=500&round=1

## Output

Returns the selected winner address chosen proportionally by stake weight, the prize amount after the house fee is deducted, the fee amount in the same units, and cryptographic proof data (server seed / round info) enabling independent verification of the draw's fairness.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   }
  },
  "output": {
   "type": "object"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/provably-fair-weighted-lottery-resolver-75902a72/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pyfile-agent.taile3ff35.ts.net:10000](https://www.zero.xyz/host/pyfile-agent.taile3ff35.ts.net%3A10000/llms.txt)
