Surfing competitions are highly dependent on weather conditions making if difficult to schedule quality events. As a result, surfers and organizers have come up with numerous strategies to overcome these issues.

The World Surf League schedules it's competitions to take place during a multi-week window where surfers only compete when the conditions are acceptable with the most extreme case being the recently cancelled Mavericks Surf Competition which could occur anytime between the start of November and end of March. New this year, the league went so far as to schedule a competition on a artificial wave pool capable of producing consistently perfect waves any time of the year but lacking the excitement waves experienced on the ocean.

While these solutions may work for those who surf for a living, most surfers have obligations involving work or school that prevent them from showing up to compete at a moments notice and as a result most local and school competitions are scheduled well in advance and held on weekends.This limitation results in unpredictable wave quality and sometimes there are no surfable waves and the competitions are abandoned. Additionally, there are often cases where waves at the competition venue are poor while other locations are much better.

In order to improve the quality of local and school surf competitions, and other events, we can use smart contracts to allow competitors and organizers to reach a consensus that will bring the competitions wherever the waves may be on a given weekend.

Our Solution

Contract Surfer uses smart contracts tied to weather data to provide a fair and efficient way to schedule quality surfing competitions in the best conditions possible.

Rather than committing to a competition venue well in advance, Contract Surfer allows each of the events stakeholder to propose their preferred location and then lets mother nature decide where the event will take place. A contract is agreed upon by all participants that they will be prepared to travel to the selected venue, which is determined one week in advance, which is roughly the amount of time for weather predictions to become accurate.

This improves the quality of the competitions by holding them in the most optimal condition and ensures that the venues are selected equitably so that none of the stakeholders gain an advantage by influencing where competitions are scheduled or rescheduled.

How we built it

Our current version of contract surfer is a web application that can be found here, which connects to our smart contract. After signing into MetaMask, if needed, up to 4 locations can be selected from a map. The results can then be requested one week prior to the event date and wave height at each location is queried and stored on the blockchain and the highest scoring location is awarded the event.

Use multiple chained API calls against the World Weather API to get the wave height in feet for 4 different locations. This app compares multiple locations and ties the immediate weather result to the ethereum blockchain using the world weather API and chainlink.

Challenges we ran into

We ran into issues with chaining together API requests and smart contracts not allowing easily deserialization of hashmaps. To overcome this we needed handle one result at a time.

Accomplishments that we're proud of

Growing up in Southern California we have competed extensively in weather dependent events and have experienced our share of sailing regattas with no wind and surf events with no waves. As a result, we are proud to have built a project that can benefit the sporting communities that we are a part of and hope that we can use our project to improve the quality of competitions to make the sports more enjoyable and encourage more to participate.

What we learned

How to interact with and deploy smart contracts on Ethereum.

What's next for Contract Surfer

We plan to integrate automatic notifications to all competitors and organizers once a location contract resolves. We would also can adjust the application to support a larger number of proposed locations and selection parameters once we examine the performance impacts for the additional contract API requests.

Built With

Share this project: