Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

🌹 NFT collection built on top of open palettes and living on the Polygon blockchain (WIP)

Notifications You must be signed in to change notification settings

leovct/rose-curve-nft-collection

Repository files navigation

🌹 Rose Curve NFT Collection

The Rose Curve NFT Collection is a generative art project based on rhodonea or rose curves. They were discovered by an Italian mathematician, Guido Grandi in the early 18th century. They form very aesthetically pleasing circles, called petals that have been used to create beautiful NFTs such as floral mandalas as part of this collection.

The project is built on top of the open palette NFT collection which is a fantastic project deployed on the Ethereum blockchain. It is a collection of randomized colour palettes made of 5 unique colours that anybody can use to create generative art, games, website themes and more. The colour of the palettes is used to generate and colour the petals of the Rose Curve NFT Collection. Thus, to mint a Rose Curve NFT, you need to own an Open Palette NFT first.

The Rose Curve project will be deployed on the Polygon blockchain to avoid the crazy gas fees of Ethereum. It will also make use of Chainlink VRF to generate a truly randomized NFT collection.

🛠️ Design (WIP)

The initial idea of this project was to make NFTs with on-chain metadata and SVG art. While this works in the case of small SVGs, it becomes much more complicated when working with SVGs of several hundred kb. The Rose Curve SVGs, generated by my python script, weigh about 500 kb each, so hosting these on the blockchain would cost a lot of money. I'm not even talking about the block size problem depending on the blockchain.

The solution I found to this problem is to use a decentralised storage protocol to host the SVGs. It's a compromise because the metadata will not be stored on the blockchain, in the same place as my smart contract, but at the same time, the SVGs will be uploaded on decentralised and permanent technology, quite similar to a blockchain. Apart from a few technical differences, it's pretty much the same for the user: the metadata will be stored on a decentralised, censorship-proof protocol and will persist over time.

Great, then how does this affect the design of my project? My initial idea was to have a fancy web interface where users could mint a Rose Curve NFT if they own an Open Palette NFT. The mint button would be linked to the smart contract, where all the heavy computation would happen. It would request a random number from Chainlink VRF, generate the random SVG, encode the SVG in the URI of the NFT, create and then transfer the NFT to the user. Because the SVG generation step is the most expensive part of the whole process, it should be done off-chain. So here's the new plan: when users click on the mint button of the website, it connects to the smart contract. It requests a random number from Chainlink VRF, creates and transfers the NFT to the user. This time, the URI of the NFT will point to decentralised storage, with a path pointing to the SVG that we will generate in the background. Of course, the idea is not to generate the SVG in the user's browser as this would take too much time, even if, in itself, it could be a feasible solution. Once the NFT has been created, it will send a request to a backend server with a simple API allowing to generate SVGs. The generated function would take the token ID of the NFT as a parameter and use it to find the random number generated by Chainlink VRF for this specific NFT. It would also take the colours of the Open Palette of the user as a parameter and from all of these parameters, it would generate the random Rose Curve SVG and host it on a decentralised storage protocol, at the specific path related to the NFT. This solution is more complicated than the first one, but it's quite similar to how decentralised applications are implemented today.

About

🌹 NFT collection built on top of open palettes and living on the Polygon blockchain (WIP)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published