GymCoin

At the intersection of fitness and blockchain

Collaborators: Peter Larcheveque, Jasmine Guan, Yujian He, Mingxuan Wu, Albert Kong

Abstract

Nowadays, physical fitness and bodybuilding have been unprecedentedly popular. While it is usually easy for people to start exercises or diets, they may find it difficult to persevere for lack of inner-drive. There are many factors contributing to this phenomenon – busy schedules, intense training plans, lack of workout buddies, etc. All these factors gradually lead to a loss in motivation, causing people to become more reluctant to daily exercise, and eventually stop working out completely. With the development of technology and the global market, blockchain technology and cryptocurrency inspired us to develop a blockchain-based application that incorporates exercising, entertainment, and socialization through the implementation of a platform that rewards users for actively staying fit. By creating such a platform that targets people’s demand for personalized socializing and motivation for exercising, we expect to promote our GymCoin with a high socio-economic value and, broadly, a healthy lifestyle for people as well as the growth of the gym industry.

Introduction

Our Main website: here -- It covers our project White Paper, User Instruction, User Interaction Interface (Deploy), and Wallet.

Users can connect to their smart devices like watches/rings, choose their desired type of exercise, and trace their heart rate & time for calories consumption. They will be rewarded a certain amount of GymCoins for calories burnt. GymCoins can then be used in a NFT platform where users can claim ownership to images of their interest and trade with each other. Data storage and management as well as the trading process will be done on the Ethereum blockchain using Solidity and the User Interface will be derived from the Scaffold-ETH application. We expect this integrated platform to promote the circulation of GymCoin within its community and increase GymCoins’ value through interactions. With the rise of fitness tech and the gradual maturity of blockchain technology, we expect GymCoin to bridge the two markets.

Why BlockChain?

GymCoin is a self-sustaining incentive system that rewards exercise; due to blockchain’s core principles of proof of work and immutability, we can guarantee that the incentive rewards will not be tampered with. As the creators of GymCoin, it is also advantageous to use Blockchain over eCommerce because of lower compliance costs and higher transaction speeds.

Blockchain also works harmoniously with our reward system:

1) GymCoin as a fungible token (ERC20) allows equal exchange among users (5 GymCoin is equivalent to another user’s 5 GymCoin)

2) GymCoin characters as a non-fungible token (ERC721). NFTs that have unique identifiers and cannot be exchanged for similar kinds!

Blockchain allows seamless scalability and growth because our infrastructure needs for transacting will require minimal change as our user base grows. In addition, GymCoin remains competitive among other decentralized products due to no other successful products existing at the intersection of fitness and blockchain.

How GymCoin Works

The step-by-step process for new GymCoin users is as follows:

1) Users must first connect GymCoin to their Metamask.

2) Users must register an account.

3) Users must interface GymCoin with fitness tech that tracks workouts (ie. FitBit, Apple Watch).

4) Users must then choose their type of exercise (running, lifting, calisthenics, etc.). Metrics such as calories burned, heart rate, and duration determine the amount of GymCoin to award.

5) Workout!

Optional steps:

a) Sign up for exercise plans that reward bonus GymCoin (ie. “Gain 5 extra GymCoin for obtaining 25 GymCoin over 7 days, but lose 3 GymCoin if you fail to complete the contract.”)

b) Transfer GymCoin.

c) Post on the GymCoin App.

d) Exchange GymCoin for GymCoin NFTs.

In regards to supply and earning, GymCoin has an unlimited supply and is earned through exercise. If the GymCoin economy comes into fruition and we see inflationary rates (the value of 1 GymCoin becomes very low), we may decide to burn some GymCoin and implement an earning cap. We also plan on allowing staking in our ecosystem - this would allow users to lock in their GymCoin in order to obtain voting power on decisions such as daily cap/allocation of GymCoins. Higher stakes equal more voting power, ultimately incentivizing users to lock in their GymCoin to keep participating. This is important to the longevity and health of our community.

The proof of work for GymCoin will come via decentralized miners authenticating the manifest. This verifies the accuracy of new transactions that are added to the blockchain.

User Progression and NFT Collectibles

As users obtain more and more GymCoin, their user level gradually increases. To maximize user retention and incentivize daily workouts, we have designed GymCoin NFT collectibles that are only unlockable at certain levels. These unique non-fungible tokens can be minted by users and traded. One pitfall we are carefully trying to avoid is creating overhyped and worthless collections. If users are willing to mint our NFTs, we want them to retain value. Historical evidence shows that generating exact replicas of images (simply with a unique serial number) is correlated with failed collections. Based on evidence from popular NFT collectible series such as Bored Ape Yacht Club and CryptoPunks, we hypothesize that the value of NFT collectibles are governed by a mixture of invisible hand economics, novelty, aesthetics, and ultimately, hype. Therefore, we are generating cool, unique images and only allowing users to mint collectibles after reaching certain levels. We posit that these two factors should add intrinsic value to each NFT and make minting them worthwhile.

Image: Starry Night Quad Stomp NFT

DeepDream Convolutional Neural Network

The NFT images are generated using a DeepDream CNN. This deep neural network enhances images by over-interpreting patterns in the original image, thus creating a “dream-like” image. The idea in DeepDream is to choose a layer (or layers) and maximize the "loss" in a way that the image increasingly "excites" the layers. Choosing lower layers produces simple strokes or patterns and choosing higher layers produces more abstract, convoluted patterns. This is because lower-level features are learned in earlier layers in the base model and higher-level features are learned in later layers! In our case, we chose lower-level layers. We then created a feature extraction model and calculated the loss at these lower layers (loss = sum of activations at specified layers only). Whereas in a normal CNN you aim to minimize loss (via gradient descent), in DeepDream we aim to maximize loss (via gradient ascent)! This is because we want to add perturbations and stroke patterns to the image instead of detracting noise. We ran the DeepDream model on images of famous bodybuilders (Ronnie Coleman, Arnold Schwarzenegger, Larry Wheels) and the images you see above and below are the result.

Image: Iron Sultan Ronnie Coleman NFT (max level unlockable)

Conclusion

GymCoin provides a unique opportunity to leverage the intersection of fitness and blockchain. By implementing GymCoin with fitness tech such as FitBit, users can automatically be rewarded GymCoin currency for working out. The blockchain infrastructure ensures that transactions are safe and immutable. We have also made a conscious effort to focus on the “tokenomics” of GymCoin to ensure that our currency maintains value. We ensure that our community is both safe and interactive through the ability to share workout details and transact among users. Users are incentivized to continually use GymCoin via contract incentives and a progressive user leveling system. Users can also unlock the ability to mint exclusive GymCoin NFTs after reaching different level benchmarks. The images for these NFTs are generated using a DeepDream CNN and are completely unique from one another. All in all, we hope that these tenets work toward creating an ecosystem and community of like-minded gym lovers!

Step 1: Connecting MetaMask

Step 2: Register Account

Step 4: Add Exercise

Tokenomics and Proof of Work (PoW)

Tracking user heartrates can be done using a FitBit device in which the user allows the GymCoin application to access their FitBit account's profile, devices, activities, and heartrate. The GymCoin application is designed to receive user data through OAuth 2.0 with PKCE for the most secure authorization flow. User data such as calories and heartrate can then be accessed by making a request to the GymCoin API server which makes the proper request to the FitBit API. Example of a request which returns calorie activity:

curl -X POST -H "content-type:application/json" "http://localhost:8080/" --data '{ "id": 1, "data": { "endpoint": "/1/user/-/activities/list.json", "beforeDate": "2022-02-19", "offset": 0, "limit": 5, "sort": "desc"} }'

The GymCoin API can then interact with the Ethereum blockchain as a Chainlink external adapter hosted by AWS Lambda or uploaded as an external adapter on the Chainlink market. A node operator must add it as an external adapter or GymCoin can create its own Chainlink node with AWS EC2. See result below:

FitBit Integration

Previous
Previous

Automated Twitch Clip Generator