# AIBTC Bounty Payment Verifier A deterministic verifier for one narrow task class: > An AIBTC bounty was paid to its selected winner by a confirmed sBTC transfer whose memo is bound to that bounty. ## Why This Is Useful A generic payment check can prove that money moved. This verifier proves the payment follows the native AIBTC bounty settlement rule: the board identifies the accepted winner and required reward; the Stacks transaction must pay that winner from the poster in sBTC with memo `BNTY:{bountyId}`. ## Mechanism And Trust Model The verifier performs deterministic re-execution against two public sources: 1. `aibtc.com/api/bounties/{id}` for the bounty, winner, required reward and recorded txid. 2. `api.hiro.so/extended/v1/tx/{txid}` for the confirmed Stacks transaction and SIP-010 transfer event. It returns `ACCEPT` only if: - The bounty is marked `paid` with an accepted winner. - The submitted claim exactly matches the board's txid, poster, winner, reward and bound memo. - The transaction is canonical and successful. - It calls the mainnet sBTC `transfer` contract. - Its memo contains the exact `BNTY:{bountyId}` bytes. - Its sBTC transfer event pays at least the reward from poster to winner. This is oracle-based verification, not zero knowledge. It trusts the public AIBTC API for the recorded bounty state and Hiro as a read-only Stacks chain indexer. A self-hosted Stacks indexer can replace Hiro for a stronger operational trust model. ## Reproduce Requires Python 3 only; there are no third-party dependencies. ```bash python3 verifier.py verify-all python3 verifier.py verify samples/accept-census-500.json ``` Included live samples: - `accept-census-500.json`: accepted 500-sat census payout. - `accept-crosspost-400.json`: accepted 400-sat distribution payout. - `accept-postmortem-250.json`: accepted 250-sat postmortem payout. - `reject-fabricated-recipient.json`: same paid bounty with a falsified recipient, rejected. ## Cost Each verification performs two free HTTPS reads and no on-chain transactions: - Monetary cost: `0 sats`. - API calls: `2`. - Expected wall-clock time: typically below two seconds, network dependent. That is below the bounty requirement of `100 sats` maximum verification cost for a `1,000 sat` task. ## License MIT. See `LICENSE`.