Bitcoin Forum

Economy => Gambling => Topic started by: kleineaap on November 07, 2014, 01:07:20 AM



Title: The Gambling Bank
Post by: kleineaap on November 07, 2014, 01:07:20 AM
Hi,

I've had this idea of creating a wallet deposit address for players who wish not to access their funds until said date.
I have seen and experienced myself losses that could be avoided if greed wasn't in place.

Its fundamental purpose is basically to alienate your own self-acquired or winning funds, to a trusted third party that will only release them on a pre-determined date by the depositor.
The logic behind it is to protect gamblers from over-excitement and further losses, providing them a protection of their winnings.

In practical terms, this would go something like:
- a trusted escrow would be contacted to manage a new wallet
- the said wallet would be created with unique deposit addresses for every user
- each user would be free to deposit any BTC amounts in his personal address he'd like to alienate
- each user would be requested to provide a specific time and address when and where to release the funds

This would help the gambling community and the marketplace.
Imagine that someone has his funds alienated in The Gambling Bank until said date, but he needs a loan for this and that. He could then provide the necessary collateral by giving the trusted escrow's contact and personal alien address.

Lastly, I'm not thinking of charging any fees for this service, and I suggested an escrow in the first place because I am not one nor intend to be.
I'd like to hear your opinion about it and then be willing to further expand the idea into a well working one.
I can't speak for escrow's fees at the moment, so please bring what you got. Would love to hear. Cheers!


Title: Re: The Gambling Bank
Post by: kleineaap on November 07, 2014, 01:10:58 AM
reserve


Title: Re: The Gambling Bank
Post by: dooglus on November 07, 2014, 01:33:50 AM
I've had this idea of creating a wallet deposit address for players who wish not to access their funds until said date.
I have seen and experienced myself losses that could be avoided if greed wasn't in place.

I've had the same idea before. I've even held coins on an ad-hoc basis for people who wanted to be sure they couldn't gamble them. I was sent coins to hold on the condition that I wouldn't give them back until some date in the future.

I didn't pursue the idea further because I don't much like the idea of being in control of other people's coins. There's no upside to it unless you intend to steal them (I'm guessing this isn't a service people would be willing to pay much if anything for).

It's possible that a decent solution could be found using multi-sig addresses. For example, if you make a 2-of-2 address with the "bank", where you each control one key, the bank can simply give you their key when it's time to release the funds and you can combine the two to access your fund, but the bank isn't able to spend the coins at any point or have them stolen.

Using a system like that, you don't need a trusted escrow (in that they never have access to your coins), but you do need someone you can trust to:

a) not lose his key
b) not give you or anyone else his key until the time is up
c) give you his key when the time is up

An unscrupulous bank could wait for the time to be up and then say "I'm not giving you the key unless you pay me 50% of the coins" - in effect holding your coins hostage. They can't spend them, but they can stop you spending them until you comply with their terms.


Title: Re: The Gambling Bank
Post by: kleineaap on November 07, 2014, 01:49:57 AM
I've had this idea of creating a wallet deposit address for players who wish not to access their funds until said date.
I have seen and experienced myself losses that could be avoided if greed wasn't in place.

I've had the same idea before. I've even held coins on an ad-hoc basis for people who wanted to be sure they couldn't gamble them. I was sent coins to hold on the condition that I wouldn't give them back until some date in the future.

I didn't pursue the idea further because I don't much like the idea of being in control of other people's coins. There's no upside to it unless you intend to steal them (I'm guessing this isn't a service people would be willing to pay much if anything for).

It's possible that a decent solution could be found using multi-sig addresses. For example, if you make a 2-of-2 address with the "bank", where you each control one key, the bank can simply give you their key when it's time to release the funds and you can combine the two to access your fund, but the bank isn't able to spend the coins at any point or have them stolen.

Using a system like that, you don't need a trusted escrow (in that they never have access to your coins), but you do need someone you can trust to:

a) not lose his key
b) not give you or anyone else his key until the time is up
c) give you his key when the time is up

An unscrupulous bank could wait for the time to be up and then say "I'm not giving you the key unless you pay me 50% of the coins" - in effect holding your coins hostage. They can't spend them, but they can stop you spending them until you comply with their terms.

I've thought of multi-sig for this and came across the same problem.
We don't need any more unspendable coins; in the case the bank does not turn out one of the keys.
This is why I believe we could even make a ring of trusted escrows, having the users choose for their preference. The thing with escrow is a small profit margin, having multi-sig working here wouldn't pay for the "service".
In an ideal world, though, it's a perfect solution.

Quote
I'm guessing this isn't a service people would be willing to pay much if anything for.

And yes, in some ways - having not wasted ones coins by over excitement - it's better to pay a small fee to keep funds intact instead of going nuts and losing them all.
But please note, I'm only formulating an idea, I'm not requiring a fee per se but yet have to listen what current escrow services around here have to say and then make an agreement with them.

Quote
I didn't pursue the idea further because I don't much like the idea of being in control of other people's coins.

This is exactly what I meant by not being available to escrow. But I'm sure some of the available ones would appreciate to present their services.
If I can do the gap here, we all have a winner, assuming there's interest in this service.

Thanks for insight, and please expand more at will.


Title: Re: The Gambling Bank
Post by: RHavar on November 07, 2014, 01:52:20 AM
It's possible that a decent solution could be found using multi-sig addresses. For example, if you make a 2-of-2 address with the "bank", where you each control one key, the bank can simply give you their key when it's time to release the funds and you can combine the two to access your fund, but the bank isn't able to spend the coins at any point or have them stolen.



Bitcoin supports time locked transactions, so the bank can immediately return you an unspendable transaction. This solves most of the issues. Now you don't need to worry about them losing your key, or otherwise never giving it to you.


Title: Re: The Gambling Bank
Post by: dooglus on November 07, 2014, 02:03:53 AM
Bitcoin supports time locked transactions, so the bank can immediately return you an unspendable transaction. This solves most of the issues. Now you don't need to worry about them losing your key, or otherwise never giving it to you.

In combination with multisig, that's probably a fine solution.

Without multisig it doesn't work:

You send me coins.
I send you a timelocked transaction that sends the coins back to you, but which can't be confirmed until the end of the month.
I can then double-spend your coins to myself without worrying that the transaction I sent you will confirm first.
When you publish your timelocked transaction at the end of the month, you'll find its inputs are already spent.

With multisig, we make a 2-of-2 address, you deposit your coins to it, I sign and publish a timelocked transaction which gives you access to the coins at the end of the month. Then you don't have to trust me any further, you just have to wait.

Quote
you do need someone you can trust to:

a) not lose his key
b) not give you or anyone else his key until the time is up
c) give you his key when the time is up

Under that timelocked 2-of-2 scheme, point 'a' is moot, and point 'c' becomes "immediately sign and publish a timelocked transaction". Point 'b' remains however - it's possible that you could nag or guilt me into releasing my key early, and you would get to gamble your coins before the chosen date - but I think that's the least serious of the three concerns.

Note that under this scheme I can still pull the "hostage" routine, but you would notice it immediately when I didn't publish a signed transaction, rather than at the end of the month by which time I could have hundreds of others caught in the same scam.


Title: Re: The Gambling Bank
Post by: RHavar on November 07, 2014, 02:12:52 AM
In combination with multisig, that's probably a fine solution.

Yeah, I never meant without multisig. It's actually exactly how GreenAddress.it already works, and they already refuse to sign a transaction unless it meets certain requirements, and give you the time locked release transaction.

Someone should contact them and ask them to create a "vault mode", where they will refuse sign the transaction releasing some money up until a certain amount of time.


Title: Re: The Gambling Bank
Post by: Dabs on November 07, 2014, 04:04:59 AM
Some escrows charge 1%~2%. Some are free. There are a couple of lists of such escrows on this forum.

https://bitcointalk.org/index.php?topic=108716.0 Escrow List by Squall
https://bitcointalk.org/index.php?topic=276897.0 Escrow List by Financisto

Those above are what I am aware of.


Title: Re: The Gambling Bank
Post by: kleineaap on November 07, 2014, 03:37:50 PM
Some escrows charge 1%~2%. Some are free. There are a couple of lists of such escrows on this forum.

https://bitcointalk.org/index.php?topic=108716.0 Escrow List by Squall
https://bitcointalk.org/index.php?topic=276897.0 Escrow List by Financisto

Those above are what I am aware of.


Thanks.


Title: Re: The Gambling Bank
Post by: dooglus on November 07, 2014, 03:58:06 PM
So how about this:

1. You visit the gambling bank website
2. You give it the public key of an address you control
3. It makes a 2-of-2 multisig address using your public key and one it controls
4. You say how long you want your coins frozen for
5. You deposit coins to the multisig address
6. It immediately creates and signs a timelocked transaction returning those (currently unconfirmed) coins (minus transaction fee, and possibly a servie charge) to the address you gave in step 2 and sends it to you
7. You verify and confirm receipt of the signed transaction.
8. It deletes its private key

Step 5 means that nobody can steal and spend your coins.

Step 6 lets you know immediately whether you've been scammed or not. You don't have to wait for the freeze period to expire before realising that the gamblebank is a fraud.

Step 8 guarantees that there's no way your coins will be unlocked before the time is up - the server has deleted its private key already.

Between steps 6 and 7 there's the possibility that the gamblebank goes rogue. To reduce risk here you could split your coins into 10 smaller amounts and go through the steps for each part separately. Maybe steps 5 through 7 could be in a loop.

Maybe step 8 could be optional, under control of the user. If you want the gamblebank to be able to release the coins early under certain conditions, you could ask it not to delete its private key.


Title: Re: The Gambling Bank
Post by: kleineaap on November 07, 2014, 04:46:07 PM
So how about this:

1. You visit the gambling bank website
2. You give it the public key of an address you control
3. It makes a 2-of-2 multisig address using your public key and one it controls
4. You say how long you want your coins frozen for
5. You deposit coins to the multisig address
6. It immediately creates and signs a timelocked transaction returning those (currently unconfirmed) coins (minus transaction fee, and possibly a servie charge) to the address you gave in step 2 and sends it to you
7. You verify and confirm receipt of the signed transaction.
8. It deletes its private key

Step 5 means that nobody can steal and spend your coins.

Step 6 lets you know immediately whether you've been scammed or not. You don't have to wait for the freeze period to expire before realising that the gamblebank is a fraud.

Step 8 guarantees that there's no way your coins will be unlocked before the time is up - the server has deleted its private key already.

Between steps 6 and 7 there's the possibility that the gamblebank goes rogue. To reduce risk here you could split your coins into 10 smaller amounts and go through the steps for each part separately. Maybe steps 5 through 7 could be in a loop.

Maybe step 8 could be optional, under control of the user. If you want the gamblebank to be able to release the coins early under certain conditions, you could ask it not to delete its private key.

Pretty good. I'll look into the technical details of how to achieve this and if it's viable or not.
Thanks again.


Title: Re: The Gambling Bank
Post by: DebitMe on November 07, 2014, 04:51:40 PM
Nice idea, in the mean time while your working on that (and note that you are entrusting your coins to a 3rd party and that may be unsafe, always do due diligence before depositing coins anywhere), I like to "park" my coins at bitfinex and have auto-lend turned on for 30 days.  This ensures that my coins cannot be withdrawn by me and are even earning interest at the same time.  The lendee can cancel at any time, but then your coins just get auto-lent back out at the FRR, so you never really know when they aren't lent out.  Whenever you know you want your coins, just turn off the auto-lend feature and they will be ready for withdrawal once the current lend is up.

Of course, it isn't exactly like what your talking about, but it earns interest and is a way to keep your coins safe from yourself.


Title: Re: The Gambling Bank
Post by: dooglus on November 07, 2014, 06:02:10 PM
note that you are entrusting your coins to a 3rd party and that may be unsafe, always do due diligence before depositing coins anywhere

That's true, but you're only trusting them for a few seconds. Once they send you the signed transaction back, you can check it and be sure that the coins are yours again. If they don't give you a valid signed transaction immediately, you can come here and tell everyone about it, so at least you are the only one who gets scammed.

I like to "park" my coins at bitfinex and have auto-lend turned on for 30 days.

Note that by doing this you are entrusting your coins to a 3rd party (and they are then entrusting them to more 3rd parties when they lend them out) for the whole duration. If bitfinex turns bad, they get to keep everyone's coins that are currently on deposit with them. The "gamblebank" I proposed only ever gets to scam a single person once, and even then they don't get to steal any coins - they just get to burn them.

On the other hand, at least with the bitfinex solution your coins are working for you while you wait. With the timelocked transaction they're just sitting idle.


Title: Re: The Gambling Bank
Post by: kashish948 on November 07, 2014, 06:19:40 PM
Against the idea. People have to be mature enough to handle their own money. Its not that hard :P


Title: Re: The Gambling Bank
Post by: 2dogs on November 07, 2014, 07:48:29 PM
Against the idea. People have to be mature enough to handle their own money. Its not that hard :P

Not true.
A person can do whatever they choose with their own money - including using a "Gambling Bank", if they so desire.


Title: Re: The Gambling Bank
Post by: dooglus on November 07, 2014, 10:37:29 PM
Against the idea. People have to be mature enough to handle their own money. Its not that hard :P

What if the "gamble bank" was written as a new feature in the bitcoin-core wallet?

You click "lock funds", it asks you how much, and for how long, then it does all the steps I previously outlined.

That way you're not trusting any 3rd party (once the code change has been reviewed and found to be legit) and you still get to have your funds irrevocably frozen for a period of time. You would need to be careful to make a safe backup of the timelocked transaction, because if your hard drive dies, your coins would die with it. Your existing wallet backup won't be of any use if it's making up a new key for the transaction and throwing it away as soon as it signs the timelocked transaction.

Would that satisfy your "everyone should be responsible for themselves" craving?


Title: Re: The Gambling Bank
Post by: RHavar on November 07, 2014, 11:20:00 PM
Quote
Between steps 6 and 7 there's the possibility that the gamblebank goes rogue.

You don't need to broadcast your spend transaction until the gamblank gives you the returning transaction (to do so, you'll have to provide them with the txid, outputs and amounts). Only once you have the refunding transaction do you actually broadcast your funds to the multisig address.


This reduces your risk to quite simply: "They might keep their private key, and release the funds (with your consent) before they promised to"


Title: Re: The Gambling Bank
Post by: dooglus on November 08, 2014, 04:42:39 AM
Quote
Between steps 6 and 7 there's the possibility that the gamblebank goes rogue.

You don't need to broadcast your spend transaction until the gamblank gives you the returning transaction (to do so, you'll have to provide them with the txid, outputs and amounts). Only once you have the refunding transaction do you actually broadcast your funds to the multisig address.


This reduces your risk to quite simply: "They might keep their private key, and release the funds (with your consent) before they promised to"


Nice.

But it turns out that you don't need the gamblebank to be a third party at all. It would be a patch to bitcoin-qt or a standalone webpage like bitaddress.org - then you can verify the code once and trust it after that.

Way to talk myself out of getting any service fees for running such a service. :)


Title: Re: The Gambling Bank
Post by: RHavar on November 08, 2014, 05:07:10 AM
Good point Dooglus, a 3rd party is not required.  All you really need to do is write a script that:

1. Generates a private key
2. Displays the address
3. Asks the user to send coins to the address, and specify exactly how many coins they sent, what txid they sent it with, and what output they used.  (If you were advanced, you could programatically get it, blockexplorer makes this easy)
4. Ask the user for a receiving address and when they want the transaction
5. Send a transaction to the receiving address, using nLockTime
6. Output the transaction. The user would have to push this to the network themselves when its eligible
7. Delete the private key







Title: Re: The Gambling Bank
Post by: DiceChain on November 08, 2014, 05:13:59 AM
Good idea you got here. Because of the ''greed'' mentioned I have lost 1.2 BTC on PD and 0.7 on Prcdice today. Hah.


Title: Re: The Gambling Bank
Post by: kleineaap on November 08, 2014, 07:58:44 AM
Against the idea. People have to be mature enough to handle their own money. Its not that hard :P

What if the "gamble bank" was written as a new feature in the bitcoin-core wallet?

You click "lock funds", it asks you how much, and for how long, then it does all the steps I previously outlined.

That way you're not trusting any 3rd party (once the code change has been reviewed and found to be legit) and you still get to have your funds irrevocably frozen for a period of time. You would need to be careful to make a safe backup of the timelocked transaction, because if your hard drive dies, your coins would die with it. Your existing wallet backup won't be of any use if it's making up a new key for the transaction and throwing it away as soon as it signs the timelocked transaction.

Would that satisfy your "everyone should be responsible for themselves" craving?

I'm really pleased I got to get this discussion going.
Good to see everybody's points. There might be a trustless solution for it, where a scam can not take place. Funds would be able to get burned though, but not stolen. Which is a step forward. From there, I'm sure other solutions might come up to make it even safer.
I'm interested to see if this is feasible and research forward.
Can you pinpoint the technical requirements to achieve such, and its own complexity level?
I'm not savvy enough to pursue this on my own. However, I'd be happy to take what it needs to get it going and discuss furthermore with all of you that brought some solutions forward.

Love the way that:
- we think of a trust-based service to solve a problem
- the protocol itself is able to solve the service's potential issues
- trust-based condition is removed in its majority
- purpose of service is achieved in its core

Result: Bitcoin wins.

Drop me a line and let's make it happen.
Thanks all.


Title: Re: The Gambling Bank
Post by: lg1500 on November 08, 2014, 08:03:13 AM
lol i know better way, bitfinex offering swap, you just providing swap for 30 days and during that time you cant use you funds + you making money


Title: Re: The Gambling Bank
Post by: kleineaap on November 08, 2014, 08:19:37 AM
Against the idea. People have to be mature enough to handle their own money. Its not that hard :P

Not true.
A person can do whatever they choose with their own money - including using a "Gambling Bank", if they so desire.

I just want to stress this reply. Your coins are yours, and you are free to treat them as you wish.
With a third party "Bank", you could even look at it as "selling/renting my private key with a spendable timelock".
This has advantages for many people with spending issues. It's human nature. Not only in gambling. Sometimes it's just too tempting to touch that expensive credit, for example.
You might be paying a fee for it, or not. You might be earning interest. We don't know yet its inherent possibilities.

Having not a third party, and a trustless no fee system, which even seems plausible by this point, would totally ruin any objections to the idea.

lol i know better way, bitfinex offering swap, you just providing swap for 30 days and during that time you cant use you funds + you making money

Read again please.
There's a way to achieve the same or even better result without trusting endless parties.


Title: Re: The Gambling Bank
Post by: LOBSTER on November 08, 2014, 08:47:47 AM
Just learn to play responsible...


Title: Re: The Gambling Bank
Post by: Dabs on November 08, 2014, 02:42:12 PM
Goat mentioned an idea some time ago:

1. Paper wallet. Or Plastic. Or Engraved in Metal.
2. Seal it. Waterproof it. Put it in a box.
3. Bury it under your swimming pool.

You know those bitcoins are always there. If you really really need to get them, you'd have to:

1. Drain the pool.
2. Break a few tiles.
3. Dig up your paper wallet.

You'd still have to trust yourself.

Alternatively, you can do the multi-sig thing above and create the transaction all by yourself, except you destroy the private keys that would have been held by the bank. That way, no one else can double-spend your coins, and you yourself can't redeem them until the time comes.

You are your own bank. That's the whole bitcoin motto right?


Title: Re: The Gambling Bank
Post by: dooglus on November 08, 2014, 06:23:24 PM
Drop me a line and let's make it happen.
Thanks all.

Did you see this?

http://www.mail-archive.com/bitcoin-development@lists.sourceforge.net/msg06250.html
http://blog.viacoin.org/2014/10/01/petertodd-dev-update.html

It looks like it's happening in a much better way - a protocol change that allows you specify the locktime in the transaction that creates an output, rather than at spend time. In that way you don't need to do any of this "forget private key" nonsense.

It could take a while to get into Bitcoin, but if it does it's clearly the best way of solving this problem.


Title: Re: The Gambling Bank
Post by: kleineaap on December 01, 2014, 10:31:18 PM
Drop me a line and let's make it happen.
Thanks all.

Did you see this?

http://www.mail-archive.com/bitcoin-development@lists.sourceforge.net/msg06250.html
http://blog.viacoin.org/2014/10/01/petertodd-dev-update.html

It looks like it's happening in a much better way - a protocol change that allows you specify the locktime in the transaction that creates an output, rather than at spend time. In that way you don't need to do any of this "forget private key" nonsense.

It could take a while to get into Bitcoin, but if it does it's clearly the best way of solving this problem.

I still stand with my idea.
The fact you bring possibilities in the blockchain is refreshing and admirable, yet I don't see it happening as a service with Bitcoin in the near future.

I will put my effort into bringing this to reality as a draft, counting on as many respected escrows as possible.

Thanks for the discussion.