Inspiration:

We were fascinated by the notion of 'listen to earn', an emerging trend in the blockchain ecosystem. Motivated by this unique approach, we aspired to develop a concrete proof of concept for this model. Our team wanted to take this a step further by adding extra dimensions of music NFTs (non-fungible tokens) and a lottery system, thereby making the music-listening experience more engaging and rewarding.

What It Does:

Listen2Win improves the traditional music listening experience by rewarding users with MUSE tokens for simply indulging in their favorite activity - listening to music. These earned MUSE tokens can then be utilized to participate in lotteries and potentially win exclusive music NFTs.

We further empower our users by allowing them to upload their own songs. Our innovative system, through smart contracts, automatically converts these songs into music NFTs and initiates a lottery for each new music NFT. As a user, you can freely listen to any songs which are actively running a lottery.

Artists receive all tokens from the lotteries on their songs. This empowers artists to gain visibility for their music, while also receiving financial benefit. Our app also enables users to gain stake and rewards in their music streaming application.

How We Built It:

The core architecture of Listen2Win revolves around three main pillars: IPFS for file storage, Solidity smart contracts for lottery and MUSE token mechanisms, and a server-side backend for tracking and verification.

Starting with the IPFS integration, all of the song audio files are stored in IPFS, utilizing the power of decentralized file storage. These files are referenced directly through the NFT's ERC721 metadata, making each token a unique link to a specific song in our catalog.

Our frontend is primarily built with Next.js, a robust framework that allowed us to efficiently build and deploy the app. We integrated open-source code components where it made sense, including wallet connections and music player functionality. Our goal here was to create a clean, responsive, and easy-to-use interface that doesn't sacrifice on performance or security.

The lottery mechanism and MUSE token generation are achieved through smart contracts, written in Solidity. These contracts are designed to run on EVM-compatible blockchains. To ensure fair lottery outcomes, we've integrated Chainlink's verified random function. By integrating this oracle service, we are able to generate provably random results, which are key to the integrity of the lottery system.

To track user listening time, we've built a backend server using Express.js. The server is responsible for tracking and signing off on how much listening time each user accumulates. These time logs are then verified when a user attempts to redeem their MUSE tokens. For storage and quick retrieval of these logs, we've connected the server to a Redis database. This allows for high performance even with a large volume of user data.

When it comes to creating music NFTs and initiating the lottery, the process is automated. Once a new song is uploaded and its corresponding NFT minted, a lottery is immediately set in motion. The lottery concludes when a predetermined MUSE token threshold is met, with Chainlink's verified random function used once again to determine the winner.

Challenges We Ran Into:

Building Listen2Win was a challenging yet enriching experience. Our team had to grapple with numerous new technologies like Redis, Next.js, Chainlink VRF, Express.js, and Pinata/IPFS, all of which were either completely new or only vaguely familiar to us.

Coordinating the many moving parts across tech stacks was another significant challenge. However ,at the end of the day, we managed to seamlessly integrate everything and bring our concept to life.

Accomplishments We're Proud Of:

We take pride in the system’s completeness and the successful demonstration of our proof of concept, which is fully functional and live on the Goerli testnet. The smooth operation of the music player on the web application exceeded our expectations, and the NFT lottery contract's effectiveness is something we're particularly pleased about.

Incorporating various technologies from diverse fields into a single project – from frontend (Next.js), backend (Express.js, Redis), to blockchain (Solidity smart contracts, Chainlink verified random numbers, and IPFS hosting via Pinata) – is an achievement that fills us with a sense of accomplishment.

What We Learned:

This journey with Listen2Win has been incredibly enlightening and challenging. We started out with a spark of inspiration from the "listen to earn" concept that has been bubbling up in the blockchain ecosystem. It was a whirlwind of learning, applying, troubleshooting, and refining various technologies to build our proof of concept, which we're quite thrilled about.

One of the biggest takeaways is how complex and layered these technologies are, but also how powerful and versatile they can be when used correctly. We learned a ton about redis, next.js, chainlink vrf, express.js, and pinata/ipfs. These are technologies we had only skimmed the surface of prior to this hackathon. Diving deep into these tools, understanding their capabilities and figuring out how to integrate them into our project was a huge learning curve, but a rewarding one.

What's Next:

There are several possibilities to explore when considering updates for Listen2Win. One option could be searching for methods to decentralize the MUSE token even further, while simultaneously improving the music player to discourage users from merely farming tokens without genuinely interacting with the music. We could also consider creating a comprehensive tokenomics system for MUSE, possibly incorporating elements of governance, a sink mechanism, and additional use cases. It might be interesting to construct a user-friendly gallery where users could appreciate and display their music NFTs. Future development progress with Listen2Win brings many potential opportunities for enhancing user's experience, security, and robustness of the system.

Links:

Github Repos: https://github.com/brucdarc/l2e-hackathon-frontend https://github.com/brucdarc/l2e-hackathon-backend https://github.com/brucdarc/l2e-hackathon-contracts

Share this project:

Updates