Inspiration
It is difficult to make accurate market forecasts such as employment statistics. There is a consensus in the market, but it is doubtful how much truth there is in the words of those involved. This is because they are stating their forecasts taking into account the impact that their opinions may have, that is "position-talk". It is necessary to probe the truthfulness of each person, and therein lies a high barrier. However, this is not the case if they have incentives to make accurate predictions and can do with anonymity. To make this possible, the power of smart contracts and Chainlink are needed.
What it does
It receives prediction value from user with their bet and on the date reporting made by BLS, it calls external API and transfer the reward to winner group.
Scenario
- User enters their predictions and bet
- Smart contract add the user and the bet to a list for each prediction value
- Automation will run at the time when the employment situation is released
- Smart contract calls the BLS data API to obtain the latest unemployment rate value
- When call-back triggered, smart contract calculates the reward for the winning group (The winners take all!)
- Smart contract sends the reward to each winner address
** need to call clearForecastors function manually to clear the old data for the second run (can be automated with Upkeep but not configured)
How we built it
start from imagining use-cases of smart/con and chainlink and the define architecture diagram and develop
- Solidity code using hardhat. simple hardhat project (cannot use test feature this time, need to learn).
- Frontend code with Next.js and web3ui. Refer to some repo sample and do the basic design.
- Frontend code deployed in AWS amplify
Challenges we ran into
After first successful test, I couldn't get the call-back API somehow. It seems that something was wrong with goerli operating node and it took me to do the PD analysis of this. After a while, it becomes normal again and could get the successful result.
Accomplishments that we're proud of
Code itself is pretty simple but as a usecase, it's very interesting and I see the potential of future expansion.
What we learned
I didn't have a time to find team mate. I really thought that each expertise in the domain is required to accomplish good product. I'm expert of project management and have technical skill as well but it's better to define and separate the expertise role to make the product better and develop faster.
What's next for Bet Statistics
As written in the github repo, future add-on should be to utilize this feature for the other statistics and even other category of financial product like stock price prediction or even other business, like entertainment and bet. More fun for the prediction of number-guessing or prediction of stories. very exciting!

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