Betting using Bitcoin Blockchain

by Cisco Mmu   Last Updated August 01, 2020 03:27 AM - source

User1 bet the hash of Block 999,000 that hash(block(999,000) = even

user2 bet the hash of Block 999,000 that hash(block(999,000) = odd

Both users pay/sign 1 BTC in a CoinJoin for that bet to a P2SH. The winner will win 1.99BTC and 0.01 BTC is the tx fee.

How to make the scripts that can perform such action?

  1. Script1 that perform the betting section.(that specify the criteria for redemption).

  2. Script2. Redeem script (based on the output of block 999,000) that transfers the fund to the winner new PubKey Hash.

Tags : oracle


Related Questions


Flow of an oracle

Updated August 22, 2017 09:27 AM