Hello to the community!
Today we have an exciting update on Secret NFTs – privacy-preserving non-fungible tokens built on Secret Network. As part of the work on the first Secret Grant, the reference implementation for SNIP721 (a Secret NFT standard) has been completed!
Secret Network’s ability to provide programmable privacy dramatically expands the design space for NFTs, which can be so much more than simple representations of digital artwork. This blog post will walk through the unique properties of Secret NFTs that will unlock many new and critical use cases across multiple fields, including art and gaming. It will also link to a new tutorial (in partnership with Figment Learn) that will teach you how to create your very own Secret NFT!
The completed reference implementation:
The updated specification:
What Can Secret NFTs Do?
Non-fungible tokens have been a focus for the Secret ecosystem from the very beginning. SNIP-20s (fungible Secret Tokens) already power the rapidly growing Secret DeFi ecosystem, allowing users to turn assets from other blockchains into privacy-preserving versions that can be used across Secret’s universe of composable, front-running resistant DeFi applications.
The importance of programmable privacy for NFTs is just as strong as the importance of programmable privacy for DeFi. The improvements to usability and security are massive, benefitting both users and creators. Similarly to how SNIP-20s unlocked new types of DeFi applications built on and secured by Secret Network (such as SecretSwap), Secret NFTs unlock new and exciting possibilities for Secret Apps that will leverage this powerful primitive.
Secret NFTs have two unique differentiators from NFTs in other ecosystems:
Private ownership: Since NFTs are rare, anyone can know who owns a certain NFT and correlate addresses with individuals. Allowing for private ownership of NFTs ensures your assets and transactions do not need to be exposed to everyone by default, which otherwise restricts the potential growth and adoption of NFTs.
Private metadata: In addition to public metadata, Secret NFTs provide an optional private metadata field. This enables you to do things like have game cards that have some public abilities, as well as special hidden abilities. Or an art NFT creator might choose to make a thumbnail or watermarked version of the image public so people have an idea of what they are buying, but the full resolution/non-watermarked version is private and must be purchased to view it.
Because Secret Network provides programmable privacy, NFT contract creators have a ton of choice in how their NFTs work. Here are just a few examples provided by Baedrik (the recipient of this Secret Grant and the creator of the Secret NFT reference implementation):
- You can choose whether the token supply is public/private. If it is public, anyone can query how many NFTs exist in the contract and what their token IDs are. If the token supply is private, only the authorized minters can view the IDs and number of tokens.
- You can choose if the owner of an NFT is public/private. Even if the contract creator chooses to make ownership public, any user can change their default to make all NFTs they own in that contract have private ownership.
- You can choose if NFTs contain sealed metadata, in which no one, not even the owner, can view or alter the private metadata until the owner of the NFT irreversibly unwraps it. This is useful for implementing lootboxes or game card packs that have unknown but already determined contents (instead of randomly determining the contents after unwrapping). Anyone can query whether an NFT has been unwrapped.
- You can choose if the sealed metadata remains private after unwrapping. This can be useful if they are games cards that contain hidden abilities. You still want the abilities to remain hidden for gameplay, even after you open your mystery pack.
- You can choose whether a minter can alter the metadata of an NFT. For gameplay, this could be used to level-up your NFTs.
- You can choose whether an NFT owner can alter the metadata of an NFT. For gameplay, you wouldn’t want an owner to give his card any ability he wants, but the idea of an evolving NFT where each owner can make their mark and pass it along to the next owner to do the same is intriguing.
Users and collectors themselves also have additional choices created by the introduction of Secret NFTs. As an example, you can whitelist addresses to allow them to know that you are the owner of an NFT, to view the private metadata, and/or to transfer an NFT. You can give an address this permission for every NFT you own, or just specify individual NFTs upon which they have this permission.
One possible use would be creating an NFT gallery app, in which an owner could whitelist the gallery address to view the private metadata, but not the owner. So anyone would be able to view the private contents if they use the gallery app, but no one, not even the gallery app would know who the owner is. And no one except the owner would be able to view the private contents outside of the gallery app. Alternatively, the gallery app could be designed to pass along a payment to the owner each time their NFT is viewed, but as long as the gallery contract does not reveal the payment address and uses a SNIP-20 for payment, the owner could remain hidden even while being paid.
All these permissions can be set to expire at any given block height or time, and you can revoke any permission you have previously granted. And because providing programmable privacy is fundamentally about choice, you can also choose to make ownership and/or private metadata completely public for anyone to see if you desire!
Hopefully reading the above has set your mind racing as you consider all the new possibilities created by Secret NFTs. Baedrik’s foundational work now allows you to create your own Secret NFTs and applications that leverage their unique properties!
We’re excited to share that the first of multiple Secret NFT tutorials has been already been created and shared on Figment Learn. This tutorial was created by Florian Uhde, a software engineer and game developer with a passion for blockchain, creativity and systemic design. In this first tutorial, you will learn how to interact with these tokens and a pre-deployed contract.
In addition, Secret NFTs have already made a successful appearance in the wild! A team of hackers (including Baedrik and Florian) recently won a hackathon prize for their card game based on Secret NFTs known as “Secret Heroes” for the ETHGlobal NFT Hack event. Players can buy NFT cards (heroes) with four different skills, then “battle” their cards against two other players. Learn more about how it was built and get inspired!
If you’re interested in expanding this exciting work, consider applying for your own Secret Grant. Currently over $50M USD in SCRT is available for developers who want to build private-by-default applications or fundamental primitives on Secret Network. Our focus as an ecosystem is unlock more usable, more powerful, and more secure applications that serve millions of users all over the world. We’d love to support your work and welcome you to our global community of Secret Agents!
To date, much of the adoption of NFTs has focused on art or digital collectibles, and possible use cases have been limited by the “public-by-default” model common everywhere else in the blockchain space. Now there are many new use cases for NFTs which are unlocked through the introduction of programmable privacy, including the representation of a broad range of real-world assets, new digital gaming experiences, new monetization models for creators and collectors, and much more!
We believe the introduction of Secret NFTs represents a massive leap forward for the potential of non-fungible tokens. If you have your own ideas for what you could build with Secret NFTs or how to expand on this grant work, please share your thoughts on the Secret Forum – or get in touch with our teams and communities on the Secret Chat!
Join us, and help us build a more secure and more empowering internet.