[Ethercasts] Denny's Lotto: Ethereum ÐApp demo & walkthrough

mids106mids106 Member Posts: 188 ✭✭✭
edited April 2014 in Education


Dennis McKinnon shows his Ethereum Lotto ÐApp (Distributed Application) to Joris Bontje. After a demo of the UI they walk through the LLL smart contract source code and study the new Javascript bindings in Ethereum PoC 5.

Denny's Lotto is open for Business!
https://pay.reddit.com/r/ethereum/comments/22vw89/dennys_lotto_is_open_for_business/

Support addresses for EtherCasts:
Bitcoin: 1FCD6yRnK4F8PHkS165ejCBxcSzRmgx6aS
Dogecoin: DUGKd7yJcxdZretg5CGSR3hEjv9YEQfxsA

Dennis McKinnon - https://github.com/dennismckinnon/
Joris Bontje - https://twitter.com/mids106

Music:
Electrodoodle & RetroFuture Clean by Kevin MacLeod (incompetech.com)
Post edited by StephanTual on

Comments

  • JasperJasper Eindhoven, the NetherlandsMember Posts: 514 ✭✭✭
    Thought that bug was something i thought i didnt understand earlier :)

    Where is the discussion where it is concluded to 'hash the timestamp'? This is definitely better than that! So the 'alarm' discussion was essentially about getting at winning hashes(prevhash) so miners would have to drop block rewards to collude? If you could access random previous winning hashes, you'd essentially have the same ability, you'd just wait for someone to activate, instead of depending on the alarm.

    Why cant we access the current winning hash? It would mean that you cannot execute contracts before you know what the winning hash is, but you dont need it. I thought transactions are valid if they pay the transaction fees? If contract execution was able to invalidate transactions, miners would have to execute them first, and that might be an avenue to attack miners.

    As i rambled before, btw, miners can still collude, even if they have to drop the block reward for it. If someone could figure out a contract that can produce random values, that'd be perfect. Other contracts would be able to call it for the values.

    Like the idea of a browser and javascript for making interfaces to contracts. But not sure if i want it in the same program as the one that decrypts my wallet!
  • jw1jw1 Member Posts: 27
    Great demo. In which github repo and corresponding dir therein can I find the javascript bindings?
  • jw1jw1 Member Posts: 27
    @mquandalle Thanks for the response but that doesn't show me the actual bindings. I want to see where the javascript objects like "eth" are coming from.
  • loiluuloiluu Member Posts: 7
    I'm having the same concern about how to generate the random number which every other miner can re-generate it and is free of threat. @Jasper‌ have you solved that problem? The approach introduced in the video is not so convincing..
  • JasperJasper Eindhoven, the NetherlandsMember Posts: 514 ✭✭✭
    Yeah it is totally a problem the way dennys lotto does it. I think we basically solved the problem;(though the solution isnt coded and tested well yet)
    1. Denny's lottos approach, use future hashes of blocks. These are psuedorandom, but the problem is that miners know which they have when they get a block. So if it makes enough difference for bets of the miners and/or people paying the miners, they can just not publish it and affect the odds.
    2. Have commitments to random value from the different players H(R1), H(R2) and later R1, R2 are revealed(checked,) and combined. Failing to provide your value will give maximum losses. This one is secure, but it is a bit tedious and inconvenient two step process.
    3. Finally, have a RANDAO where some parties put stake(like ethers) in, and commit random values like before. If they later come up with the actual values they get a payment, otherwise they lose their stake. The random values are accessible from other contracts with a small payment, or the DAO contract calls the other contract when the random value is in. (Me and Dennis McKinnon came up with it)
      Basically the suppliers of the random values in the RANDAO can still fail to publish their random values. However, the stake they put in can be much larger than a single block reward, it can be large enough so that it cant be profitable to do so when there are some bets benefitting.
    Afaik the above basically is the relevant story, here is an old thread about it, though.
Sign In or Register to comment.