Bitcoin Forum
March 28, 2024, 08:53:40 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 [5]  All
  Print  
Author Topic: fair coin toss with no extortion and no need to trust a third party  (Read 15629 times)
socrates1024
Full Member
***
Offline Offline

Activity: 126
Merit: 108


Andrew Miller


View Profile
December 05, 2013, 08:20:56 PM
 #81

Can you describe the process in a plainer way, like to a redneck.  It appears that 3 equal inputs ended up in one of the input addresses.  It solved the unequal contribution issue but from where does the external coin flip/lottery component comes from?
I can try... but it is a little tricky, so it may take a few attempts before we get a great description.

Two people each bet 1 coin, commit to random numbers, and also post an additional 1 coin security deposit. When they both reveal their committed random numbers, the numbers are xor'ed and one of them is chosen as a winner, and gets both coins, and both players get their security deposit back. The only tricky thing is that you need some way to make sure both players actually *do* reveal their random number, rather than just disappearing. This is why the security deposit is important - the *only* way to get your security deposit back is to reveal your random number and finish the game - if you don't do this, the other player gets the security deposit *and* the prize.

How was that? Clear?

amiller on freenode / 19G6VFcV1qZJxe3Swn28xz3F8gDKTznwEM
[my twitter] [research@umd]
I study Merkle trees, credit networks, and Byzantine Consensus algorithms.
1711659220
Hero Member
*
Offline Offline

Posts: 1711659220

View Profile Personal Message (Offline)

Ignore
1711659220
Reply with quote  #2

1711659220
Report to moderator
Every time a block is mined, a certain amount of BTC (called the subsidy) is created out of thin air and given to the miner. The subsidy halves every four years and will reach 0 in about 130 years.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4158
Merit: 8343



View Profile WWW
December 05, 2013, 10:07:23 PM
 #82

Now, can you CoinSwap-ify your protocol so that in the case where everyone plays honestly the fact that they just used a coinflip is not visible in the blockchain? Smiley
User705
Legendary
*
Offline Offline

Activity: 896
Merit: 1006


First 100% Liquid Stablecoin Backed by Gold


View Profile
December 05, 2013, 11:18:17 PM
 #83

Can you describe the process in a plainer way, like to a redneck.  It appears that 3 equal inputs ended up in one of the input addresses.  It solved the unequal contribution issue but from where does the external coin flip/lottery component comes from?
I can try... but it is a little tricky, so it may take a few attempts before we get a great description.

Two people each bet 1 coin, commit to random numbers, and also post an additional 1 coin security deposit. When they both reveal their committed random numbers, the numbers are xor'ed and one of them is chosen as a winner, and gets both coins, and both players get their security deposit back. The only tricky thing is that you need some way to make sure both players actually *do* reveal their random number, rather than just disappearing. This is why the security deposit is important - the *only* way to get your security deposit back is to reveal your random number and finish the game - if you don't do this, the other player gets the security deposit *and* the prize.

How was that? Clear?
So the random numbers are part of the blockchain transaction?  How would it work with 3 people?

socrates1024
Full Member
***
Offline Offline

Activity: 126
Merit: 108


Andrew Miller


View Profile
December 05, 2013, 11:42:49 PM
 #84

So the random numbers are part of the blockchain transaction?  How would it work with 3 people?

For N people, every draws a random number between 0 and N-1, you add up all the numbers, and mod by N to determine the winner. The result is uniformly distributed between 0 and N-1, if even one party chooses their number randomly.

amiller on freenode / 19G6VFcV1qZJxe3Swn28xz3F8gDKTznwEM
[my twitter] [research@umd]
I study Merkle trees, credit networks, and Byzantine Consensus algorithms.
agorism
Newbie
*
Offline Offline

Activity: 45
Merit: 0


View Profile
January 16, 2014, 03:38:32 PM
Last edit: January 16, 2014, 07:05:12 PM by agorism
 #85

If 2 people collude, they can always take the 3rd person's money.

We need to enable op_mod

https://bitcointalk.org/index.php?topic=418769.0
agorism
Newbie
*
Offline Offline

Activity: 45
Merit: 0


View Profile
January 16, 2014, 07:04:56 PM
 #86

Here is my attempt to build a script that accomplishes the goal without using disabled op_codes.
Any advice for me?

signature can look like these:
sigA sigB 1
sigA B A 0
sigB B A 0

op_if
   2 <pubkey1> <pubkey2> 2 op_checkmultisigverify
op_else
   op_2dup op_sha256 hash(A) op_equalverify sha256 hash(B) op_equalverify op_add op_RIPE160 0a '7ff2' 8x('00')
   op_lessthan
   op_if
      <pubkey1>
   op_else
      <pubkey2>
   op_endif
   op_checksig
op_endif

63
  52 <pubkey1> <pubkey2> 52 ad
67
  6e a8 <hash(A)> 88 a8 <hash(B)> 88 93 a6 0a 7f f2 00 00 00 00 00 00 00 00
  9f
  63
    <pubkey1>
  67
    <pubkey2>
  68
  ac
68
syskall
Newbie
*
Offline Offline

Activity: 23
Merit: 16


View Profile
December 16, 2014, 01:46:29 AM
 #87

Hey guys, I was referred here by gmaxwell. I have come up with a similar protocol although I'm not sure it is implementable in Bitcoin script. One noticeable difference is that mine was designed to support arbitrary odds/payouts. I haven't had time to study the protocol proposed here in detail but it seems quite similar to mine (will comment here when I do). https://bitcointalk.org/index.php?topic=893077.0

By the way, has anyone worked on an implementation of this? I'm not sure the increased security would make up for the inconvenience of having to wait for block confirmations for the average gambler (except maybe for large bets).
Pages: « 1 2 3 4 [5]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!