Post
Topic
Board Announcements (Altcoins)
Re: [ANN][XCP] Counterparty - Pioneering Peer-to-Peer Finance - Official Thread
by
semiel
on 07/12/2014, 07:43:55 UTC
Alright, here we go! I've got a fairly polished proof of concept up on Github:

https://github.com/PeterBorah/ethereum-powerball

Instructions for use are in the readme.

I've got a decent number of automated tests for it. Obviously any script that gets banged out in an afternoon is likely to have some residual bugs, but hopefully I've tested it sufficiently that there won't be any major problems.

It hits almost all of the points of the spec, and tries to be very close to the way Powerball works. (Powerball has some weird features, like every prize except the jackpot being fixed, and pretty complex rules for how the jackpot works.) I went with requiring people to claim the prize, since that's what prophetx requested, but of course that could be easily changed.

There is one small deviation from the spec: the ability to set the number of balls. This turned out to be surprisingly difficult, since Serpent doesn't deal well with not knowing how many values there will be ahead of time. However, you can set the payouts for each prize, and by switching out the RNG you can change how many possible values there are for each ball. And of course it would be very easy to modify the code to use, e.g., four balls instead of five.

If that's a dealbreaker, maybe someone can try to add that support, and split the bounty with me. Wink Or maybe prophetx will decide it's good enough as is.

Either way, thanks for the interesting challenge!

Best,
Peter
XCP: 1LeygZteCpjBstARoyt3uHgPhV8aJHsBAg