76 points · by ca98am79 · 8y ago · 48 comments
Alice and Bob commit to their rolls by hashing them then making a future spend contingent on revealing the roll that produced the hash.
The trick is how to reveal both rolls without giving an advantage to the one who reveals second. This is the problem the protocol solves - through transaction setup and the newly-activated Script opcodes.
What you are describing is a coin flipping protocol [0].
From the article:
>To my knowledge this is the first time someone has proposed such a scheme on Bitcoin though I suppose it's possible it has come up before and I just missed it.
There have been coin flipping protocols for Bitcoin since at least 2013-2014 [1]. The main contribution of the above post appears to be that they actually performed the protocol which is neat and quite a bit of work.
[0]: https://en.wikipedia.org/wiki/Commitment_scheme#Coin_flippin...
[1]: Back, Bentov (2014) https://arxiv.org/abs/1402.3698
[0]: https://eprint.iacr.org/2013/784
[1]: https://curiosity-driven.org/bitcoin-contracts
[2]: https://blockexplorer.com/tx/7ae5760af2105a5ba54a914f188686e...
[3]: https://blockexplorer.com/api/tx/7ae5760af2105a5ba54a914f188...
Also a very clever hack to get around the scripting limitations by using the length of the secret instead of the actual secret itself.
https://bitinfocharts.com/comparison/transactionfees-btc-eth...
Transaction costs are specified by the protocol in satoshis, which is the base unit of Bitcoin. How much you can buy for one satoshi only depends on what people want to pay for it. We call this the coin value.
A coin without value is free to transact with. Run your applications on testnet if there are no other considerations.
PS: Adding numbers mod X will provide a fair random number as long as at least one side provides a fair random number to start with. Which is a stronger guarantee if your making a real money wager.
You could implement chess with only movement commitments and no atomic fair random number generation.
are they perfectly even or is one more likely for each flip?
How is this possible? is there an Oracle all parties agree to trust?
edit:i see how this can work for some sort of bet where the result is calculated on the blockchain itself but outside of that?
https://coingeek.com/bitcoin-com-viabtc-join-miners-choice-i...
An important difference between BCH and ETH is that ETH has a lot of opcodes, but BCH is slowly enabling some of the opcodes that were created by Satoshi but later disabled.
Not the best indicator but.. https://coinmarketcap.com/currencies/ethereum/ vs https://coinmarketcap.com/currencies/bitcoin-cash/
But for BTC I'd say yes.
https://www.yours.org/content/first-utxo-commitment-on-testn...
TL;DR: A very simple smart contract running on the Bcash network.
https://www.blunderingcode.com/gamble-channels-fast-verifiab...
This uses a chain of hashes so you can make a single commitment for lots of bets, and an off-chain payment channel.
Of course, the highly skilled 'Bitcoin ABC' aka bcash developers obviously tested these well, with no risk to consensus logic or users funds...
Ive been a long time bitcoin owner and I know having 15 different forks is bad for the currency.
Unless the definition of trolling has changed, I'm very serious when I hate on the fraud being committed with 'the real true bitcoin'.
When BCH started encouraging 0conf, I started thinking BCH leaders were actually crypto terrorists.
You used an 'Appeal to authority' to show OP_CODES are bad then you implied no testing was done by the BCH guys without providing any evidence of such.
So that's probably why you got downvoted.