A couple weeks ago, it was -23 degrees Fahrenheit. Three days later, it was 50 degrees. What the hell? We thought that this craziness would provide a good opportunity to allow people to bet on the weather.
What it does
We provide a simple web interface to allow you to place bets on the weather at some future date. You can add a bet, take a bet, and view previous bets, both open bets and the winners of previous bets. We use the Dark Sky API to request the weather in Chicago on the day of a bet, and determine the winners. We then connect this to an Ethereum Smart Contract in order to reward the winner (and penalize the loser).
How I built it
We used Flask with Jinja for the front end and a SQLite database to build the web app. We then connected this with smart contracts using the Ethereum coding language, Solidity.
Challenges I ran into
We have not worked with Solidity before, so it was difficult figuring out how to make it work and connect it with Python.
Accomplishments that I'm proud of
I am proud of learning about Solidity, which is a new language and involves concepts that are new to me.
Additionally, I am also proud of the web interface. I've worked on front end and back end for a number of hackathons in the past, and it gets easier every time. I feel like this one is one of the cleanest ones I have made, and it comes easier every time.
What I learned
We learned about how smart contracts work and a bit more about web development!
What's next for Climate Change: The Game
We currently don't have a way to set a specific time within a day, or to choose a location (we default to Chicago, midnight). We'd like to add this, but wanted to focus on core functionality for this hackathon. Additionally, it would be good to create group bets, where there is a single bet that many people can take sides on. We also want to build in a social component to this app, where people are encourage to challenge their friends. Finally, we would like to add an option to bet in Celsius.