{"uid":"cap_7TFAlb0pjSbDhZpzt2EzL","slug":"provably-fair-weighted-lottery-resolver-75902a72","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:10000/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_juGzlgWZLKsAR8DVub_53","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":"Executes a provably-fair weighted lottery draw with configurable house fee, returning winner(s) selected proportionally by ticket stake amounts.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Community token raffle resolution","prompt":"We're running a token raffle for round 7 with a 3% house cut (300 bps). The participants and their stakes are: addr1abc:2000, addr2def:1000, addr3ghi:500. Can you resolve the weighted lottery and tell me who wins and what the payout is?"},{"title":"NFT giveaway with proportional entries","prompt":"I need to pick a provably-fair winner for our NFT giveaway in round 1. Contributors are walletA:5000, walletB:2000, walletC:3000, and we're taking a 500 bps platform fee. Run the draw and show me the winner and net prize amount."},{"title":"Verify fair outcome for DAO prize pool","prompt":"Our DAO held a prize pool draw — round 12, 200 bps fee — with entries: dao1:10000, dao2:7500, dao3:2500. Can you resolve the weighted lottery so we can prove to members the winner was chosen fairly?"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T13:14:14.887Z","isFirstParty":false}