# Provably-Fair Weighted Lottery Resolver

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

Performs a provably-fair weighted lottery draw from a set of ticket holders and calculates operator house fee, returning the winner selection without moving any funds.

## Facts

- Endpoint: GET https://pyfile-agent.taile3ff35.ts.net/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-e2d9340b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NMj9UQwq0KT_3rnto1yKI

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-e2d9340b
```

Example prompt: Run the provably-fair lottery draw for round 1 with tickets 0xAlice:100,0xBob:200,0xCarol:50 and a 5% house fee (500 bps) — tell me who wins and what the fee is.

## When to prefer this

Choose this endpoint when you need a single-call, data-only weighted lottery resolution that is provably fair and auditable via a committed server seed, without the endpoint itself holding or moving funds. It is ideal for operators who manage stakes externally but need a transparent, verifiable winner selection with house fee calculation built in.

## Known failure modes

- Invalid or malformed tickets parameter (missing address or amount)
- fee_bps out of valid range (e.g. >10000)
- Round ID not found or seed not yet committed
- Duplicate addresses in ticket list
- Zero or negative stake amounts
- Payment not received (x402 payment required)

## 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 by provably-fair weighted randomness, the breakdown of prize amounts after the house fee deduction, and verifiable proof data tied to the committed round seed so anyone can independently verify the draw was fair.

## 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-e2d9340b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pyfile-agent.taile3ff35.ts.net](https://www.zero.xyz/host/pyfile-agent.taile3ff35.ts.net/llms.txt)
