Inspiration
Walking can offer numerous health benefits to people of all ages and fitness levels. It may also help prevent certain diseases and even prolong your life. Walking at least 30 minutes a day, five days a week can reduce your risk for coronary heart disease by about 19 percent. Okay you want to walk, but how do you get yourself out the door or onto the treadmill? Having the motivation to keep exercising regularly can be challenging for many of us.
Up until now the rewards of reaching your fitness goals (apart from getting fitter, of course) have been rather intangible. We felt there was a need for a strong motivational factor to help people to keep up with their fitness regime. Studies have shown that incentive programmes can have a positive impact on people's healthy behaviours, and in particular on physical activity. And thereby we decided to bring in what today's generation go gaga over - crypto and NFTs ! . Think of earning crypto rewards just for walking or performing any physical activity. Exercising and getting fit are challenging goals requiring one’s full commitment and focus on completing, but you can make the entire process fun and a lot easier to achieve with Crypto Steps.
What it does
Crypto Steps is mainly composed of a wearable pedometer/activity tracker and a decentralized client application. The user's physical activity and steps travelled is tracked by the device and correspondingly the user is eligible for rewards in the form of Crypto Steps Tokens(CST) . This data is stored on the Blockchain using Smart Contracts. Thereby, by engaging in walking or any other activity, users become eligible for a higher amount of CST rewards. To claim their accrued rewards, users can visit the decentralized application(DApp). Here they can connect their wallet and claim their accrued CST tokens directly into their wallet. The DApp also provides additional rewards in the form of NFTs which can be earned by users for keeping up their streak or for achieving various fitness milestones. The system is also privacy preserving in nature as there is no kind of association with the personal identity of the user and all operations are carried out only using pseudonymous blockchain addresses.
How we built it
The project is in fact a complex intersection of IOT and Blockchain technologies. We built the wearable pedomoter device using Arduino and an MPU6050 sensor. We built an Oracle in Node JS with the help of the Johnny-Five library and Firmata protocol along with truffle-hdwallet-provider to achieve reliable and secure communication between the Arduino device and the Smart contracts. The Smart contracts were coded in Solidity and are deployable on any EVM-compatible chain. For the prototype, we are utilising Polygon's Mumbai test network for enhanced user experience, by virtue of the fast transactions and low gas fees. The client DApp was built with React JS and web3js. We have also utilised the Metamask wallet to interact with the DApp. To sum it up-
- IOT pedometer/ motion tracker device - Arduino, MPU6050 sensor
- Oracle - Node JS, Johnny-Five library, Firmata protocol, Truffle HDWallet Provider
- Smart Contracts - Solidity, Truffle framework, Polygon Testnet
- Client DApp - React JS, web3js, MUI, Metamask wallet
Challenges we ran into
Building the Oracle was the hardest part. Though we have experience working on IOT and Blockchain projects, this was the first time we were trying to build a project with such a complex integration of both. For the system to work, we first needed to find a reliable way for the Arduino device to communicate with the Blockchain, something which we've never tried or heard of before. But soon we came across the Johnny-Five library and using the Firmata Protocol we understood that it could be possible to do so. We further integrated Truffle HDWallet Provider and were successfully able to pull it off, making this a very unique innovation.
We also did not have a wireless module, so the prototype had to be built as a wired device using Arduino.
Accomplishments that we're proud of
We're super proud that we were successfully able to build a working prototype though the idea was a bit far fetched and not very easy to be pulled off in 48 hours. We also take pride in having been able to build a project that would hopefully help motivate people to stay healthy and regularly engage in physical activity. We all know how lack of exercise is detrimental and we're pleased that we could develop a one of its kind solution to tackle this problem.
What we learned
Throughout the journey, we were able to learn quite a lot. We learned to use the Johnny-five framework along with Firmata protocol to achieve communication with the Arduino device using Node JS. We also learned about the fusion of Blockchain and IOT technologies and how we could build such a system. This is also something we'd like to continue learning further.
What's next for Crypto Steps
We plan to provide integrations with the wearables available in the market so that onboarding users becomes easier. We also plan to take things cross-chain and make the project accessible to the wider variety of users. Enhancing the UI/UX of the decentralized application, introducing meta-transactions and starting a platform to trade Crypto Steps NFTs are all on the cards!
Log in or sign up for Devpost to join the conversation.