Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: mskwik on July 15, 2012, 11:22:41 PM



Title: LiteDice
Post by: mskwik on July 15, 2012, 11:22:41 PM
I've been working on redesigning some of the backend bitcoin payment stuff that I have been using and in the process made it fairly simple to have it support alt-coins with the same basic design/networking.  My end goal was to make it much simpler to put basic (and not so basic) ***coin projects together without having to do security from the bottom up for each project.  Not really sure when/if those bits will ever be directly released but in the meantime I threw together a simple proof-of-concept to try things out.

http://greenishblue.info/litedice (http://greenishblue.info/litedice)

The display/explanations may be a little rough around the edges but it is fully functional.  As always don't gamble with any coins you can't afford to lose and if you run into any issues let me know the tx hash and I'll track it down.


Title: Re: LiteDice
Post by: ElectricMucus on July 16, 2012, 12:36:45 AM
Nice  8)

Though the house edge is a little too high for my taste. Satoshidice has 1.9% why is this 3%?


Title: Re: LiteDice
Post by: AndrewBUD on July 16, 2012, 12:46:34 AM
1dice was 3% for a while..... just  recently changed back to 1.9% ...



Title: Re: LiteDice
Post by: mskwik on July 16, 2012, 01:16:48 AM
I figured it was safest to start with the edge on the high side and adjust lower later if possible.  The actual house edge (as opposed to the average displayed) depends on the bet size due to the minimum amount returned for a loss (which has to be somewhat higher than the 1dice ones due to the current fee rules on the litecoin network) so basically I wanted to make sure the expected return stays positive even with a lot of small bets.


Title: Re: LiteDice
Post by: mskwik on July 16, 2012, 10:41:01 PM
Sorry if the return txs were a little slow there for a bit, seems my local litecoind decided to ban me for trying to relay too many transactions through it at once, at least that problem shouldn't happen again  :)


Title: Re: LiteDice
Post by: smoothie on July 17, 2012, 12:44:30 AM
First bet of 5btc, I won but never was paid:
http://greenishblue.info/litedice/1511b6a5bed84571437c9bb8a0ccd701eea4d2277e2d7dd3d418c0f4f31c6747-1.html

My second bet of 1btc, I lost, but was paid my 0.01: http://greenishblue.info/litedice/ebe5569392c7f877345ef7d8637816ab8568b7b8d576571bd9609439f955c5f1-1.html

Whats going on?


Don;'t you know?.......SCAM! lol j/k


Title: Re: LiteDice
Post by: mskwik on July 17, 2012, 02:30:47 PM
First bet of 5btc, I won but never was paid:
http://greenishblue.info/litedice/1511b6a5bed84571437c9bb8a0ccd701eea4d2277e2d7dd3d418c0f4f31c6747-1.html

My second bet of 1btc, I lost, but was paid my 0.01: http://greenishblue.info/litedice/ebe5569392c7f877345ef7d8637816ab8568b7b8d576571bd9609439f955c5f1-1.html

Whats going on?

Hmm, it looks like I have 3 payments now in the outgoing queue that are stuck at 0 confirmations but it has sent other payments in the meantime just fine, must be something about those it doesn't like.  I'm working on it, will (hopefully) get it sent shortly.


Title: Re: LiteDice
Post by: mskwik on July 17, 2012, 04:18:24 PM
http://abe.liteco.in/tx/5e8888caffda681b90f02bf93544375bf2ed22c3765e2035038630924c2febd6 (http://abe.liteco.in/tx/5e8888caffda681b90f02bf93544375bf2ed22c3765e2035038630924c2febd6)

And there it goes.  Guess I gotta go through and check my locking, looks like it was trying to double-spend one of those inputs with another tx created at the same time.


Title: Re: LiteDice
Post by: bncbnc on July 18, 2012, 02:48:51 PM
http://abe.liteco.in/tx/5e8888caffda681b90f02bf93544375bf2ed22c3765e2035038630924c2febd6 (http://abe.liteco.in/tx/5e8888caffda681b90f02bf93544375bf2ed22c3765e2035038630924c2febd6)

And there it goes.  Guess I gotta go through and check my locking, looks like it was trying to double-spend one of those inputs with another tx created at the same time.

Beautiful. I was addicted to SatoshiDice (And lost like 40btc), I feel like having access to this one may be bad for me (But good for you I guess :))


Title: Re: LiteDice
Post by: mystery2048 on July 19, 2012, 06:30:29 AM
Oh, nice project you have there... :)


Title: Re: LiteDice
Post by: Tittiez on August 01, 2012, 02:28:32 AM
I love this


Title: Re: LiteDice
Post by: tacotime on August 01, 2012, 02:37:07 AM
you might wanna make it wait for 6 confirmations before you send out the return for rewards, it seems pretty dangerous to have it wait for 0 confirmations to send it.

edit: I see you changed that right after I mentioned it, haha.


Title: Re: LiteDice
Post by: AMD FTW on August 01, 2012, 05:45:09 AM
OH yeah, just played the 512 game and lossed but played the max bet on game 1000 and won 416 LTC :)

Now Just waiting on my Deposit :)


http://anonymouse.org/cgi-bin/anon-www.cgi/http://img440.imageshack.us/img440/3395/litecoinwin.jpg (http://imageshack.us/photo/my-images/440/litecoinwin.jpg/)

Uploaded with ImageShack.us[/Share] (http://imageshack.us)


Title: Re: LiteDice
Post by: AMD FTW on August 01, 2012, 07:10:41 AM
Hmm

I got my first transaction (the loss) of .01 LTC back, within minutes after sending. Haven't receiving my big winnings yet. Going to get some sleep now, hopefully when I wake up they'll be in my account


Title: Re: LiteDice
Post by: DutchBrat on August 01, 2012, 11:17:34 AM
Uhmmm.... this is a nice house-edge:

2012-08-01 11:11:49   f2d09d1c3fcc6595...   Under 48000   16827   WIN   0.20000000 LTC   0.16216000 LTC

Shouldn't that be 0.2616 LTC

Now I win and get back less than I gambled !!!  >:( :-\

http://greenishblue.info/litedice/f2d09d1c3fcc6595b824411f237cd76ab45a879348a55a9a82bb63d17e1ee410-1.html

 (http://greenishblue.info/litedice/f2d09d1c3fcc6595b824411f237cd76ab45a879348a55a9a82bb63d17e1ee410-1.html)


Title: Re: LiteDice
Post by: Scott J on August 01, 2012, 11:33:46 AM
Waiting on payout on:

http://greenishblue.info/litedice/3c37dccf7d6776aa17ecd3fdde1dd6a30e529de8a98bead42bd6c86d7e53b153-1.html

and

http://greenishblue.info/litedice/47cb574b1dfd4c23c3dfe47d6958e89792d1366dc5e56cb0262a472d694c4ada-0.html


Title: Re: LiteDice
Post by: DutchBrat on August 01, 2012, 01:06:38 PM
I got my payout.....

But 0.16216 payout on a winning 0.20 bet is still wrong !!!!


Title: Re: LiteDice
Post by: mskwik on August 01, 2012, 01:10:46 PM
Yeah, I see around 40 bets queued up waiting for payout now but it'll catch back up shortly, the big win triggered a manual review on the payment backend, guess I should make it so that doesn't hold up the other payments in the queue.

Yes it should return winnings with 0 confirmations when it manages to respond fast enough (these Litecoin blocks come pretty fast) which is relatively safe because it uses the original tx in the payout, so if it ends up voided somehow the payout will as well.

And yes the tx fee can take a fairly large chunk percentage-wise at small amounts.  I don't necessarily want to make the min bet too large, but on very small bets it's way more than the house edge so can't afford to take it out of the house side either without a negative expected return (which isn't particularly sustainable).


Title: Re: LiteDice
Post by: DutchBrat on August 01, 2012, 01:12:32 PM
Yeah, I see around 40 bets queued up waiting for payout now but it'll catch back up shortly, the big win triggered a manual review on the payment backend, guess I should make it so that doesn't hold up the other payments in the queue.

Yes it should return winnings with 0 confirmations when it manages to respond fast enough (these Litecoin blocks come pretty fast) which is relatively safe because it uses the original tx in the payout, so if it ends up voided somehow the payout will as well.

And yes the tx fee can take a fairly large chunk percentage-wise at small amounts.  I don't necessarily want to make the min bet too large, but on very small bets it's way more than the house edge so can't afford to take it out of the house side either without a negative expected return (which isn't particularly sustainable).

Ah I see, my bad !


Title: Re: LiteDice
Post by: Luceo on August 01, 2012, 04:11:57 PM
You should advertise this on the Litecoin forums (http://www.litecointalk.eu) ^^


Title: Re: LiteDice
Post by: AMD FTW on August 01, 2012, 05:15:09 PM
I checked when I woke this morning and I did get my big winning :)

On a side note, I noticed you lowered the max bets on the 512 game and 1000 games so the house doesn't lose as much money if someone wins.

I think you forgot to update the max bets for the under 2000 and under 4000 games, I played all those with max bets and it wouldn't take it being it was too large. I ended up reducing the amount a few times until finally they took.

I lossed an extra 25 LTC to you this morning, so that 416 LTC winnings will be trickling back in.


Title: Re: LiteDice
Post by: mskwik on August 01, 2012, 06:10:00 PM
The script does automatically update the max bets based on the available balance to make sure that it has enough to pay out winning bets.  You must have caught it right after they got pushed down because of the other win.  Perhaps I'll have to add a little extra leeway there for when that happens, the calculation is conservative enough that a couple minutes shouldn't matter but will let any bets through from people who started when the limits were higher.


Title: Re: LiteDice
Post by: AndyRossy on August 02, 2012, 03:06:15 AM
How does it stop double spend?


Title: Re: LiteDice
Post by: wormbog on August 02, 2012, 01:51:33 PM
LiteDice is very cool! Would you consider releasing the source code? I'd like to set up an altcoin version using some of the coins I'm collecting via merged-mining but don't actually care about losing - for example, IxCoin. It would be a lot more fun to gamble with it then just selling for satoshis on the exchanges.


Title: Re: LiteDice
Post by: mskwik on August 02, 2012, 03:12:44 PM
How does it stop double spend?

The backend uses a couple methods to make double spend attacks more difficult.  It maintains connections to a number of peers and checks that incoming transactions have propagated to a majority of them (without forward them itself) before accepting them.  It also uses a separate connection (which does not accept incoming connections) from the receiving connections for sending new transactions out to make the listening connections harder to identify.

For this application the return transaction is also the fastest feedback mechanism (as the web page listing is delayed by ~60 seconds due to the caching) and it will not propagate through the network faster than the original transaction (since any nodes that get it first will not pass it on without the other).  So basically any bets that are processed should be well distributed through the network before any attacker got the results to determine whether to try and invalidate the bet.  Obviously it's not perfect but should be enough to drive the risk up for any would-be attacker to beyond the expected rewards.


Title: Re: LiteDice
Post by: Ilikeham on August 03, 2012, 12:57:18 AM
wallet out of coins? been a bit since I won the last two and no response or coins in yet.



Title: Re: LiteDice
Post by: mskwik on August 03, 2012, 03:03:20 AM
Yeah, looks like someone had a winning streak and it ran short on change txs with enough confirmations to resend.  Everything is paid out now but it is a little short on coins so max bets are low, will get it more as soon as I can move them through an exchange.


Title: Re: LiteDice
Post by: Ilikeham on August 03, 2012, 03:25:32 AM
Figured it was something simple, site was updating, was just curious how it was managing a backlog, all came out in the end.


Title: Re: LiteDice
Post by: Tachikoma on September 01, 2012, 08:59:27 AM
I was playing around with the Litecoin source and used LiteDice to send a test transaction. However I don't see the bet on the site, I'm not sure I messed up my Litecoin source or your site is just lagging. Could you check if you go the tx on your end? (898ccc7e5450858dc3d5576be40d35750574efcf48a026041d3ff36c778f4f8a)


Title: Re: LiteDice
Post by: mskwik on September 08, 2012, 05:13:49 PM
I was playing around with the Litecoin source and used LiteDice to send a test transaction. However I don't see the bet on the site, I'm not sure I messed up my Litecoin source or your site is just lagging. Could you check if you go the tx on your end? (898ccc7e5450858dc3d5576be40d35750574efcf48a026041d3ff36c778f4f8a)
Sorry, must have missed that question, apparently the watchlist doesn't quite work like I would expect.  Anyway it does seem that transaction went through, may have just been a little slow at the time, I have been working on some updates.
http://greenishblue.info/litedice/898ccc7e5450858dc3d5576be40d35750574efcf48a026041d3ff36c778f4f8a-0.html (http://greenishblue.info/litedice/898ccc7e5450858dc3d5576be40d35750574efcf48a026041d3ff36c778f4f8a-0.html)

And on that subject I believe at this point it's been tested well enough to make public knowledge so without further ado I present the affiliate program.

https://litedice.greenishblue.info

I have set it up so you can start out fairly simple but have all the data available in easily readable format if you want to do more with it.  It is LTC only right now, but you'll notice I do have a currency selector there and it should be fairly simple to add other similar cryptocurrencies if there is the demand for it.  As an example I have setup LfL1P8SkdFA7WSacf647rkWcj45kbqmb87 which has a 50% chance of winning and pays out 1.92x (the same 3% house edge as the rest of the games) but it is setup with the donation address of the litecointalk forums as the affiliate.  This pays 1% of the total bets placed (regardless of win/loss) to that address.  It has its own stats page at http://greenishblue.info/litedice/LfL1P8SkdFA7WSacf647rkWcj45kbqmb87.html (http://greenishblue.info/litedice/LfL1P8SkdFA7WSacf647rkWcj45kbqmb87.html) and in JSON format at http://greenishblue.info/litedice/LfL1P8SkdFA7WSacf647rkWcj45kbqmb87.js (http://greenishblue.info/litedice/LfL1P8SkdFA7WSacf647rkWcj45kbqmb87.js).  I think the basics are relatively self-explanatory, but I don't exactly have a manual or FAQ or anything for it yet so go ahead and ask any questions and I'll try and come up with answers.


Title: Re: LiteDice
Post by: cokein on May 26, 2013, 12:35:18 PM
HI,

i've made these three bets:


Link   Timestamp   Transaction   Game   Lucky #   Result   Bet   Payout
Details   2013-05-25 22:38:11   e7ea174b08ae15ee...   Under 16000   12971   WIN   2.00000000 LTC   7.78420000 LTC
Details   2013-05-25 22:28:22   7a0360befac5abb3...   Under 2000   34543   LOSE   2.00000000 LTC   0.01000000 LTC
Details   2013-05-25 22:15:56   1b5045ce832f1f84...   Under 32000   10739   WIN   10.00000000 LTC   19.66000000 LTC

Two wins and one lose.
I never receive the winnings nor the fee of the lose.

What's going on ? It's the site a scam?!!



Title: Re: LiteDice
Post by: Badman0316 on May 27, 2013, 11:36:44 AM
i was 1 win and 1 lose
but no coins to pay with me
is it scam? :'(


Title: Re: LiteDice
Post by: Badman0316 on May 29, 2013, 11:44:10 AM
i was 1 win and 1 lose
but no coins to pay with me
is it scam? :'(
received ;D


Title: Re: LiteDice
Post by: Schlurch on January 08, 2014, 01:54:37 PM
sorry for replying to such an old topic, but litedice did not send my winning of 23.x ltc to my address:

Transaction b66aa5c8f3daa494102ad6dd7f058f18cc6422f114115622f409960e5f696744:0

    Processed at: 2014-1-7 11:26:05
    Game: Under 32000
    Lucky Number: 24160
    Outcome: WIN
    Bet Amount: 12 LTC
    Payout: 23.612 LTC
    Payout Address: LW249QvYutCs3fxUaUfEmEhRGnrg8qrifr


did not get my ltc, all other bets (few hundred of mine!) went through so...