DApp Lottery

Embedded Software Team 5

Requirements

export LOTTERY_DB="private mongodb addr"
export LOTTERY_EC2="private ec2 addr"
export GANACHE="ganache addr"
ubuntu:~$ cd backend && rustup override set nightly && cargo run --release

ubuntu:~$ cd frontend && yarn install && yarn dev --host

ubuntu:~$ truffle migrate --network dev

Frontend

  • Svelte
  • ViteJS

Backend

Limitations

  • Cannot run ChainLink VRF v2 to use provably fair RNG
    • However, our implementation is hard to exploit as we generate the lottery number when the admin clicks the Pick Winner button.
    • On the call, it generates on the fly and sends money right away. No one can see the number before the game finishes.
    • The estimated gas fee to call of this library is about $4.

Top categories

Loading Svelte Themes