Inspiration ⨇✨

As a teacher and web-3 sorcerer, linking two passions was a long-held dream.

While revamping my Wordpress LMS-based school, I took a look at an API to monitor student progress. Having built scheduled payment systems using Node + Bree.js, a lightbulb appeared. 💡

I have thousands of Udemy students, but only 2-4% that finish 80% of the video lessons. If I could make quizzes fun on my own platform, Aquarius.Academy, I could raise this engagement, bring new users to crypto + NEAR, and create a win-win-win.

What it does 👨‍💻

Each week, students receive the opportunity to complete a lesson for tokens.

How it Works 🛠

  • Student registers on a Learn to Earn enabled site like tetra.earth
  • They type their NEAR testnest account to store in Wordpress database (option to improve)
  • Teachers to send them passwords to unlock quizzes via weekly emails (email onboard flow)
  • Quizzes are opportunities to earn points: 1 per correct answer.
  • Points are used to tally rewards to be sent on-chain via our student-pay tech stack
  • Demo: unlock the test quizzes on tetra.earth with these passwords
  • Perma design - permaperfect
  • Bio-regeneration - natureknowsbest
  • Once you mark all lessons of the course complete, you take a normal Learndash quiz through a simple, elegant interface.

On the Payment side, the teacher installs the student-pay package, newly written for METABUILD III

  • Teacher fills out the teacher-settings.js options, and chooses their key-signing workflow
  • - They will need to authenticate with both Wordpress and NEAR
  • They can use a token based on rust-fungible-token or any asset contract on NEAR
  • Bree.js uses background workers in node to run "jobs" at set intervals,
  • Jobs do the following
  • - Authenticate with Wordpress via JWT
  • - Call Learndash API endpoints
  • - Get all quizzes
  • - Get Stats for each quiz to pay
  • - Read NEAR testnet wallet address from the Wordpress
  • - Send transactions as cross contract call

After Student Pay is set up, it runs in the background on a users’ machine, like a cron job, but on node's worker threads via bree.js.

How we built it

I installed a fresh version of Wordpress on an old domain (demo Learn 2 Earn) brought in some dependencies in a package.json file, and went to the races to meet the METABUILD III deadline.

Basic Concept

NEAR transactions scheduled with Bree.js

  • Quizzes unlock weekly, students earn 1 point (to be paid 1:1 as token, or by custom ratio) per correct answer
  • Option for KeyPairEd25519 (can run payments without manual Tx-signing)
  • Possible with web wallet flow (requires teacher manually approve batch transactions)

Challenges we ran into

Authenticating with Wordpress from node was a bit unintuitive at first.

Getting used to NEAR took some time, but it was exhilarating, intuitive, and rewarding to compile a smart contract written in Javascript

Time was a big constraint, as I entered in another Devpost hackathon the previous week, so I had about 5 days to build, while living in a Hostel in Mexico. For the time constraint, there are still some parts that need to be connected in the job template found in student-pay/jobs.

Accomplishments that we're proud of

Tetra.earth's student experience is beautiful + non-distracting for students, thanks to Learndash. It's simple and clean. I took decisions ( like simplifying account input in Wordpress registration, and using KeyPairEd25519) that will translate to a wider audience of teachers being able to implement this solution plug-and-play

Introducing students to NEAR in a symbiotic way, and paving the path for future applications.

What we learned

I learned a ton about NEAR's Javascript API and SDK and how smart contracts work on the protocol.

I also learned about custom Wordpress JSON API endpoints and authenticating an admin user through Nodejs to be able to use them.

What's next for Learn to Earn

Finalize and test student-pay Implement system on Aquarius.Academy

In the future, we’ll implement a NFT solution, similar to Everstones I built for cXc. NFT metadata will prevent over-paying in the event of a teacher’s catastrophic system failure, and remove the need for a centralized datastore like Wordpress.

Future Enhancements + Features

  • Drip content flows, implemented by locking the start date of course entry, or sending password as part of weekly drip-email flow
  • Paid Accounts + Memberships (optional)
  • Lock quizzes with Password that expires after a set number registrations or an about of time
  • Badges as NEAR NFT badge system

Xtra Credit Enhancements

  • Finishing quiz under 1 minute gets bonus tokens
Share this project:

Updates

posted an update

Privacy Policy / Terms of Use + other legal requirements

https://tetra.earth/privacy-policy https://tetra.earth/terms-of-use/ https://tetra.earth/ccpa-california-consumer-privacy-act/

Reload Issues Fixed

A plugin conflict was causing reload issues on some pages, including the homepage. This went unnoticed for several days, and now has been fixed.

Continuing Development

Over this weekend and future weekends I will be workin on the code that pays students. This code wasn't quite finished at the end of the hackathon. For more information on completion status see the note to judges in the linked repo.

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