Author Topic: The way to resolve "The Last Evil Delegate Problem" in DPOS  (Read 12752 times)

0 Members and 1 Guest are viewing this topic.

Offline Riverhead

Wouldn't the jackpot just get awarded in the next block? I'm assuming the network has some way of telling if the winner received their funds. However, your point is well taken.  A bad actor delegate can mess with the system by tampering with blocks.  Perhaps some lessons can be taken from TCP/IP's guaranteed delivery/ack protocol to help with block manipulation?

Offline FreeTrade

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 700
    • View Profile
Another 'evil' delegate problem you might want to consider . .

The last delegate may want to discard a result that is too favorable to someone else.

Let's say there is a large jackpot, and the delegate has a large stake in the DAC . . . maybe the penalty to him for discarding a winning jackpot result is smaller than the penalty for awarding the jackpot (money supply inflation, losing the marketing effect of the jackpot).
“People should be more sophisticated? How are you gonna get that done?” - Jerry Seinfeld reply to Bill Maher

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
hackfish does not want to wait for 101 delegates to get his randomness .. he wants the randomness as early as 1 block .. but that cannot be truely randomnes as a selfish delegate could miss that 1 block intensionally if the random number is not in his favor .. however, wouldn't then the next block/delgate select the random number which might be trustworthy ..
this increases the luck of the selfish delegate by factor 2.

So hackfish prosposes to let the randomnes decided WHICH delegate (within the next N delegates (equally distributed) - excluding the own(selfish) delegate) should pick your random number ..

I really like that idea very much! only disadvantage is that the delay (until you finally get your random number) is NOT constant and depends on "N" (above)

+5% for that proposal hackfish!

Offline Shentist

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 1601
    • View Profile
    • metaexchange
  • BitShares: shentist
then 101 delegate draw a random number and the number who is most drawn will be the number?

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
where can i find something about RNG DPOS? would like to think about it.

would it not possible to let 101 delegate draw the numbers and everydelagte will produce a random number betwenn 1 and 101 the average number is the delegate which numbers are used?
the average number is not  good, the probability of each number is not equal.

Offline Shentist

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 1601
    • View Profile
    • metaexchange
  • BitShares: shentist
where can i find something about RNG DPOS? would like to think about it.

would it not possible to let 101 delegate draw the numbers and everydelagte will produce a random number betwenn 1 and 101 the average number is the delegate which numbers are used?

Offline HackFisher

  • Moderator
  • Hero Member
  • *****
  • Posts: 883
    • View Profile
I prefer  change   evil to selfish
In fact, as a normal user of DAC, we believe that every delegate is selfish
we believe every delegate would choose to miss block if they can profit.
we need set rules to  punish  miss block if possible.

yes, not blaming the evil, so we need to resolve it mathematically within consensus.
The ultimate of this solution can effectively reduce minimum ticket draw time from 101 blocks to 3 blocks and no one will choose to be evil intentionally.
« Last Edit: August 08, 2014, 02:43:59 pm by HackFisher »
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
I prefer  change   evil to selfish
In fact, as a normal user of DAC, we believe that every delegate is selfish
we believe every delegate would choose to miss block if they can profit.
we need set rules to  punish  miss block if possible.

Offline HackFisher

  • Moderator
  • Hero Member
  • *****
  • Posts: 883
    • View Profile
In some sense, this have something in common with shuffle.

If the delegate can not predict the draw block, his attack cost is always larger than attack return from the perspective of probability
« Last Edit: August 08, 2014, 03:28:44 am by HackFisher »
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline HackFisher

  • Moderator
  • Hero Member
  • *****
  • Posts: 883
    • View Profile
In DPOS RNG algorithm, an evil delegate can only choose to throw away an unfavorable random result by intentionally missing block on his slot turn.

This could only be a problem, when the ticket draw interval is less than 101 blocks, because delegate can predict which block he will produce. Then he can choose to buy ticket which will draw in that block.

If the ticket draw interval is larger than 101 blocks, which means there will be at least one shuffle in that period, then the evil delegate can not predict which block he will produce. Then his only strategy is to guess or put tickets in each of the 101 blocks. If guess, his chance is 1/101, the *expect* return he can get back by attacking is the price of that ticket when he lose, because the delegate after him will continue to replace him and draw randomly. If he choose to put ticket in each blocks, his attack cost is (101 * block_ticket_sale), but what's the expected return, still the ticket sale he put in one block, he will lose.

Maybe for some games 101 blocks draw interval is too long for their requirement, and need shorter draw time, the solution is as following:

Ticket result will be drawn by 2 delegates:

The first delegate's random number is only in charge of producing a number X, which is between 1 to 3, and that X will determine the Xth block after him will draw the result random for the ticket. The 2th delegate could be the evil guy who is trying to attack, but he can not predict who will produce the right drawing block before 4 blocks, his attack cost is (3 * block_ticket_sale), but his expect return is still only 1 block_ticket_sale. The only thing game rule need is to set the draw interval 1 block before the first delegate.

Note: block_ticket_sale means all the ticket sale the evil delegate buy in one block.

 
« Last Edit: August 08, 2014, 02:42:50 pm by HackFisher »
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.