When building anything related to a blockchain, you'll face one big decision: how far down the decentralized application (dApp) rabbit hole you want to go. A challenge with dealing with blockchains is that some actions will take time, even if you opt for a blockchain using Proof of Stake (PoS) protocol. Since the Algorand Marketplace project was the first time our team took a deep dive into the world of blockchains and cryptocurrency, we opted to keep most things "off the chain."
This decision gave us the benefit of creating a typical centralized application with some blockchain technology mixed in. It gave us time to explore and learn the inner workings of Algorand's offerings and the surrounding ecosystem. The logic and data structures in our code control Non-Fungible Tokens (NFT) in terms of ownership. That gives us more power over potentially transferring NFTs to other blockchains, and it is easier for us to track who owns an NFT at any given point in time.
How we create and track NFTs
So what's in our NFTs? It's relatively minimal. At the moment, it includes a URL that points back to the marketplace website, a human-readable name, and (if applicable) the edition number. This is all subject to change as Algorand is working with the community to standardize how an NFT should be defined on their blockchain.
While the Algorand blockchain itself tracks the ownership, we also track the owner for NFTs as they relate to our end users in our database. We also store a reference to the NFT in our database for quick access during lookups and transfer transactions. All other data, such as images, localized names, and the number of editions to mint, is stored in a headless CMS. That means we can leverage the CMS for organizing the NFTs according to the app's needs. This way, a non-technical person could manage the creation and updating of NFTs while the rest of our stack generates them and tracks their ownership.
I have two significant takeaways from all of this. First, it required much reading and spiking for the whole team seeing as we all started with zero knowledge of cryptocurrency. Ensuring your team has plenty of time to get up to speed is vital when tackling a new and buzzwordy field such as this.
Second, you have to be very strategic with picking what features to use and avoid in your blockchain of choice. We tried various options for representing an NFT in the Algorand blockchain, each with its pros and cons. In the end, the solution I just outlined ended up being the most straightforward one and let us focus on writing familiar code. Just like with any software project, time will tell if new requirements will uphold that statement. Most likely, we'll move towards a more decentralized solution over time as this field is still maturing.
The official name of this project is still to be determined. It will be made open-source sometime soon.