Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: remotemass on September 21, 2014, 11:53:41 AM



Title: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: remotemass on September 21, 2014, 11:53:41 AM
I think this would be possible but I am not sure so I would like to know what developers say about this.
There would be a change in the protocol so that a specific address could not be used to send coins. It could only receive them. This way it could be used to burn coins and everyone would be sure that no one could ever own that address and spend those coins.
Then - for every block - the amount of coins that were sent - during that 10 minutes in between block creation - to that "burn address" would be given as a reward with coins entering circulation, making it a lottery.
This means that there would be no limit of bitcoins entering circulation but the extra coins entering circulation other than the ones from mining would be balanced by the ones burned, so no one would loose anything and we could talk about live coins that would still be limited to 21 million and dead coins.

The winner of this lottery mining would always be ruled by the following:

For every amount sent you would have that number of satoshis sent make you have your bitcoin address virtually listed in an ordered list of all the participations as many times as satoshis sent.

So for example if 1KyDtBCT6Vj7VdRP32reeNycrGnVvEjNDV sent 0.00000005 BTC, and after 1n6mSy5xptF8NpF5Nvoy3k1p1vapmZJb3 sent 0.00000003 BTC, and after 112adnFHbxDD9F72gRECPfxL3j62Ktrcm1e sent 0.00000009 BTC

The virtual list with the entries of participations would get to be:

 1 => 1KyDtBCT6Vj7VdRP32reeNycrGnVvEjNDV
 2 => 1KyDtBCT6Vj7VdRP32reeNycrGnVvEjNDV
 3 => 1KyDtBCT6Vj7VdRP32reeNycrGnVvEjNDV
 4 => 1KyDtBCT6Vj7VdRP32reeNycrGnVvEjNDV
 5 => 1KyDtBCT6Vj7VdRP32reeNycrGnVvEjNDV
 6 => 1n6mSy5xptF8NpF5Nvoy3k1p1vapmZJb3
 7 => 1n6mSy5xptF8NpF5Nvoy3k1p1vapmZJb3
 8 => 1n6mSy5xptF8NpF5Nvoy3k1p1vapmZJb3
 9 => 112adnFHbxDD9F72gRECPfxL3j62Ktrcm1e
10 => 112adnFHbxDD9F72gRECPfxL3j62Ktrcm1e
11 => 112adnFHbxDD9F72gRECPfxL3j62Ktrcm1e
12 => 112adnFHbxDD9F72gRECPfxL3j62Ktrcm1e
13 => 112adnFHbxDD9F72gRECPfxL3j62Ktrcm1e
14 => 112adnFHbxDD9F72gRECPfxL3j62Ktrcm1e
15 => 112adnFHbxDD9F72gRECPfxL3j62Ktrcm1e
16 => 112adnFHbxDD9F72gRECPfxL3j62Ktrcm1e
17 => 112adnFHbxDD9F72gRECPfxL3j62Ktrcm1e
...
N => xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

It would then be computed:

( LAST_HASH_VALUE Mod N ) + 1

(where mod is the modulus operation, that is, the remainder of the integer division).
It would be looked up that result in such virtual list of entries and the corresponding bitcoin address would be the winner.

And would get the same amount of coins as was sent to the lottery burn address in between that block creation.

This would allow for a universal lottery with the bitcoin network.
Very simple to use. The lottery address would always be the same as it would be hardwired in the software.

Even, if it won't happen with bitcoin, maybe it could be implemented in some altcoins.
What do you think?
I think it is a really good idea. Imagine the most popular lottery in the world that payed 0% taxes and had 0% revenue for the lottery house.

Such a Free Universal lottery appeals a lot to me!!!


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: deepceleron on September 21, 2014, 12:18:06 PM
There is already such a system. Send a transaction with 1 BTC in fees. Since a miner can collect the fee of any transaction they include in a block, the fees would then, like you say, "be given as a reward with coins entering circulation, making it a lottery".

The failure with your system (besides zero interest) is that miners make the blocks and decide what goes into them. Transactions are stateless, they have no order in which to be processed. The miner can order them however they wish, and can quickly determine a transaction solution that would make their entry always win.


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: franky1 on September 21, 2014, 12:21:21 PM
you might want to look at how currently tx fee's end up as being part of the block reward. as the solution to your lottery is much more simpler then remaking a whole new protocol

EG
address from
1P3r5on5W4ll3t4ddr3ss contents 1.00000000btc
send to
1P3r5on5W4ll3t4ddr3ss amount 0.99999999btc

this puts 1 satoshi to the block and the rest returns to original address

all you have to do is program how to dispurse the funds afterwards. maybe each tx is numbered from 1 to 4000 (rough transaction total limit per 1mb block) and then just have a random number generator that sends reward to the address of winning random number


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: remotemass on September 21, 2014, 12:36:05 PM
There is already such a system. Send a transaction with 1 BTC in fees. Since a miner can collect the fee of any transaction they include in a block, the fees would then, like you say, "be given as a reward with coins entering circulation, making it a lottery".
That's very different from what I am proposing because in my proposed system you don't have to be a miner and the probability of winning is completely separated from the likelihood of miners to win the mining rewards.
What you are saying makes no sense. You cannot use transaction fees to participate in such a lottery as you said.  

The failure with your system (besides zero interest) is that miners make the blocks and decide what goes into them. Transactions are stateless, they have no order in which to be processed. The miner can order them however they wish, and can quickly determine a transaction solution that would make their entry always win.

You may not see anything interesting in my proposal but a lottery that doesn't drag any of your money into taxes or revenues to the owner of the game, and that has the potential to become the most popular lottery in the world, is certainly interesting.
Besides you are missing my point because it doesn't matter the order of the transactions that goes into the block because the hash of the block will be random and unpredictable and so the result is completely unpredictable. There is no way the miners could determine the outcome.


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: -ck on September 21, 2014, 12:48:02 PM
Amusing idea. Chance of it getting majority support for a hard fork and being implemented though? Zero.


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: remotemass on September 21, 2014, 12:49:16 PM
you might want to look at how currently tx fee's end up as being part of the block reward. as the solution to your lottery is much more simpler then remaking a whole new protocol

EG
address from
1P3r5on5W4ll3t4ddr3ss contents 1.00000000btc
send to
1P3r5on5W4ll3t4ddr3ss amount 0.99999999btc

this puts 1 satoshi to the block and the rest returns to original address

all you have to do is program how to dispurse the funds afterwards. maybe each tx is numbered from 1 to 4000 (rough transaction total limit per 1mb block) and then just have a random number generator that sends reward to the address of winning random number

My proposal wouldn't affect the tranaction fees. Miners would get exactly the same rewards and no one would be affected at all as the extra coins for the lottery would be in the same amount as those sent to the hardwired burnt address.


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: remotemass on September 21, 2014, 12:53:50 PM
Amusing idea. Chance of it getting majority support for a hard fork and being implemented though? Zero.

Well, this would be an extra to an hard-fork that would implement some other more important features.
We can start by simply having a burn address that everyone can trust. That would already be an interesting feature.
Or we can think of such a feature being implemented in some other cryptocurrency.
It would certainly become an allure of it.


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: franky1 on September 21, 2014, 02:06:03 PM
the reason i thought of showing you a alternative method was because your idea has a few flaws.
1) an address that no one can then spend, is an address where funds cannot move out of (because spending IS moving)
2) having half a dozen deposit addresses makes coding the protocol alot harder
3) if miners did not deal with the reward disbursement.. then who would?? and how would you make it trustless and unable to be manipulated
4) you cant just send 1sat to an address (satoshi dust limit)
5) the collecting funds and random disbursment would be much more easier to code if done as a tx fee method and a random number generated between 1 <> total transactions of block.

it was only a quick 5 minute thought to try to find the simplest solution to making a new alt have a lottery.

it also confused me where your reply to me says it wouldnt affect tx fee's... yet your OP post says

Quote
given as a reward with coins entering circulation, making it a lottery.

which to me read as the same principle of how tx fee's work


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: andytoshi on September 21, 2014, 02:21:42 PM
There would be a change in the protocol so that a specific address
Addresses do not appear in the protocol.

Quote
could not be used to send coins. It could only receive them.
This is already the case. (https://en.bitcoin.it/wiki/From_address)

Quote
This way it could be used to burn coins
You can burn coins by use of provably unspendable outputs.

Quote
and everyone would be sure that no one could ever own that address and spend those coins.
It is possible to create addresses for which "everyone is sure" that nobody owns corresponding key material, by use of nothing-up-my-sleeve numbers or "hashes" with too much structure to have possibly been found by searching. But you cannot make them provably unownable, so doing this is strictly inferior to using ordinary provably unspendable outputs.

Quote
Then - for every block - the amount of coins that were sent - during that 10 minutes in between block creation - to that "burn address" would be given as a reward with coins entering circulation

This is already the fee semantics, and has nothing to do with addresses.

Quote
, making it a lottery.

Fees are not a lottery. You later indicate that this new reward has a fixed miner-independent destination determined by the protocol, so I suppose I am misunderstanding. In future, I advise you to not use the term "reward" to describe coinbase outputs which are not miner rewards, since this will only cause confusion.

Quote
The winner of this lottery mining would always be ruled by the following:

For every amount sent you would have that number of satoshis sent make you have your bitcoin address

Who lists your address? Every validator, I suppose. How do they know it? Was it encoded in the burn address somehow?

Quote
virtually listed in an ordered list of all the participations as many times as satoshis sent.

So for example if 1KyDtBCT6Vj7VdRP32reeNycrGnVvEjNDV sent 0.00000005 BTC, and after 1n6mSy5xptF8NpF5Nvoy3k1p1vapmZJb3 sent 0.00000003 BTC, and after 112adnFHbxDD9F72gRECPfxL3j62Ktrcm1e sent 0.00000009 BTC

The list with the entries of participations would get to be:

<snip>

It would then be computed:

LAST_HASH_VALUE Mod N
How is the ordering of these addresses determined? Why have you chosen a probability distribution so that the ones near the front of the list are more likely to be selected than ones on the last? (The difference is negligible, but totally unnecessary.) Also, miners would always take this reward since they control what goes into the list of addresses, so the distribution is irrelevant.

Quote
<snip>
This would allow for a universal lottery with the bitcoin network.

Have you investigated any of the other research into trustless lotteries? For example this one (http://eprint.iacr.org/2013/784)?

Quote
<snip>
Even, if it won't happen with bitcoin, maybe it could be implemented in some altcoins.
Wouldn't surprise me. (https://download.wpsoftware.net/bitcoin/alts.pdf)



Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: remotemass on September 21, 2014, 02:24:42 PM
the reason i thought of showing you a alternative method was because your idea has a few flaws.
1) an address that no one can then spend, is an address where funds cannot move out of (because spending IS moving)
2) having half a dozen deposit addresses makes coding the protocol alot harder
3) if miners did not deal with the reward disbursement.. then who would?? and how would you make it trustless and unable to be manipulated
4) you cant just send 1sat to an address (satoshi dust limit)
5) the collecting funds and random disbursment would be much more easier to code if done as a tx fee method and a random number generated between 1 <> total transactions of block.

it was only a quick 5 minute thought to try to find the simplest solution to making a new alt have a lottery.

You don't seem to have a clue of what I am talking about.

1) and 2) Doesn't make sense
3) The extra coins entering circulation would be extra, that means rewards from mining and transaction fees would be exactly the same

4) I never said you would send a single satoshi. You send ANY amount that you want and a purely virtual list is taken into account to have a numbered list of participations. Each participation will regard one satoshi only associated with a bitcoin address but coins are sent all at the same time. Is just that if you send 1 BTC you are buying 100, 000 000 entries. If you send 0.05 BTC you "buy" 5 million entries. Etc. You get the idea. But these entries are purely virtual. Is just for the software to know the winner, calculating the winner entry and the corresponding address.

5) Seems nonsense, also.

Do you really understand my idea? I suggest you read it more thoroughly and ask me questions. It seems you have no clue of what I am talking about.
Maybe would be good someone that actually understands what I am proposing explains it in a better way... I understand that it may be confusing at first and/or that I am not explaining it in the best way.



Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: franky1 on September 21, 2014, 02:37:50 PM
fine questions

1) do you want the lottery funds to be merged in with block rewards and transaction fee's?
if yes then your idea is simply.. THE TRANSACTION FEE'S... you dont need special addresses to add funds into the reward pot..
2) if the lottery pot is to be separate from the mining reward pot. and dispersed away from mining (QUOTE: inbetween blocks) then who is dispersing it if its done between blocks?
3) if the lottery pot is separate from mining reward pot but dispersed AT block creation. then explain how and who gets the lottery pot where miners cant manipulate the code or make it so that a preferential winner is chosen


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: deepceleron on September 21, 2014, 02:38:12 PM
There is already such a system. Send a transaction with 1 BTC in fees. Since a miner can collect the fee of any transaction they include in a block, the fees would then, like you say, "be given as a reward with coins entering circulation, making it a lottery".
That's very different from what I am proposing because in my proposed system you don't have to be a miner and the probability of winning is completely separated from the likelihood of miners to win the mining rewards.
That part was a joke, I was only pointing out that the quoted paragraph is fulfilled by mining fee.




The failure with your system (besides zero interest) is that miners make the blocks and decide what goes into them. Transactions are stateless, they have no order in which to be processed. The miner can order them however they wish, and can quickly determine a transaction solution that would make their entry always win.

Besides you are missing my point because it doesn't matter the order of the transactions that goes into the block because the hash of the block will be random and unpredictable and so the result is completely unpredictable. There is no way the miners could determine the outcome.

What you describe is so different from the way that Bitcoin works it is hard to fathom in technical details what you are saying. Bitcoin is only comprised of transactions with ECDSA-signed spends, and UXTOs to a new address. A generate transaction is the only unique one, because Bitcoin allows for an additional transaction per block with no inputs, which pays to an address(es) or a public key, and the maximum that payment can be is MAX_REWARD + FEES.

You seem to be proposing another kind of "virtual" transaction as unique as the generate transaction, where Bitcoin sees another amount as spendable from the calculated lottery winner. The winner would be able to spend the "won" amount with the same privkey as entered. A whole new way of referring to this transaction number when spending would need to be thought of though, if you know how UXTOs are specified in transactions. The "entrant" transactions would only be unusual in that they are sending normal bitcoins to a new type of unspendable address, recognizable as being a lottery entrance, say any address with a network byte of 77.

The first critique is that hash % number of tickets = winning ticket is not fair. There are solutions to this, in fact I wrote them: http://we.lovebitco.in/raffle.html

Now the second inaccuracy - you say that entries will be made "during that 10 minutes in between block creation" - that's not how bitcoin works. Entering the contest takes a spending transaction. Miners choose what transactions to include in a block, and transactions must be included in a block in order to be spent or burnt. Transactions may have a large queue, miners may ignore some or all lottery transactions, etc. They might not be included in the next block, nor is there really a promise that they would be included in any particular order or in any block at all if miners all conspire to ignore them.

Then it all breaks down when you say "last hash" which I interpret to be the hash of the previous block.

So now we know that miners can pick and choose transactions, can include them in the Merkle tree in any order that they want, and that the "picking mechanism", the hash, is already known. It is a simple matter to gather up as many entrant transactions as possible, add one more transaction as the miner's entrance to get N, and determine the "winning ticket number". The miner just moves around the transactions until his is the winning number. If there is no solution, the miner just adds more satoshis or BTC to re-sort things until there is. Then he starts hashing that block.

Let's say you weren't so naive and that "last hash" meant the top hash of the current block, the one including the entrance transactions. This is not so manipulable in Bitcoin, because the hashed data includes the Merkle tree including the entrant transactions. This would still be subject to miner attack. The miner can include 9999 BTC of his own entrance transaction, vs the 1 BTC he includes from other entrants, so he will win 99.99% of the time and collect the 1 BTC. If a block is mined where he's not the winner, it can be discarded and he continues mining. He will never lose because his lottery entry is not published on the rest of the network.



Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: remotemass on September 21, 2014, 03:23:08 PM
There would be a change in the protocol so that a specific address
Addresses do not appear in the protocol.

Quote
could not be used to send coins. It could only receive them.
This is already the case. (https://en.bitcoin.it/wiki/From_address)

Well, I mean to originate a transaction signed by the private key to which that  address corresponds. I'd rather not play word games here. It will only confuse the discussion.

The miners would have to include the new extra lottery coins (minted) to the address of a winner that burnt their coins in a previous (confirmed) block.

The important thing is that you can burn the coins and that the coins burnt cannot be spent. I'm not sure in what sense it would be different with provable unspendable outputs. Can you please clarify that?

The order of the transactions will be that order that they have in the blockchain.

All the participants have a probability of winning corresponding to the amount they sent. Probability is simply: amount sent/total_of_amounts_sent.
Prize is: total_of_amounts_sent.

I have no idea why you say the probability distribution I chose is so that the ones near the front of the list are more likely to be selected than ones on the last.
Do you care to explain why do you say that?


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: andytoshi on September 21, 2014, 03:53:34 PM
Well, I mean to originate a transaction signed by the private key to which that  address corresponds. I'd rather not play word games here. It will only confuse the discussion.

Signing a transaction with a private key to which an address corresponds is nothing like "sending from an address" the way than any English speaker would understand "sending". Did you read the linked article?

Quote
The miners would have to include the new extra lottery coins (minted) to the address of a winner that burnt their coins in a previous (confirmed) block.

How many blocks back? From which block(s) are you extracting randomness? Can you describe the ways that various parties would try to game this system and what the costs to them would be?

Quote
The important thing is that you can burn the coins and that the coins burnt cannot be spent. I'm not sure in what sense it would be different with provable unspendable outputs. Can you please clarify that?
Provably unspendable outputs do not need to be stored by every single full node on the network for eternity. Non-provably unspendable (but unspendable) outputs do have this property.

Quote
I have no idea why you say the probability distribution I chose is so that the ones near the front of the list are more likely to be selected than ones on the last.
Do you care to explain why do you say that?
Suppose the blockhashes were to lie in [0, 9] rather than [0, 2^256-1], and that there were nine participants. Do you see why taking RNG([0, 9]) mod 9 will result in zero appearing twice as often as every other number?


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: remotemass on September 21, 2014, 04:16:38 PM

What you describe is so different from the way that Bitcoin works it is hard to fathom in technical details what you are saying. Bitcoin is only comprised of transactions with ECDSA-signed spends, and UXTOs to a new address. A generate transaction is the only unique one, because Bitcoin allows for an additional transaction per block with no inputs, which pays to an address(es) or a public key, and the maximum that payment can be is MAX_REWARD + FEES.

You seem to be proposing another kind of "virtual" transaction as unique as the generate transaction, where Bitcoin sees another amount as spendable from the calculated lottery winner. The winner would be able to spend the "won" amount with the same privkey as entered. A whole new way of referring to this transaction number when spending would need to be thought of though, if you know how UXTOs are specified in transactions. The "entrant" transactions would only be unusual in that they are sending normal bitcoins to a new type of unspendable address, recognizable as being a lottery entrance, say any address with a network byte of 77.

The first critique is that hash % number of tickets = winning ticket is not fair. There are solutions to this, in fact I wrote them: http://we.lovebitco.in/raffle.html

Now the second inaccuracy - you say that entries will be made "during that 10 minutes in between block creation" - that's not how bitcoin works. Entering the contest takes a spending transaction. Miners choose what transactions to include in a block, and transactions must be included in a block in order to be spent or burnt. Transactions may have a large queue, miners may ignore some or all lottery transactions, etc. They might not be included in the next block, nor is there really a promise that they would be included in any particular order or in any block at all if miners all conspire to ignore them.

Then it all breaks down when you say "last hash" which I interpret to be the hash of the previous block.

So now we know that miners can pick and choose transactions, can include them in the Merkle tree in any order that they want, and that the "picking mechanism", the hash, is already known. It is a simple matter to gather up as many entrant transactions as possible, add one more transaction as the miner's entrance to get N, and determine the "winning ticket number". The miner just moves around the transactions until his is the winning number. If there is no solution, the miner just adds more satoshis or BTC to re-sort things until there is. Then he starts hashing that block.

Let's say you weren't so naive and that "last hash" meant the top hash of the current block, the one including the entrance transactions. This is not so manipulable in Bitcoin, because the hashed data includes the Merkle tree including the entrant transactions. This would still be subject to miner attack. The miner can include 9999 BTC of his own entrance transaction, vs the 1 BTC he includes from other entrants, so he will win 99.99% of the time and collect the 1 BTC. If a block is mined where he's not the winner, it can be discarded and he continues mining. He will never lose because his lottery entry is not published on the rest of the network.



>> What you describe is so different from the way that Bitcoin works

I know how bitcoin works. You don't have to explain me that.

>> You seem to be proposing another kind of "virtual" transaction

I mean a generation transaction that creates new coins from nothing.
There would be the coins entering circulation for mining, as usually, and
(roughly, 25 BTC every 10 minutes) plus the new lottery coinbase coins (same amount
recently burnt)

>>recognizable as being a lottery entrance, say any address with a network byte of 77

There is no need for that.

>> Now the second inaccuracy - you say that entries will be made

Maybe my explanation was not very good but what I mean is that each block would be
having one of these lottery contests.
The transactions must be in the blockchain and with 6 confirmations or so, and only
then miners will pay the prize minting a number of coins equivalent to the amount
of coins that are confirmed to be burned on that contest.


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: franky1 on September 21, 2014, 04:43:22 PM
as you can tell.. many are confused. and as more read the OP the more confused people will be. so it might be worth editing the OP and being a little more detailed about:
how the coins are produced/gathered up
how they are dispursed (by miners or separate entities)
how someone is eligible to 'win' (random winner selection)
how to prevent manipulation.

afterall the mining block reward as it is, is a form of manipulation. because the miners can put in their own address as the destination for the block reward. but of course they have to solve the block for the block reward to get to their destination.. and if someone else solves it, it would go to that persons chosen destination because the miners code the mining protocol to their own preferential destinations (self rewarding mining, which is acceptable form of manipulation seeing as they do the work)

so how would you stop a miner changing the destination of the lottery winner.....


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: deepceleron on September 21, 2014, 04:48:36 PM

>> You seem to be proposing another kind of "virtual" transaction


I mean a generation transaction that creates new coins from nothing.
There would be the coins entering circulation for mining, as usually, and
(roughly, 25 BTC every 10 minutes) plus the new lottery coinbase coins (same amount
recently burnt)

There is no need for an actual transaction. This only allows miners to omit the lottery reward transaction or pay it to arbitrary individuals, requiring "validation rules" for the transaction. Given the list of entrants from a block and a winner-picking hash from another, any Bitcoin client can determine the winner, recognize the balance and owner, and determine the validity of it being spent.


>>recognizable as being a lottery entrance, say any address with a network byte of 77

>There is no need for that.


You cannot make a normal bitcoin address unspendable. There are quadrillions of private keys that may equal that particular address and be generated offline by any of hundreds of tools in existence. While the chance of generating the same address is infinitesimal, it must be considered. It is one thing to to be able to send coins to an address that might be spendable by two people, it's another thing entirely to be able to send (or expect to receive) coins to an address that can be spendable by nobody or would be given to someone else.


>> Now the second inaccuracy - you say that entries will be made

>Maybe my explanation was not very good but what I mean is that each block would be having one of these lottery contests.
>The transactions must be in the blockchain and with 6 confirmations or so, and only then miners will pay the prize minting a number of coins equivalent to the amount of coins that are confirmed to be burned on that contest.

Again, we don't need a transaction to make the winnings. However you hint at the solution to most miner-based attacks. The hash of block X+10 picks the winner of block X. For example, let's say block 300,000 included your lottery payment; block 300,010's hash will determine the winner of block 300,000. When the list of entrants is buried under a few blocks before the winner-choosing hash occurs, the only miner attack method is block discarding (discarding block finds that don't pick the miner as winner), which could be very costly depending on the economics of the coin, and the influence of a miner is only proportionate to their percentage of the hashrate.

It is also probable that there will be many blocks with no entries or just a single entry. You could even say blocks 300,001-300,144 are one contest period (every 144 blocks), and block 300,154 picks the winner, making it a daily or weekly drawing.


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: remotemass on September 21, 2014, 05:20:51 PM
<snip>

>> There is no need for an actual transaction

I disagree. Although clients are able to determine the winner you would need someone to have a private key to spend the funds to pay the prize.
That makes it impossible to be sure he will pay the prize so it really makes more sense to enforce the prize payment with minted coins.
Those minted coins wouldn't affect anyone because they would correspond to the same amount of coins burnt.

>>You cannot make a normal bitcoin address unspendable.

Yes you can. You just need the protocol to be saying that transactions from that address are to be considered invalid.

>> Again, we don't need a transaction to make the winnings. However you hint at the solution to most miner-based attacks. The hash of block X+10 picks the winner of block X. For example, let's say block 300,000 included your lottery payment; block 300,010's hash will determine the winner of block 300,000. When the list of entrants is buried under a few blocks before the winner-choosing hash occurs, the only miner attack method is block discarding (discarding block finds that don't pick the miner as winner), which could be very costly depending on the economics of the coin, and the influence of a miner is only proportionate to their percentage of the hashrate.

>> It is also probable that there will be many blocks with no entries or just a single entry. You could even say blocks 300,001-300,144 are one contest period (every 144 blocks), and block 300,154 picks the winner, making it a daily or weekly drawing.


Exactly.


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: remotemass on September 21, 2014, 09:47:52 PM
I have to agree that using the hash of a block is prone to miners manipulation as they would be able to discard blocks that didn't make them winners.

Since *difficulty* changes every 2016 blocks, what about running the contest on the
first block after difficulty changes and use as random number the hash of: (all the following 2015 block hashes + new difficulty). Wouldn't that be a good random number for the winner draw?
The lottery would run every two weeks and you would have to place your bets during the first block.

Can you think of something even better?

[EDIT] I think Twitter could also be used as a third party to avoid that miners could discard blocks to manipulate the results. The random number mentioned just needs to be affected by a twitter-ID generated afterwards.
"Bitmillions" uses Twitter as a third party for a bitcoin lottery and it seems it works fine. https://en.bitcoin.it/wiki/BitMillions

[EDIT] Other reliable third parties for the the random number generation could be used, like Random.org, that has a good API.


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: itod on September 21, 2014, 10:36:43 PM
It looks like the OP is heavily misunderstood. His proposal doesn't have anything to do with the transaction fees. He just proposed an alternative coinbase included in every block, with the difference that this alternative coinbase would not be fixed to current 25BTC, but would be the exact sum of inputs in that block which have unspendable destination address.

Distribution of this alternative coinbase would not depend on the miner who mined a block, but would be spendable only by the private key corresponding to one of the public keys which sent BTC to unspendable address. Miners would gladly include such a lottery transactions in blocks because nothing stops those lottery trabsactions to have normal transaction fees.

Chances that the core devs would accept such a large change are close to zero, but the idea is very interesting and in general quite doable. It's at least worth a BIP, since such a lottery would really be great incentive for people to buy BTC.


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: deepceleron on September 22, 2014, 12:57:48 AM
I'm done here. it's obvious that OP reads like he quotes, taking the first sentence of a statement without reading the explanation and then replying in contradiction to what was just explained without an articulate reason of his own.


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: remotemass on September 22, 2014, 02:42:32 AM
I'm done here. it's obvious that OP reads like he quotes, taking the first sentence of a statement without reading the explanation and then replying in contradiction to what was just explained without an articulate reason of his own.

That's a pity. I actually found your comments very helpful for the discussion. I wish I could have answered you better. I try my best to reason, answer and articulate for the discussion to be worthy. I'm open to discussion and don't claim to have all the reason in any way. I actually don't want to contradict. Just want to make my case clear and find interesting solutions to make such a FREE lottery possible.

What bewilders me the most is that once we have such free lotteries we can gamble in any of them independently and keep having more chances of winning in them, generally.
If you spend 100 BTC in your lifetime in free lotteries you get the same chance of winning whether you play them all at once or in different lotteries in a cumulative way.
The more that you play, the more likely it will be that you end up without having lost money.

I also like the idea that it reduces the burden of games like SatoshiDice as people would be playing more in these new lotteries that don't cause spamming of the blockchain.


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: remotemass on September 22, 2014, 02:38:02 PM
I had another idea that would make this lottery even more popular and remarkable.
The burn address, that is, the address to where you would send coins to participate in a lottery contest, would simply be:
1234567891234567891234567891234567

It ends in 7 (considered by mystics a number with magical proprieties), no zeros, 34 chars.
So simple. But it is good to use. Everyone can type it using a telephone for instance.
And we have to agree that no one will ever be able to spend with the corresponding private key.
Do we agree on that? Good.

So this would mean that one rule less would have to be enforced, namely you wouldn't have to enforce that transactions to our burnt address could not be valid.

Now we just need to convince the community that the same amount of all coins burnt to that address should enter circulation being given to our random winner, given that in that randomness it would be included a factor unpredictable by
miners like a third party factor given by twitter API, for instance, as does bitmillions.com; by random.org API, or similar.

To enforce all miners to include an extra coinbase a hardfork seems necessary: so that incompatibilities could arise in the majority of nodes if miners tried to avoid those rules.

Please send 1 satoshi now to 1234567891234567891234567891234567
if you like it :)

http://oi57.tinypic.com/14vtg9d.jpg

[EDIT] Ouch! That address is not valid.


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: Razick on September 22, 2014, 03:19:28 PM
This just isn't the purpose of Bitcoin. Gambling can be implemented outside of the network, but a built-in lottery system would only add strain with no real benefit.


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: itod on September 22, 2014, 03:25:23 PM
This just isn't the purpose of Bitcoin. Gambling can be implemented outside of the network, but a built-in lottery system would only add strain with no real benefit.

Add strain to what - Bitcoin network? Don't we want more transactions with fees, not less? And it can't be implemented outside the network, since sending to unspendable addy would reduce the number of bitcoins significantly if it catches up and many people start to play, the only way to recover those burnt coins is through alternative coinbase.


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: cr1776 on September 22, 2014, 04:06:47 PM
This just isn't the purpose of Bitcoin. Gambling can be implemented outside of the network, but a built-in lottery system would only add strain with no real benefit.

Add strain to what - Bitcoin network? Don't we want more transactions with fees, not less? And it can't be implemented outside the network, since sending to unspendable addy would reduce the number of bitcoins significantly if it catches up and many people start to play, the only way to recover those burnt coins is through alternative coinbase.

It can be implemented outside the network, just not using a burn address like this. 


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: itod on September 22, 2014, 04:09:24 PM
This just isn't the purpose of Bitcoin. Gambling can be implemented outside of the network, but a built-in lottery system would only add strain with no real benefit.

Add strain to what - Bitcoin network? Don't we want more transactions with fees, not less? And it can't be implemented outside the network, since sending to unspendable addy would reduce the number of bitcoins significantly if it catches up and many people start to play, the only way to recover those burnt coins is through alternative coinbase.

It can be implemented outside the network, just not using a burn address like this. 

And what do you suggest using instead of burn address with keeping it 0 trust?


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: btchris on September 22, 2014, 04:24:36 PM
Add strain to what - Bitcoin network? Don't we want more transactions with fees, not less?

Why are "more transactions with fees" desirable?

If you start with the assumption that the purpose of Bitcoin is to make money for miners, then yes "more transactions with fees" would be desirable.

But the purpose (or at least a purpose) of Bitcoin is to permit transactions and permit stored value. In other words, the decentralized transactions themselves, as well as the stored value of bitcoins, is the purpose of (capital-B) Bitcoin. Miners are just a necessary component in securing Bitcoin. Transaction spam, whether it includes fees or not, is still spam.

Technical discussions aside, OP's idea has problems for at least two other reasons.

First of all, I don't like lotteries. I like blackjack. I therefore think it would be unfair for zero-trust lotteries to be added to the blockchain unless blackjack is also added. Would anyone else like to add something? (Poker would be pretty cool I think.)

Secondly, unregulated lotteries are illegal in many (most?) jurisdictions. Although transactions can be used for either legal or illegal purposes, unregulated lotteries would always be illegal in those jurisdictions. The fact that something is illegal isn't reason enough to avoid it, for example if it were added to right some terrible evil, but I really don't see lotteries as an inalienable human right that Bitcoin should concern itself with.


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: cr1776 on September 22, 2014, 08:38:07 PM
This just isn't the purpose of Bitcoin. Gambling can be implemented outside of the network, but a built-in lottery system would only add strain with no real benefit.

Add strain to what - Bitcoin network? Don't we want more transactions with fees, not less? And it can't be implemented outside the network, since sending to unspendable addy would reduce the number of bitcoins significantly if it catches up and many people start to play, the only way to recover those burnt coins is through alternative coinbase.

It can be implemented outside the network, just not using a burn address like this. 

And what do you suggest using instead of burn address with keeping it 0 trust?

Something like what is discussed here:
https://en.bitcoin.it/wiki/Contracts#Example_8:_Multi-party_decentralised_lotteries
and
http://eprint.iacr.org/2013/784

e.g.
Quote
As an instantiation of this idea we construct protocols for secure multiparty lotteries using the Bitcoin currency, without relying on a trusted authority. By “lottery” we mean a protocol in which a group of parties initially invests some money, and at the end one of them, chosen randomly, gets all the invested money (called the pot). Our protocols can work in purely peer-to-peer environment, and can be executed between players that are anonymous and do not trust each other. Our constructions come with a very strong security guarantee: no matter how the dishonest parties behave, the honest parties will never get cheated. More precisely, each honest party can be sure that, once the game starts, it will always terminate and will be fair.





Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: remotemass on September 22, 2014, 09:24:04 PM
First of all, I don't like lotteries. I like blackjack. I therefore think it would be unfair for zero-trust lotteries to be added to the blockchain unless blackjack is also added. Would anyone else like to add something? (Poker would be pretty cool I think.)


I think you could emulate most gambling games, including blackjack assuming the
players are the best players possible as they would use a computer to decide how
to play and could, for that matter, be automated.
You just need to generate a random number to know the state of the shuffled deck(s) and another random number to know the state of how the players will play (that will only depend on when they enter and leave the game).
It would be very tricky to emulate blackjack with a lottery like this but I'm pretty sure it is possible, if you could concede on the time constrains.
I'll give you an example of how you could emulate a roulette.
You need an address for each of the odds that enforces the rule that when the total amount at sake required for the win of the bet of the first player is fulfilled the winner is decided.
For instance, in roulette, you have bets that have odds 50/50, like red/black, odd/pair, 1-18/19-36.
So, to place such a bet you would have a lottery address designed so that once the total amount of bets surpasses 2X the bet of the first bet placed the winner outcome is decided, sending change of the surpassed amounts back to
the corresponding players.
It is complicated, but I am pretty sure that if you can concede on the time constrains, such gambling games could be emulated to a certain degree.

Secondly, unregulated lotteries are illegal in many (most?) jurisdictions. Although transactions can be used for either legal or illegal purposes, unregulated lotteries would always be illegal in those jurisdictions. The fact that something is illegal isn't reason enough to avoid it, for example if it were added to right some terrible evil, but I really don't see lotteries as an inalienable human right that Bitcoin should concern itself with.

I'm fond of things that liberate people, rather. And I sense something quite liberating about this kind of lottery. You would be able to play an hazardous game without a sense of loss.


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: cr1776 on September 23, 2014, 01:31:59 AM
...
I'm fond of things that liberate people, rather. And I sense something quite liberating about this kind of lottery. You would be able to play an hazardous game without a sense of loss.

I too am fond of things that liberate people.  As an aside, if things can be implemented without a hard fork for bitcoin, that is a good thing because then it is a much more difficult target to attack.  If the bitcoin protocol and software itself implemented any type of gambling, it makes it a bigger target.  If they can be implemented on top of the blockchain, bitcoin is less of a target itself and you get the benefits you may have been thinking about regarding another use for bitcoin.

:-)


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: Razick on October 01, 2014, 05:06:00 PM
This just isn't the purpose of Bitcoin. Gambling can be implemented outside of the network, but a built-in lottery system would only add strain with no real benefit.

Add strain to what - Bitcoin network? Don't we want more transactions with fees, not less? And it can't be implemented outside the network, since sending to unspendable addy would reduce the number of bitcoins significantly if it catches up and many people start to play, the only way to recover those burnt coins is through alternative coinbase.

If you are a miner yeah, but the reality is that lottery transactions would push out low priority transactions with lower fees making Bitcoin more expensive for users. Making money for miners is not the primary or even a major purpose of Bitcoin (I do understand why it is necessary, but it doesn't exist for that purpose).

A bigger concern is that the blockchain size would be inflated. We want to encourage USE of the bitcoin network, but not WASTE. A built in lottery would be a waste of network resources.

It couldn't be implemented outside the network in the way the OP proposes, but that doesn't mean it couldn't be implemented somehow.


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: Razick on October 01, 2014, 05:07:27 PM
This just isn't the purpose of Bitcoin. Gambling can be implemented outside of the network, but a built-in lottery system would only add strain with no real benefit.

Add strain to what - Bitcoin network? Don't we want more transactions with fees, not less? And it can't be implemented outside the network, since sending to unspendable addy would reduce the number of bitcoins significantly if it catches up and many people start to play, the only way to recover those burnt coins is through alternative coinbase.

It can be implemented outside the network, just not using a burn address like this. 

And what do you suggest using instead of burn address with keeping it 0 trust?

That's really not important since it's not the purpose of Bitcoin. If someone wants a lottery they can figure out how to do it themselves.


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: justusranvier on October 01, 2014, 05:31:19 PM
Troll/disruption activity seems to be in an increase recently.


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: tspacepilot on October 01, 2014, 05:46:06 PM
Amusing idea. Chance of it getting majority support for a hard fork and being implemented though? Zero.

Exactly this^^^.  While I enjoy gambling and whatnot, not everyone does.  This sort of amusement would make the bitcoin network seem a lot less serious and focused.  You can't build unmotivated larks and games and distractions into a project with the scope and ambitions of bitcoin.


Title: Re: Hard-Fork to make us have a have a FREE Universal lottery system
Post by: Razick on October 13, 2014, 10:33:31 PM
Amusing idea. Chance of it getting majority support for a hard fork and being implemented though? Zero.

Exactly this^^^.  While I enjoy gambling and whatnot, not everyone does.  This sort of amusement would make the bitcoin network seem a lot less serious and focused.  You can't build unmotivated larks and games and distractions into a project with the scope and ambitions of bitcoin.

I don't have a problem with gambling per se, but I can tell you I would be in the majority that would oppose this.