Author

Topic: BTC transaction dependent on a block hash lottery (Read 115 times)

full member
Activity: 224
Merit: 146
November 01, 2022, 12:16:02 PM
#3
You have to already have the hash to create your Taproot script and the Taproot address to lock the coins in to be spent later. Since you aim to use a block hash that has not been created yet, it is not possible to do so. There is also no option to fetch a block hash inside the smart contract.

Additionally in bitcoin scripts we don't have the option to compare hashes as integers or otherwise so you can't do the "closest to hash" comparison inside the smart contracts either.

Thank you. So I understand some kind of DLC will be needed for the task.
legendary
Activity: 3472
Merit: 10611
You have to already have the hash to create your Taproot script and the Taproot address to lock the coins in to be spent later. Since you aim to use a block hash that has not been created yet, it is not possible to do so. There is also no option to fetch a block hash inside the smart contract.

Additionally in bitcoin scripts we don't have the option to compare hashes as integers or otherwise so you can't do the "closest to hash" comparison inside the smart contracts either.
full member
Activity: 224
Merit: 146
Hi everyone,

I know of some developments using block hash as NRG entropy. And I was wondering if it is possible to do the following experiment using a Taproor transaction.

Imagine I want to do a ruffle among n BTC addresses depending on a particular future block hash. Can I create a taproot tx such as the address closest to that hash (defining a simple and fair distance) being able to spend the UTx0?

I'm not asking for the solution, only if it could be done just with a Tx Script or some DLC will be needed.

Thanks in advanced for any Hint.
Jump to: