Inspiration
With his eras.fyi project, Jason started exploring financial literacy as a problem space earlier this year. Jason was interested in the space because poor money management skills plagued his childhood and adulthood.
In the course of that exploration, he learned that consuming financial literacy content regularly can lead to positive behavioral changes because it helps people remember that they have financial goals. However, not everyone is eager to read articles about budgeting. He also learned that some people are willing to pay to be reminded to keep their financial goals in mind. The Daily Financial Literacy Dapp is based on the idea that if some people are willing to pay to remember their financial goals, maybe others are willing to be paid to keep their financial goals in mind (as a result of consuming financial literacy content).
The project is also inspired by Sweatcoin, learn2earn, and health insurance projects that reward participants for healthy behavior. For example, here in Germany, the insurer TK pays people EUR 30 for walking 60k steps a week for 10 weeks. That evaluates to EUR 0.005 per minute, assuming it takes approximately 100 minutes to walk 10,000 steps, which suggests that it does not necessarily take a large amount of monetary rewards to help people change their behavior.
What it does
The DFLD encourages users to consume content daily by paying them rewards for doing so. The rewards will come from advertising revenue. If users consume content every day, they will earn rewards. Users do not have to pay to consume financial literacy content, because consuming content is a gasless transaction for users. Users prove they have consumed content by taking quizzes. Currently, the quiz is mocked from the back-end, but in the future, it will be generated by AI.
In addition to earning rewards for consuming content daily, users can earn rewards for proposing content and for "tattling" (letting the system know when other users have missed a day). Additionally, there are randomly assigned bonus points for participation. However, the only way users can obtain the additional rewards is if they have consumed content daily.
"Daily" is based on epochs, which are controlled by the users.
Users can lose by missing a day, in which case their points earned in the epoch are up for grabs. However, this app is not about causing harm—even though a user might be ineligible to earn rewards from their points in an epoch because they miss a day, those points are still available for them to earn rewards in the future, if they manage to consume content every day during a future epoch.
FAQ
(From describing the dapp to friends over the weeks of the hackathon 🤓).
How does it work?
Consume the financial literacy content (just articles and blog posts for now) the app shows and you earn points.
If you consume every day, you get a share of the rewards in the epoch.
How much does it cost?
It's free to earn rewards for consuming content—you don't even have to pay for the transaction. But you'll have to pay for other kinds of transactions, including withdrawing rewards.
✏️ Note: while you do not already need to have AVAX—the currency for the Avalanche Fuji testnet—to earn points for consuming financial literacy content, you will need a crypto wallet. 🗝️
Where do the rewards come from?
The production version of the app will be monetized with ads. A share of the money from the ads goes into the pot on chain to be distributed to users who consumed content every day during the epoch.
That’s the second time you’ve mentioned an epoch. What is it?
An epoch is a period of time during which points can be earned that make you eligible to win rewards.
Epochs help us determine who has consumed content daily and how to divide the rewards among them.
An epoch is not a fixed length of time. A new epoch begins as soon as the current epoch ends.
How does it end if it’s not a fixed length of time?
There’s a button for it ⏹️. And anyone can press it, even you!
But you can only press it when there are:
- rewards to distribute
- people to distribute the rewards to
When someone ends an epoch, all of the rewards are distributed to everyone who consumed content daily during the epoch based on the points they earned.
Why would someone end an epoch?
Because they want to get their rewards. Or because they made an invalid proposal and are no longer eligible to win in the current epoch. Or just because.
How will I know when an epoch ends? Do I have to constantly keep watching?
The website will tell you, but no, you don’t have to keep watching.
As long as you consume content every day, you don’t have to worry about it 😌 You will receive your rewards regardless of epochs starting and stopping.
You said rewards are distributed based on points, not on consuming content. Does that mean there are other ways to earn points?
Yes! You can earn bonus points by helping to keep the system running.
You can earn bonus points for proposing valid content.
You can be randomly selected for a bonus if you consume content every day! Yes, that’s in addition to the points you will already get.
And you can earn bonus points or rewards when you “tattle”—when you tell us who has missed a day.
But remember: the only way to get rewarded for bonus points is by consuming content every day during the epoch.
Tattling doesn’t sound very friendly!
That depends on how you look at it.
We want you to consume financial literacy content every day because research shows doing that will help you to make better financial decisions and improve your quality of life.
The risk of being tattled on and losing points or rewards may help some stay consistent.
Tattling makes sure that the rewards are shared only among those who consume content daily.
Also, the person who gets tattled on only “loses” in the current epoch. They can still use those points in future epochs when they consume content daily.
Finally, you can tattle on yourself, to cut your loses 😅
OK, but how can I lose?
You can’t lose if you consume content every day.
But you can lose if you propose invalid content (because the fees for validating proposals with AI come out of our pocket) or miss a day.
But you only lose for the epoch. So it’s not so bad.
How we built it
The app is built on top of Scaffold-Eth. The app uses Chainlink VRF to get random numbers to assign participation bonuses randomly. The app uses Chainlink Functions to bring transparency to the process by which content gets into the app, by using OpenAI to validate content proposed by users. The code used to interact with Chainlink has been taken from the examples in the Chainlink docs.
We used the existing eras.fyi backend for serving financial literacy content information and to sign the gasless transactions to track when users consume content, which is on Supabase.
Please note: the OpenAI API key is available unencrypted in the smart contract, as we had trouble using the Chainlink encryption NPM package. This key will have limited value and will be deleted after the hackathon.
Challenges we ran into
Randy (in his own words)
The entire process has been a steep learning curve for me. Back in the 90s, I was taught Turbo Pascal in high school, and I've lightly dabbled with procedural scripts or learning more contemporary languages via video tutorials since, as well as using Linux for the past 12 years, but almost every stage of setting up the IDE, repository, and utilizing the various languages was a new endeavor for me. Basic things like proper dependency package versions to getting my head around object-oriented programming or advanced concepts like debugging why things that should have worked didn't were enough to shut down my momentum. As the project's versions progressed, each step was well above my previous understanding and ultimately beyond catching up with my skill set.
Jason (in my own words)
I have not constructed a game before. And every time I was sure I had designed a complete set of "rules," I would realize there was a way to take advantage or get a user locked into a place they shouldn't be. However, I think the final implementation is decent. In terms of work with Randy, it was difficult to know when to be very didactic and when to just tell him what should be true; how to balance our shared goal of using this hackathon to level up his skills and a legitimate interest in building something worth submitting and that might also be able to help a lot of people?
Accomplishments that we're proud of
Randy (in his own words)
I'm quite proud of being able to contribute some of the code, whether for front-end, back-end, contract, or testing purposes. Despite my relative lack of experience, I could grasp new concepts, contribute ideas for various purposes, and provide substantive critical comments to improve our work.
Jason (in my own words)
I started thinking that there was a tokenomic solution to the problem of financial literacy months ago, but I never had the time to really think about how to construct it in a way that I thought made sense and might actually be appealing to other people. Sure, the research shows that there may be a correlation between interest in crypto and poor financial literacy, but that doesn't mean that anything I build will necessarily appeal to the crypto-friendly and curious who also would benefit from improving their financial literacy. But I am really proud of the solution I designed and the substantive challenges that Randy was able to offer, perhaps especially because he is not as familiar with blockchain and software engineering. Even after the hackathon, I'm looking forward to continuing to work on it and getting it as soon as possible in front of users to see how they like it!
What we learned
Randy (in his own words)
I've learned some essential git functions, how coding projects are organized and collaborated on in Github, and a bit of the functional depth VS Code offers. I've learned a broader understanding of what blockchain technology can be utilized for and what it actually does. I've absolutely learned a bit of Solidity, Javascript, Typescript, NodeJS, and React on top of all that. Not enough to complete a new project on my own, but enough to get started and learn more at a more comfortable pace. Thanks to this hackathon, I have a new idea of how to do something I've been thinking about for a while.
Jason (in his own words)
I have been in the blockchain space for a while, but for any given project, I was often on a very specific part of the project, e.g., just on smart contracts or just on the dev ops. This was my first time being across the whole stack of a blockchain project. I learned a lot more about how things plug together. I'm also glad to have had an excuse to use tools that I haven't before, like viem and Vercel.
What's next for the Daily Financial Literacy Dapp
There's a lot that's still mocked, but there's more than enough to put this in front of users and get some early feedback, so that is definitely the first thing we will do.
After users let us know if they would like to use it at all, we can also turn to monetization so that there are real rewards and make adjustments to ensure that the economics of the app make sense. Happily, Jason's eras.fyi project has started to earn (a very small) amount of money, and that might be able to help seed the rewards initially.
In the more distant future, it would be nice to make proving content consumption more game-like and cute 👾, connect with Web3 advertising projects so the revenue can all be on-chain and transparent, to deploy the front-end dapp decentrally and have the on-chain funds pay for serving the decentralized front-end so that it's fully self-operating, to set aside some of the revenue for aligned social impact projects that the users could vote on, and to make the presentation of content more robust, perhaps with "courses" through the available content that are tailored with AI to individual users.
Built With
- metamask
- react
- solidity
- supabase
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.