{"uid":"cap_NMj9UQwq0KT_3rnto1yKI","slug":"provably-fair-weighted-lottery-resolver-e2d9340b","name":"Provably-Fair Weighted Lottery Resolver","description":"Provably-fair weighted lottery draw + house fee. Operator holds stakes; this never moves funds. ?tickets=addr:amount,addr:amount&fee_bps=500&round=1","url":"https://pyfile-agent.taile3ff35.ts.net/data/lottery/resolve","method":"GET","headers":{},"bodySchema":{"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"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_bvtKMe3AnYj9sL6WAidbU","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Crypto raffle prize distribution","prompt":"We have three participants in our NFT raffle for round 3: 0xAaa:500, 0xBbb:150, 0xCcc:350 — run the weighted lottery draw with a 300 bps house fee and tell me who wins."},{"title":"DAO treasury lottery round","prompt":"Our DAO is running treasury lottery round 7. The stakers are 0x111:1000,0x222:2000,0x333:500. Use a 200 bps fee. Who does the provably-fair draw pick as winner?"},{"title":"Gaming platform reward draw","prompt":"Resolve the lottery for round 42 on our gaming platform — tickets are 0xPlayer1:250,0xPlayer2:750 with a 500 basis point house fee. Give me the winner and the fee amount."}],"resultDescription":"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.","failureModes":["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)"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:48:07.649Z","isFirstParty":false}