Bitcoin Forum
May 21, 2024, 10:58:14 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Validating transactions with 0 confirmations  (Read 1053 times)
joelnet (OP)
Newbie
*
Offline Offline

Activity: 49
Merit: 0


View Profile
November 30, 2012, 11:33:30 PM
 #1

I see a lot of bitcoin gambling sites that do not require any confirmations.

How are they able to do this?  Can someone provide some explanation for me or some links?
AndrewBUD
Hero Member
*****
Offline Offline

Activity: 1078
Merit: 502



View Profile WWW
November 30, 2012, 11:38:06 PM
 #2

This would only be so for instant gambling sites such a 1dice.




▄▄▄███████▄▄▄
▄▄█████▀▀''`▀▀█████▄▄
▄███P'            `YY██▄
▄██P'                  `Y██▄
███'                      `███
███'                         ███
▄██'   ▄█████▄▄  ,▄▄▄▄▄▄▄▄▄▄p   ███
▄██▀  ,████▀P▀███.`██████████P   ▀██▄
███[ ,████ __. ███.   ,▄████▀    ███
███[ ]████████████[  ▄████▀       ███
███[ `████   ,oo2 ▄████▀'       ,███
▀██▄  `████▄▄█████d███████████   ▄██▀
▀██.   `▀▀▀▀▀▀"  Y▀▀▀▀▀▀▀▀▀▀▀  ,██▀
███.                        ,███
▀██▄                      ▄██▀
▀███▄_                 ,███▀
▀███▄▄_          _▄▄███▀
▀▀████▄▄ooo▄▄█████▀
▀▀███████▀▀'

365

TM

EZ365 is a digital ecosystem that combines
the best aspects of online gaming, cryptocurrency
trading
and blockchain education. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

..WHITEPAPER..    ..INVESTOR PITCH..

.Telegram     Twitter   Facebook

                       .'M████▀▀██  ██
                      W█Ws'V██  ██▄▄███▀▀█
                     i█████m.~M████▀▀██  ███
                     d███████Ws'V██  ██████
                     ****M██████m.~███f~~__mW█
          ██▀▀▀████████=  Y██▀▀██W ,gm███████
      g█████▄▄▄██   █A~`_WW Y█  ██!,████████
   g▀▀▀███   ████▀▀`_m████i!████P W███  ██
 _███▄▄▄██▀▀▀███Af`_m███   █W ███A ]███  ██
__ ~~~▀▀▀▀▄▄▄█*f_m██████   ██i!██!i███████
Y█████▄▄▄▄__. i██▀▀▀██████████ █!,██████
 8█  █▀▀█████.!██   ██████████i! █████
 '█  █  █   █W M█▄▄▄██████   ██ !██
  !███▄▄█   ██i'██████████   ██
   Y███████████.]██████████████
   █   ███████b ███   ██████
   Y   █   █▀▀█i!██   ████
    V███   █  █W Y█████
      ~~▀███▄▄▄█['███
            ~~*██

Play

            │
    │      ███
    │      ███
    │      ███
    │   │  ███
   ███  │  ███
   ███ ███ ███
 │  ███ ███ ███
███ ███ ███ ███
███ ███  │   │
███ ███  │   │
 │   │
 │

Trade

           __▄▄████▄▄
     __▄▄███████████████▄▄▄
 _▄▄█████████▀▀~`,▄████████████▄▄▄
 ~▀▀████▀▀~`,_▄▄███████████████▀▀▀
   d█~  =▀███████████████▀▀
   ]█! m▄▄ '~▀▀▀████▀▀~~ ,_▄▄
  ,W█. *████▄▄__ '  __▄▄█████
  !██P  █████████████████████
   W█. - ██████████████████▀
  i██[   ~ ▀▀█████████▀▀▀
 g███!
Y███

Learn
[/tabl
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4186
Merit: 8421



View Profile WWW
November 30, 2012, 11:59:23 PM
 #3

I see a lot of bitcoin gambling sites that do not require any confirmations.

How are they able to do this?  Can someone provide some explanation for me or some links?

It's no big deal to accept only one confirmation transactions so long as you don't allow withdraws of derived funds until after the payment confirms.

(there is still some exposure where someone double spends their input only when they would have lost— but a gambling site may consider that an acceptable risk)
J-Norm
Newbie
*
Offline Offline

Activity: 56
Merit: 0



View Profile
December 01, 2012, 12:08:39 AM
 #4

Two ways I know of:

  • They use your payment as one of the inputs when paying you. If it turns out yours was bad then so will theirs
  • The other way is to accept instant payment but delay withdrawls until it is confirmed. If it turn out to be bad they just debit your account.
joelnet (OP)
Newbie
*
Offline Offline

Activity: 49
Merit: 0


View Profile
December 03, 2012, 08:08:00 AM
 #5

Two ways I know of:

  • They use your payment as one of the inputs when paying you. If it turns out yours was bad then so will theirs
  • The other way is to accept instant payment but delay withdrawls until it is confirmed. If it turn out to be bad they just debit your account.

Okay, regarding the first.  I'm assuming this is how satoshi dice does it.  How can they use my payment if their payment addresses are global pools?

Is there an article that describes satoshi dice's technique?
Meni Rosenfeld
Donator
Legendary
*
expert
Offline Offline

Activity: 2058
Merit: 1054



View Profile WWW
December 03, 2012, 11:26:41 AM
 #6

Two ways I know of:

  • They use your payment as one of the inputs when paying you. If it turns out yours was bad then so will theirs
  • The other way is to accept instant payment but delay withdrawls until it is confirmed. If it turn out to be bad they just debit your account.

Okay, regarding the first.  I'm assuming this is how satoshi dice does it.  How can they use my payment if their payment addresses are global pools?

Is there an article that describes satoshi dice's technique?
Bitcoin works with outputs, not addresses. They spend the output of the transaction you used to pay them as one of the inputs to the transaction they use to pay you. If the first transaction becomes invalid, so will the second one. The bulk of the value for the second transaction will be from an unrelated output.

1EofoZNBhWQ3kxfKnvWkhtMns4AivZArhr   |   Who am I?   |   bitcoin-otc WoT
Bitcoil - Exchange bitcoins for ILS (thread)   |   Israel Bitcoin community homepage (thread)
Analysis of Bitcoin Pooled Mining Reward Systems (thread, summary)  |   PureMining - Infinite-term, deterministic mining bond
joelnet (OP)
Newbie
*
Offline Offline

Activity: 49
Merit: 0


View Profile
December 03, 2012, 09:18:13 PM
 #7

Bitcoin works with outputs, not addresses. They spend the output of the transaction you used to pay them as one of the inputs to the transaction they use to pay you. If the first transaction becomes invalid, so will the second one. The bulk of the value for the second transaction will be from an unrelated output.

I'm looking at the api call list for bitcoind and I'm using sendfrom or sendmany.  but those send from an "account" and not a transaction. https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list

I'm guessing this will only work if I generate a raw transaction.

Sorry for being a dumdum, but can I get a little more detail on this?
J-Norm
Newbie
*
Offline Offline

Activity: 56
Merit: 0



View Profile
December 03, 2012, 10:52:00 PM
 #8

I think they probably create their own raw transaction and have the client sign and send it. I am not sure what backend they are using, but I think almost all of them allow for custom made transactions.
Mike Hearn
Legendary
*
expert
Offline Offline

Activity: 1526
Merit: 1129


View Profile
December 03, 2012, 11:30:11 PM
 #9

SatoshiDice is based on a fork of bitcoinj. You can't do it with the regular bitcoinj json api.

Actually some of the code is open source:

  http://code.google.com/r/fireduck-magicpony/source/list

Unfortunately fireducks changes weren't really written to be re-usable. Most of them are scalability related anyway. If your site is less popular than SD you could probably get by with the default code.
Pages: [1]
  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!