The Goat Master (OP)
|
|
December 25, 2013, 07:56:56 PM |
|
How would one go in the process of creating an address in which when somebody sent some coins to it, it would have a 50% chance of keeping the coins and a 50% chance of sending double the coins back, provided that the transaction is under half of the current wallet balance? (Kind of like coinsflip.com, you send and it will send back if you win) I am interested in claiming some new altcoin bounties.
|
██ ▄▄▀ ▀▄ ▄▀▀▄▄▄ ▀▄ ▄██▄▄▄▄▄██▄▄▀▄ ▄▀ █ ▄▄▀▀ █ █ ▀▄▄ ▄▀ ██▀█ ▄▀▀▄ █ █ █▀▄ ██ █ █▐▌█ ██ █ ██ █ ██ ▀▄█ █ █ ▀▄▄▀▄▄███ ▄▀ ▀▀▄ █▄▄█▄█▀▀ █ ▄▀ ▀▄▀▀▄▄ ▀▀▀▀██▀ ▀▄ ▀▀▄▄▄▀ ▀▄ ▄▀▀ ██ | .
▄▄███████▄▄ ▄███▀▀ ▀▀███▄ ███▀ ▀▀ ███ ███ ███ ███▄ ▄▄ ▀███▄▄ ▄▄███▀ ▀▀███████▀▀ | ██████████▄ ▀▀▀▀▀▀▀▀▀███▄ ▀██▌ ▄██▌ ▄▄▄▄▄▄▄▄▄███▀ ██████████▀ ██▌ ▀███▄ ██▌ ▀███▄ ██▌ ▀███ | █████████████
█████████████
█████████████ | ██ ████ ██▌▐██ ██▌ ▐██ ██▌ ▐██ ██▌ ▐██ ██▌ ▐██ ██▌ ▐██ ██▌ ███████████ | ██████████████▌ ██▌ ██▌ ██▌ ██▌ ██▌ ██▌ ██▌ ██▌ | ▄▄███████▄▄ ▄███▀▀ ▀▀███▄ ███▀ ▀███ ███ ███ ███ ███ ███ ███ ███▄ ▄███ ▀███▄▄ ▄▄███▀ ▀▀███████▀▀ | ██████████▄ ▀▀▀▀▀▀▀▀▀███▄ ▀██▌ ▄██▌ ▄▄▄▄▄▄▄▄▄███▀ ██████████▀ ██▌ ▀███▄ ██▌ ▀███▄ ██▌ ▀███ |
▄▄ ████ ▀▀ | ██ ████ ██▌▐██ ██▌ ▐██ ██▌ ▐██ ██▌ ▐██ ██▌ ▐██ ██▌ ▐██ ██▌ ███████████ | ██▌ ██▌ ██▌ ██▌ ██▌ ██▌ ██▌ ██▌ ██▌ |
| | ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ | | | | ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ | |
|
|
|
|
|
|
|
|
"I'm sure that in 20 years there will either be very large transaction volume or no volume." -- Satoshi
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
|
|
|
rarkenin
|
|
December 25, 2013, 09:18:43 PM |
|
This isn't doable with an address alone, but is easily doable following the same model as most bitcoin-accepting services.
You simply run an instance of bitcoind on your server, and once a transaction comes in, pick true or false in a provably random and fair manner, and send back either nothing or double the amount.
|
|
|
|
The Goat Master (OP)
|
|
December 26, 2013, 10:20:04 PM |
|
This isn't doable with an address alone, but is easily doable following the same model as most bitcoin-accepting services.
You simply run an instance of bitcoind on your server, and once a transaction comes in, pick true or false in a provably random and fair manner, and send back either nothing or double the amount.
How do I automate the process though?
|
██ ▄▄▀ ▀▄ ▄▀▀▄▄▄ ▀▄ ▄██▄▄▄▄▄██▄▄▀▄ ▄▀ █ ▄▄▀▀ █ █ ▀▄▄ ▄▀ ██▀█ ▄▀▀▄ █ █ █▀▄ ██ █ █▐▌█ ██ █ ██ █ ██ ▀▄█ █ █ ▀▄▄▀▄▄███ ▄▀ ▀▀▄ █▄▄█▄█▀▀ █ ▄▀ ▀▄▀▀▄▄ ▀▀▀▀██▀ ▀▄ ▀▀▄▄▄▀ ▀▄ ▄▀▀ ██ | .
▄▄███████▄▄ ▄███▀▀ ▀▀███▄ ███▀ ▀▀ ███ ███ ███ ███▄ ▄▄ ▀███▄▄ ▄▄███▀ ▀▀███████▀▀ | ██████████▄ ▀▀▀▀▀▀▀▀▀███▄ ▀██▌ ▄██▌ ▄▄▄▄▄▄▄▄▄███▀ ██████████▀ ██▌ ▀███▄ ██▌ ▀███▄ ██▌ ▀███ | █████████████
█████████████
█████████████ | ██ ████ ██▌▐██ ██▌ ▐██ ██▌ ▐██ ██▌ ▐██ ██▌ ▐██ ██▌ ▐██ ██▌ ███████████ | ██████████████▌ ██▌ ██▌ ██▌ ██▌ ██▌ ██▌ ██▌ ██▌ | ▄▄███████▄▄ ▄███▀▀ ▀▀███▄ ███▀ ▀███ ███ ███ ███ ███ ███ ███ ███▄ ▄███ ▀███▄▄ ▄▄███▀ ▀▀███████▀▀ | ██████████▄ ▀▀▀▀▀▀▀▀▀███▄ ▀██▌ ▄██▌ ▄▄▄▄▄▄▄▄▄███▀ ██████████▀ ██▌ ▀███▄ ██▌ ▀███▄ ██▌ ▀███ |
▄▄ ████ ▀▀ | ██ ████ ██▌▐██ ██▌ ▐██ ██▌ ▐██ ██▌ ▐██ ██▌ ▐██ ██▌ ▐██ ██▌ ███████████ | ██▌ ██▌ ██▌ ██▌ ██▌ ██▌ ██▌ ██▌ ██▌ |
| | ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ | | | | ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ | |
|
|
|
rarkenin
|
|
December 26, 2013, 10:35:19 PM |
|
You'd write a script or server program to handle it automatically, from something as simple as a loop that waits for txns to come in, to a large operation teeming with cronjobs and database storage for auditing.
|
|
|
|
fishy
Sr. Member
Offline
Activity: 476
Merit: 250
What do you call a fish with no eyes? A Fsh!
|
|
December 26, 2013, 10:45:30 PM |
|
You'd write a script or server program to handle it automatically, from something as simple as a loop that waits for txns to come in, to a large operation teeming with cronjobs and database storage for auditing.
Hello. I am interested in this as well. What would be a good language to start with for this? PHP?
|
|
|
|
rarkenin
|
|
December 26, 2013, 11:33:45 PM |
|
Naw, PHP is better for handling individual requests, and is somewhat hard to daemonize. I would recommend Java as you can thus have a coin-game backend and a possible web service meshed together natively. With that said, this isn't something you'd do on your average web host.
|
|
|
|
hendo420
|
|
December 27, 2013, 02:21:38 AM |
|
Its not very hard to do in python.
|
ebmarket.co
|
|
|
smeagol
Legendary
Offline
Activity: 1008
Merit: 1005
|
|
December 29, 2013, 11:53:12 PM |
|
You'd write a script or server program to handle it automatically, from something as simple as a loop that waits for txns to come in, to a large operation teeming with cronjobs and database storage for auditing.
Hello. I am interested in this as well. What would be a good language to start with for this? PHP? Off topic, but why are you still using the inputs sig?
|
|
|
|
The Goat Master (OP)
|
|
December 29, 2013, 11:59:47 PM |
|
Its not very hard to do in python.
How would one do that?
|
██ ▄▄▀ ▀▄ ▄▀▀▄▄▄ ▀▄ ▄██▄▄▄▄▄██▄▄▀▄ ▄▀ █ ▄▄▀▀ █ █ ▀▄▄ ▄▀ ██▀█ ▄▀▀▄ █ █ █▀▄ ██ █ █▐▌█ ██ █ ██ █ ██ ▀▄█ █ █ ▀▄▄▀▄▄███ ▄▀ ▀▀▄ █▄▄█▄█▀▀ █ ▄▀ ▀▄▀▀▄▄ ▀▀▀▀██▀ ▀▄ ▀▀▄▄▄▀ ▀▄ ▄▀▀ ██ | .
▄▄███████▄▄ ▄███▀▀ ▀▀███▄ ███▀ ▀▀ ███ ███ ███ ███▄ ▄▄ ▀███▄▄ ▄▄███▀ ▀▀███████▀▀ | ██████████▄ ▀▀▀▀▀▀▀▀▀███▄ ▀██▌ ▄██▌ ▄▄▄▄▄▄▄▄▄███▀ ██████████▀ ██▌ ▀███▄ ██▌ ▀███▄ ██▌ ▀███ | █████████████
█████████████
█████████████ | ██ ████ ██▌▐██ ██▌ ▐██ ██▌ ▐██ ██▌ ▐██ ██▌ ▐██ ██▌ ▐██ ██▌ ███████████ | ██████████████▌ ██▌ ██▌ ██▌ ██▌ ██▌ ██▌ ██▌ ██▌ | ▄▄███████▄▄ ▄███▀▀ ▀▀███▄ ███▀ ▀███ ███ ███ ███ ███ ███ ███ ███▄ ▄███ ▀███▄▄ ▄▄███▀ ▀▀███████▀▀ | ██████████▄ ▀▀▀▀▀▀▀▀▀███▄ ▀██▌ ▄██▌ ▄▄▄▄▄▄▄▄▄███▀ ██████████▀ ██▌ ▀███▄ ██▌ ▀███▄ ██▌ ▀███ |
▄▄ ████ ▀▀ | ██ ████ ██▌▐██ ██▌ ▐██ ██▌ ▐██ ██▌ ▐██ ██▌ ▐██ ██▌ ▐██ ██▌ ███████████ | ██▌ ██▌ ██▌ ██▌ ██▌ ██▌ ██▌ ██▌ ██▌ |
| | ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ | | | | ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ | |
|
|
|
rarkenin
|
|
December 30, 2013, 12:06:26 AM |
|
I can always write a Java implementation for you... It would obviously be for a fee but it's not too complex or drawn out, so the fee wouldn't be too bad.
|
|
|
|
|