nullcount / satbounty

Open source labor market to incentivize and monetize work
MIT License
0 stars 0 forks source link

Non-custodial escrow #12

Open nullcount opened 2 years ago

nullcount commented 2 years ago

Bounty poster generates preimage, sends hash of preimage to market, market creates hold invoice for initial bounty reward, bounty poster pays hold invoice, market sends hash to every case submission, case sumbission creates hold invoice for current reward amount, market pays hold invoice, some case is awarded by bounty creator and given the preimage, awarded case settles invoice with preimage, market settles bounty creation invoice with preimage. In this example there is a risk associated with reuse of the payment hash. Intermediate nodes on both paths may shortcut the preimage and disallow the market from receiving any money.

Max invoice timeout is 2016 blocks (two weeks).

TODO: what happens if invoices expire before a case is awarded?