Loops HouseRigbill

NEAR HACKATHON
Links
Team
1 member- MYOwner
MystiqueMide
Overview
Problem: Bitcoin mining hosts bill their clients in dollars every month, but the miners earn BTC. Someone sells coins by hand, a pool converts them custodially, or the host chases late payments, and nothing stops a miner moving a payout before the bill clears.
What we built: Rigbill gives each miner a Bitcoin payout address whose only key is a NEAR smart contract. While a bill is open, the contract refuses to sign any Bitcoin transaction that doesn't pay that bill first. The bill's share goes through NEAR Intents 1Click and lands as USDC on Base for the host. The rest goes to the miner's own cold wallet. No custodian, and no person or server holds the key.
How NEAR fits in, every piece load bearing:
- Rust contract v1.rigbill.near (near-sdk 5.30.1) builds the BIP143 sighash for every Bitcoin transaction itself and checks each output before signing.
- Chain Signatures (v1.signer) is the only key to each miner's payout address.
- NEAR Intents 1Click swaps the bill's share from BTC to USDC on Base at a quote the host locks and the miner's ceiling caps.
- NEAR Connect for sign-in, near-api-js for the relayer and a keeper agent that splits payouts automatically, NEP-297 events.
Proven on mainnet with real money: 9,113 sats to the 1Click deposit, 1,657 sats to the miner, 6.20 USDC delivered on Base, host confirmed paid. Three on-chain refusals (BILL_OPEN_HOST_OUTPUT_REQUIRED, OUTPUT_NOT_ALLOWED, OUTPOINT_ALREADY_SIGNED) failed before any signature was requested.
Try it: live app rigbill.midelabs.xyz, live proof page rigbill.midelabs.xyz/proof, or run npm run verify with no keys. 85 contract tests and 15 relayer tests run in CI. JUDGE.md in the repo gives a 5 minute "do X, see Y" path. Demo video: youtu.be/uXWAdQzu4Tc