VeriFit

VeriFit

Verifiable fitness accountability app, powered by zkProofs and session keys via coinbase smart wallet

39
Built at Based India
VeriFit

VeriFit

Verifiable fitness accountability app, powered by zkProofs and session keys via coinbase smart wallet

Why are you participating for Based India?

I'm participating in Based India to build solutions that resonate with the growing Web3 and decentralized ecosystem in India. The region has a thriving tech and startup culture, with a deep pool of talent eager to innovate in blockchain technology. By building Verifit, a decentralized fitness accountability app, I aim to contribute to this movement by leveraging zkProofs and smart wallets—cutting-edge tech that's gaining traction globally. Additionally, India has a massive mobile-first population that could benefit from privacy-centric and incentivized fitness solutions like Verifit, making it an ideal region to drive adoption.

My connection to the region stems from my roots and understanding of India's tech landscape, which is rapidly evolving into a hub for blockchain projects. I'm motivated to participate in Based India because I want to be part of this revolution, fostering decentralization and user empowerment through secure, innovative applications.

What challenges are you focusing on?

In Verifit, I'm focusing on addressing several key challenges in the fitness and Web3 communities with the help of Base:

  1. Partial Privacy in Fitness Verification: Traditional fitness apps require users to share detailed personal data to verify their goals. However, full privacy isn't always needed. Verifit leverages verifiable zkProofs by Reclaim's zkFetch, which offer a balance between privacy and transparency. This allows users to prove their fitness achievements without sharing sensitive information, but still allows the verification of claims.

  2. Decentralized Accountability: Staying motivated to meet fitness goals is challenging, especially without accountability systems. Verifit introduces private accountability bets where users commit to fitness goals, placing financial stakes on their success. If they miss a goal, part of their stake is forfeited. This decentralized mechanism ensures motivation through smart contracts without the need for a third party.

  3. Seamless User Experience in Web3: Managing wallets and signing transactions is often cumbersome for users in decentralized apps. With Coinbase Smart Wallets and session keys on Base, Verifit makes this process frictionless. Users can engage in high-frequency prediction markets or accountability bets without repeatedly signing transactions, enhancing usability for mainstream adoption.

  4. Incentivizing Healthy Habits: Consistency is key in fitness, but maintaining it is hard. Verifit addresses this by offering weekly rewards such as SponsoredBasenameRegistration for users who meet step goals consistently for 7 days. This gamifies the fitness experience while providing tangible rewards through blockchain technology.

By using Base, Verifit benefits from a scalable, low-cost Layer 2 platform that makes these decentralized features affordable and accessible to a broad audience

How does your submission address this challenge?

At its core, Verifit combines two primary functionalities: private accountability bets and public prediction markets. Users can place bets on their ability to meet fitness goals, adding a financial incentive to stay motivated. If they fail to submit proof of their achievements by the deadline, their stake is reduced exponentially. This decentralized accountability system fosters a sense of responsibility and engagement, making fitness a more interactive experience.

The public prediction markets feature incorporates a gamified element, allowing users to predict the fitness success of others in a fun, Tinder-style interface. Users swipe right for "yes" or left for "no," making quick, engaging decisions that enhance social interaction within the fitness community. This not only encourages competition but also strengthens the network of accountability among users.

Verifit utilizes Coinbase Smart Wallets and session keys to create a frictionless user experience, allowing for quick and easy transactions without the need for constant wallet interactions. This approach makes the platform accessible to a wider audience, including those who may be new to Web3 technology.

The potential impact of Verifit extends beyond individual fitness. By offering a decentralized solution, the app can foster healthier lifestyles within communities, especially in regions like India, where a mobile-first population is eager for innovative health tech solutions. Verifit not only incentivizes users to maintain their fitness goals but also educates them about blockchain and decentralized finance through engaging, rewarding experiences. Ultimately, Verifit aims to revolutionize the fitness industry by marrying health and technology, promoting accountability, and enhancing user privacy in an increasingly digital world.

Challenges I ran into

Challenges I Ran Into

  1. Session Key Integration:
    One of the significant hurdles was the integration of Coinbase Smart Wallet session keys, which are not yet launched for production. I aimed to create a seamless user experience in the prediction markets, allowing users to participate without frequent wallet interactions. The absence of session keys in a stable environment created complications in implementing this feature effectively.

  2. Persistent Key Storage:
    I encountered issues with storing session keys persistently. Initially, I attempted to store the keys in local storage, but ran into problems because the P-256 public keys are not strings. This led to challenges when trying to parse them as strings, which caused errors in retrieval and use.

  3. Switching to IndexedDB:
    After realizing the limitations of local storage, I decided to explore IndexedDB for key storage, which I learned about for the first time during this process. While transitioning to IndexedDB presented its own set of challenges—such as understanding its asynchronous nature and how to structure the database—I eventually figured it out successfully.

Solutions

  • To overcome the session key integration hurdle, I focused on alternative strategies for user authentication and transaction signing that didn't rely on session keys. This included using standard wallet connection methods until the session keys become available in a production environment.

  • For the persistent key storage issue, I researched IndexedDB thoroughly, including its advantages over local storage. I followed tutorials and documentation to understand how to set up and manage the database effectively. By implementing IndexedDB, I was able to create a robust solution that allowed for reliable storage and retrieval of session keys.

Additional Features

Additional Features

Verifit was originally ideated at ETHOnline 2024, where I developed an MVP that leveraged the Sign Protocol and won the award for Best ZK Attestation Verifier With Schema Hooks. During the Buildathon, several significant enhancements were made to elevate the project:

  1. Migration to Base Sepolia:
    One of the most impactful changes was moving the entire project to Base Sepolia. This transition allowed for enhanced scalability and reduced transaction costs, making Verifit more accessible to users.

  2. Public Prediction Markets:
    I introduced public prediction markets, which enable users to engage with others by betting on their fitness outcomes. This gamified element enhances user interaction and community engagement, adding a competitive layer to the fitness tracking experience.

  3. Integration of Coinbase Smart Wallet Session Keys:
    To improve the user experience further, I integrated Coinbase Smart Wallet session keys. This allows users to participate in prediction markets and accountability bets without the hassle of frequent wallet signing, streamlining interactions and making the app more user-friendly.

  4. Weekly Reward Mechanisms:
    I implemented a weekly rewards system that incentivizes users to maintain consistent fitness habits. Users can earn rewards, such as a free basename, for achieving their step goals for seven consecutive days. This feature not only promotes long-term engagement but also gamifies the experience, encouraging healthier lifestyles.

These enhancements have significantly improved Verifit’s functionality and user experience, making it a more robust and engaging platform for decentralized fitness accountability.

Cheer Project

Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.

Discussion