Inspiration
As a team of sports enthusiasts, we often hear about the difficulties of the growing professional sports scenes, which need strong regulation and enforcement. Predatory pricing, organizations failing to pay players their cut of the prize money, and lack of transparency plague pro players, especially in younger and less developed sports, which lack more established agencies that typically lend credibility to any signed contracts. We dove into the web3 community in the Bay Area to gather feedback and user interest!
We first started with the problem statement and looked to where we could add value for both the player and the organization that would utilize this platform. The main features we wanted to include were base salary and bonus incentives where players can see their payouts and be encouraged to reach goals that benefit themselves and the organization. This is reflective of current common payment structures used in pro sports, where players receive both a base salary, as well as a bonus based on their performance in the season, usually defined by specific metrics.
Additionally, smart contracts help bring value back to organizations whose primary goal is to focus on the player’s development, cutting out many administrative tasks. The player also in turn can receive a sustainable salary to commit to their passion. Our hope is players can directly sign to an organization without overhead from agents and simply read their terms and understand how to get winning!
What it does
The primary functionality of our application is to provide both players and organizations with a simple and clear way to create smart contracts, to guarantee payment to the player upon reaching certain quantitative goals, on top of their base yearly salary. In doing so, players do not have the risk of being scammed by the organizations they signed on with. The application does this by providing two contract types: base salary and bonus.
Upon visiting the base salary contract page, an organization can connect their wallet, input the target recipient’s address, and then input the total yearly salary of the player. Submitting these parameters creates a smart contract that will pay the recipient the total salary, divided into 24 separate payments made biweekly over the year.
The bonus contract page (which currently is configured for basketball players) requires further parameters to be filled out on top of the user wallet and recipient address:
- Player name
- Season
- Target points
- Points payout
- Target games
- Games payout Submission of these inputs creates a smart contract that used Chainlink Functions to examine the player’s performance metrics for the given season, as provided by Chainlink Feeds. Based on the fulfillment of these metrics, the player is paid out for any successfully met criteria, and the organization is returned the money for any metrics the player failed to meet. While we currently require a manual request to update these metrics to check for fulfillment, we intend to automate this using Chainlink Automation.
How we built it
We started with the core components of the contract and how we envisioned a player and organization would interact with a smart contract. After building a base contract and front end, we looked into how we could utilize Chainlink to automate and bring real-world data from off-chain to on-chain. We mainly used Chainlink Functions and Feeds in order to acquire real-world metrics on players.
Challenges we ran into
A big hurdle we ran into was the response types of Chainlink Functions only including strings, bytes, or ints. In our use case, we wanted to be able to pull a lot of data with one API call and return it as a JSON object that we could parse. However, with the response types not being able to handle JSON objects and with how expensive parsing through data could be on-chain, we switched to a system of making one call per data type to return. While this worked, I believe it led to less efficient code overall as we did not have time to redesign around this obstacle. Another error we ran into was a Stack Too Deep error while creating our bonus contract in solidity. It led to us having to rewrite our smart contract on the fly and led to some subpar design choices. We believe that with some better time management, we would be better equipped to handle these issues as we would have more time to regroup and rethink our system design rather than patch some things up quickly with makeshift solutions.
Accomplishments that we're proud of
None of us really had any experience with blockchain development before so just being able to create and deploy a smart contract on chain was a big accomplishment for us. On top of that, being able to use smart contracts to distribute funds to each other was a big aha moment for us and showed us some of the capabilities and potential of blockchain tech. We are proud to make a real state change and utilize Chainlink in three different ways to bring real-world data into the blockchain! Our journey building up this project has led us to work with many technologies and rethink how to connect our application to players and organizations who would use this application.
What we learned
We learned how smart contracts work and how to deploy them and interact with them - both through Remix and through a frontend using libraries like Web3.js. We also learned how to use Chainlink Datafeeds to get real-time data on price rates and Chainlink Automation to handle the upkeep of our contracts for us - both of which were easier to implement and more intuitive than we thought they were going to be. I think with more time we would’ve liked to explore Chainlink Automation more and use custom triggers for our upkeep rather than just time-based ones. Working with Chainlink Functions taught us the difficulty of getting external data on-chain. We had a bit of trouble using it to return the data in the way that we wanted it to but eventually, it became a good asset to enable us to obtain the statistics we needed for our contracts in a decentralized manner.
What's next for Smart Sports
Automating the Chainlink Functions calls with Chainlink Automation would be a good improvement to the bonus contract to make it require less user interaction. When automated, it would allow for the only interaction to be the contract creation - just like with the base contract. Seeing our contracts deployed on the mainnet would be a nice accomplishment as well. We also want to look into adding a user authentication system and database for the web application. This would allow users to log in as either players or organizations and then draft and send each other contracts to review and edit. We think this would make for a much more pleasant UX experience. Additionally, we want to switch to a factory pattern for contract creation. This would allow us to create multiple contracts at once rather than using one instance of the smart contract to manage a single agreement between parties. The factory pattern along with a more fleshed-out user system for the front end would allow our product to scale up much better in the future. Lastly, we would want to support different sports and esports by incorporating new APIs and adding more incentives. We want to continue to gather feedback and iterate to build out this application and bring it to real sports organizations. We would love your thoughts and hope to bring this to real users soon!

Log in or sign up for Devpost to join the conversation.