Inspiration
Problem
The art industry has had many conflicts of interest over human history (plagiarism, “piracy”, copyright issues, etc. among others). Where in most cases the most damned actor was the artist, losing rights over the piece of art he/she produced whether due to an abusive management from the company in charge of distribution or “piracy” actions from other actors who wanted to get and distribute the piece for free.
In the context of music, web2 has brought some partial solutions to this problem where platforms such as Spotify solved many of these conflicts for artists and final users who wanted to consume the music.
But still it has remaining problems derived from centralization. A musician cannot control what happens with his/her song after submitting, if the platform suddenly changed their policy, the artist does not have much to do against that, each platform has their own agenda and interest over the piece of music that might differ from the artist's.
From the consumer side, they usually have to pay for a subscription or particular song/s that give no other benefit than just listening/downloading these songs, where early adopters have no distinction or benefit.
Solution
Build a web3 platform that allows musicians and music consumers to interact directly with each other giving them incentives to produce and buy respectively empowered by **Soulbound* and NFT tokens.*
Once the author creates a new song, the platform creates 2 personal Soulbound tokens for the artist (mp3 + cover image) + a NFT collection containing cover images for sale to final consumers, all of them released at the same time.
The buyer will have, in addition to the song rights to reproduce and download directly from the platform, ownership over a unique NFT generated when the song was released.
This way we are giving incentives to early buyers/adopters to have the added value of an NFT that represents the song release + an economic incentive for the artist that sold those NFTs in addition to full ownership over the song.
What it does
ProtoSound is a tokenized music web3 platform where musicians can upload their songs minting a Soulbound Tokens (song + cover) for their profile and a collection of NFTs for sale attached to the song release.
The NFT collection is minted right after the release and when a user wants to purchase the song, the contract will select randomly a song from the remaining minted NFTs and transfer it to the user (person who just purchased the song).
Music consumers can buy these NFTs to contribute to the artist and show them in their profiles as a gallery of songs. In addition, they would be able to download and reproduce the song as a premium feature.
How we built it
Contacts
ProtoSound: Main contract of the app. Keeps track of the metadata for all the songs, it is also a factory contract that creates the NFT + Soulbound tokens. Is in charge to interact directly with the frontend and acts as a middleman betwen the users and tokens. Finally, it triggers the token minting + transferences.
Deployed at: 0xc372e7F2139ea586014F2726e918e5BE1AFfe57A
VRFv2Consumer: Acts as the oracle of the app for random numbers (see verifiable randomness function), it is also connected with the Chainlink Automation upkeeps service for requesting a new random word fulfillment each day.
SongCover: NFT collection contract that mints when the artist creates the song. It also consumes the VRFv2Consumer contract to pick one of the available released NFTs randomly when a user buys it*.*
SongAuthorCover: Soulbound token contract that mints a new one each time an artist creates a new release, it represents the cover of the song assigned to the author.
SongAudio: Soulbound token contract that mints a new audio token when an artist creates a new release, this one belongs to the author artist.
The Chainlink Role
We used chainlink to solve the problem about randomness on-chain using the VRF service in combination with the Automation service to update the random word automatically.
We did a setup where an automated upkeep process calls the function requestRandomWords() that orders the coordinator a new one for refreshing the random number. We automated the process using the same address as the owner of the contract.
function requestRandomWords() external onlyOwner returns (uint256 requestId) {
...
}
For simplification, we mint all the tokens at the moment of creating the song and assign all of them to the author, SongAuthorCover + Song + SongCovers.

Frontend
The frontend was built using React, on top of Vite framework and Mantine as UI library.
- UI for Feed page.
- UI for profile page.
- UI for home page.
- Connection to Metamask wallet.
- Integration with IPFS running a local node on frontend to upload all the files.
- Connection to deployed smart contracts using ethers.js
The IPFS Role
We did an integration with IPFS to ensure decentralized storage for all the files uploaded during the process of releasing a song, it was pretty useful because requires a simple setup and it's free.
The IPFS node is instantiated in the client using the Singleton pattern to creating the node a single time during the session.
// Singleton IPFS node implementation.
export class IPFSNode {
private static instance: IPFSNode;
node: IPFS.IPFS | undefined;
private constructor() {}
private async init() {
this.node = await IPFS.create();
}
public static async getInstance(): Promise<IPFSNode> {
if (!IPFSNode.instance) {
IPFSNode.instance = new IPFSNode();
await IPFSNode.instance.init();
}
return IPFSNode.instance;
}
}

Network
We use Polygon Network due to its EVM compatibility, velocity, scalability and price, making much easier the development process. In test stage we are going to use Polygon Mumbai test network
Challenges we ran into
- The scope was very big for a tight deadline so unfortunately we could not finish all the features we wanted.
- Was difficult to organize and schedule time for the project because all the team members were working full time in other projects.
- From the UX side, the process of uploading multiple files to IPFS + mintining multiple tokens after while keeping the process simple was such a challenge.
- From the contracts side, one of the biggest challenges was the testing part, since the VRF contract is inmutable and it does not work on testing networks such as hardhat, we had to redesign the smart contracts architecture in order to use a mocked VRF contract for testing.
Accomplishments that we're proud of
- Though the video was challenging, we are happy with the result.
- Though we could not finish all the features, the app looks pretty complete and nice-looking.
What we learned
- How to make a full animated video from scratch.
- It is possible to combine Chainlink services to make the whole process more powerful, in our case, the VRF + Automation was a really cool combination.
- About the VRF, was very important to keep the VRFConsumer contract separated from the set of "business" contracts. Because coupling the VRF with your contracts implies the annoying process of updating the consumer address on the VRF dashboard.
- Some insights about frontend integration with IPFS, it's very cool the concept of running a node directly from the client.
- Was our first time using Polygon as a blockchain technology and we nailed it! It turned out to be very fast, which is especially useful during the development/debugging process.
- Was our first time working with Soulbound tokens and they were simpler to implement than we expected! just a regular NFT without transfer function.
What's next for ProtoSound
There are a set of features/improvements that are not going to be archivable during the MVP stage but worth to mention in case of continuing this project after the end of the Hackathon.
- Finish Feed page, we weren’t able to finish the integration with smart contract.
- Finish Collected songs page, we weren’t able to finish the integration with smart contract.
- NFT auctions when the collection was released instead of direct sell to the first buyer.
- Announce future releases as an artist defining price/collection size.
- Follow/Unfollow artists and see future releases.
- Release full albums as an artist where each Album contain an NFT collection and the users can buy/bid the Album plus the NFT representing that album.
- Release as a band instead of a single artist using a multisig.
Improvements to current infrastructure
- Improve Chainlink automation for making the NFT purchasing process even more secure by setting a shorter period on chron for updating random word.
- Build subgraphs to make the on-chain data fetching faster and performant.
Built With
- alchemyapi
- chainlink
- hardhat
- ipfs
- mantineui
- openzeppelin
- polygon
- react
- solidity
- vite
Log in or sign up for Devpost to join the conversation.