I've wanted to create a framework for anyone to get the house edge for quite some time and with all of blockchain technologies that exist and are emerging, it seemed like a perfect fit. As long as you have enough to fund at least one winning bet, you should be able to start your Lucky Machine and be off to the races!

What it does

Lucky Machines offers simple interfaces to create fair betting contract that can either be played directly or built into a game that requires some form of fair random number generation and payouts.

How we built it

The original Lucky Machine contracts were built before the hackathon, so for this I created a new second type of lucky machine with a rolling jackpot, and built two simple games on top of those to demonstrate some capabilities and how to integrate this into an external project. I turned the contracts and ABIs into a public node package and utilized Truffle for the first time to manage all of the various contract deployments.

Challenges we ran into

Animating the Rock Paper Scissors game was very difficult. Tracking down an animation framework for React that could get spun up quickly was a challenge. Ended up using react-spring with some good success for cycling between the different images in a fun way.

Accomplishments that we're proud of

Very proud that I turned this initial concept into a platform that can be built upon and used in many untold ways. Glad to have it accessible to everyone on the Polygon mainnet immediately! I created some great demonstrations of what can be done in a fairly simple manner, and hope to continue to build upon this now solid foundation.

What we learned

Learned a lot about structuring projects and contracts for upgradability and future deployments using a tool like Truffle. Also published my first node package with this project, which is an incredibly valuable skill. Lastly, got some decent experience with bridging tokens over to Polygon / Matic and creating a project that can be easily deployed to multiple blockchains.

What's next for Lucky Machine Games

Continuing to build more games and expand base contract functionality to power all kinds of betting games.

Built With

Share this project: