Inspiration

  • AI has been witnessing significant advancements and demonstrating its power across various domains in recent years, from enhancing healthcare and transportation to stimulating creativity and improving efficiency across industries. With this in mind, we recognize the potential of integrating AI into the Blockchain world, amalgamating two of the most influential technologies of our time.
  • Capitalizing on AI-generated images, we envision exciting opportunities in diverse fields such as art, design, and marketing, empowering creators with an almost boundless source of unique and diverse visual content. This integration can revolutionize the concept of 'digital assets' within the Blockchain realm.
  • Hence, we present our impactful project: AI NFTify. Our Marketplace is a platform that harnesses artificial intelligence to streamline the NFT arts generation process. It offers a digital marketplace where users can exhibit, discover, and monetize AI-generated artwork, collectibles, and other unique digital assets. The platform leverages the Bitcoin and Rootstock chains to ensure security and uniqueness on-chain.

What it does

  • The AI NFTify Marketplace offers users a unique platform where they can:
  1. Seamlessly transition from a Web2 experience, using our innovative email-based onboarding technique, while ensuring the security of users' assets through a decentralized key distribution system. Users can interact with our Marketplace via email, transfer, and claim NFTs through a user-friendly interface.
  2. Generate unique images using powerful AI to visualize their own imagination.
  3. Mint their favorite AI NFTs on the Rootstock blockchain, benefiting from its high scalability and interoperability.
  4. Inscribe the Ordinal on the Bitcoin blockchain, enhancing the collecting, trading, and scheming experience on the most secure chain.
  5. Explore a captivating gallery and manage their own AI NFT artwork, facilitating selling, buying, and trading of AI NFTs within our AI NFTify Marketplace. Furthermore, our Marketplace provides a Prompt trading feature, enabling users to sell their creative yet distinctive AI NFT Prompts without the need to sell their NFTs.
  6. Bridge their Ordinals to Rootstock, unlocking the capabilities of trading, staking, and voting using Smart Contracts while preserving the rarity of the Bitcoin Ordinal.

How we built it

Rootstock Marketplace Smart Contract

  • We developed a Marketplace contract on Rootstock, allowing users to mint, trade, and bridge AI NFTs using the unique blockchain protocol of the Rootstock chain. This protocol extends Bitcoin’s capabilities to enable smart contracts without compromising its core layer.
  • Our Rootstock Marketplace contract

Walletless onboarding

  • To ensure convenient engagement for Web2 users, AI NFTify employs cryptographic wallet technology, providing a familiar experience akin to traditional Web2 but with decentralization through cryptographic algorithms. This approach allows accessibility for both Web2 and Web3 users seeking ownership of unique NFTs created through artificial intelligence.

Key-Shared Technology Introduction

  • We utilize cryptographic algorithms, including Distributed Key Generation (DKG) and Secret Sharing Scheme (SSS). We engage three nodes as "trusted entities" for distributing user keys. When a user logs in on Web3, the nodes run an independent DKG (MPC) algorithm to generate a Private Key. One node is designated as the creator. Only the user, on the front-end, can create the private key, ensuring user security. The SSS algorithm allows the user to recover their private key with a threshold greater than N/2, even with only two nodes remaining.

Algorithms

  • Secret Sharing Scheme (SSS): The SSS algorithm utilizes Lagrange interpolation to divide a secret into multiple parts with a threshold of N/2. The shares generated by the algorithm form points on an equation, with corresponding indices as X and the corresponding share parts as Y. At X = 0, we have the secret point, and the positions of shares correspond to 1, 2, 3, etc. With a threshold of 2, the algorithm generates 3 shares with indices 1, 2, 3. The equation is of the form y = ax + b. With 2 corresponding points (X, Y), it is possible to recover the linear equation and find the Y value at X = 0, representing the secret.
  • Distributed Key Generation (DKG): Addressing the vulnerability in determining the creator of the linear equation and sharing those points, the DKG algorithm has each participant create an SSS. In this case, the secret point is the sum of three secret points from the three participating parties. The share pieces are communicated and summed up according to their respective X indices, resulting in a secret that none of the participating parties knows or has generated.

Security

  • By employing 3 nodes for key generation, we ensure that no single node can access the private key. Even if one node fails or is shut down, two nodes remain available to assist users in recovering their private key. Additionally, we allow users to export the Private Key to the client, enabling them to input it into various wallets such as Hiro Wallet or Metamask.

AI integration

Stable Diffusion Introduction

Stable Diffusion is a text-to-image model. Unlike others, it generates an image matching a given text prompt, providing users with more options and customizations to create satisfying images. The inputs for Stable Diffusion include:

  • Prompt: The text used to generate an image, determining the image's content.
  • Negative Prompt: Text to be avoided in the image, aiding in removing unwanted content.
  • Checkpoint (Model): The algorithm used to generate the image, each with a specific style and purpose.
  • Seed: The seed ensures consistency across multiple generations, determining the random latent "noise" image used as a starting point.
  • Sampling Methods: Algorithms used to generate the image, with some samplers producing higher quality results than others, depending on the prompt and model.
  • Sampling Steps: The number of steps given to Stable Diffusion to 'draw' the image.
  • CFG Scale: The degree to which the generation adheres to the prompt.

We plan to commercialize Generation Data as images from stable diffusion exhibit high uniqueness and creativity. Many users express interest in generating images with similar styles.

Alternatives

  • Due to GPU limitations, we currently use the API version of Stable Diffusion. The AI NFTify images may not showcase the full potential of Stable Diffusion as seen in the original version available here. We aspire to leverage the complete range of features by running the original version locally on our server.

Future

  • Our ambitions extend beyond commercializing just Generation Data. Currently, platforms like Civitai offer mostly free access to models, but creating them requires significant time and adjustments. We observe that many users prefer using existing models rather than creating their own. Fortunately, the blockchain enables transparent on-chain management, aligning with our vision for efficient model utilization.

Bitcoin Core Node

Challenges we ran into

  • Our project encountered challenges related to the availability of Bitcoin testnet resources, affecting the seamless integration of Bitcoin Ordinals. When running our own Bitcoin Core node, differences between Regtest and testnet with the Mainnet posed issues. To circumvent these challenges for the demo, we used a detour approach, employing one main BTC address with many ordinal addresses. In production, we intend to provide a 1:1 BTC:ordinal address ratio, similar to Hiro Wallet.

Accomplishments that we're proud of

We take pride in achieving the following milestones:

  • Developing a dApp that seamlessly merges Web2 user experience with blockchain capabilities.
  • Successfully constructing a robust Marketplace for AI NFTs on the Rootstock chain, encompassing comprehensive features for generating and trading within our platform.
  • Gaining proficiency in interacting with a Bitcoin Core node and utilizing the Ordinal Protocol.

What we learned

Our journey in building AI NFTify has been a rich learning experience, enlightening us on:

  • Machine Learning (ML) and Deep Learning (DL) algorithms, particularly focusing on text-to-image AI models.
  • Interactions with Bitcoin Core nodes and understanding the Ordinal Protocol.
  • Comprehensive insights into the Rootstock blockchain architecture.

What's next for AI NFTify Marketplace

Our roadmap for the AI NFTify Marketplace includes:

  • Implementing and running our own server for Stable Diffusion and integrating more features from it.
  • Developing a bridge NFT system to facilitate integration with other EVM-compatible chains.
  • Enhancing the Proxy Server interface between the Bitcoin Core node and the Marketplace to provide more security interactions, especially when new Proposal is launching about Bridge Vault, BRC20.
  • Creating an interface for users to preview prices before submitting transactions.

Built With

Share this project:

Updates