Inspiration

One of the inspirations for NFT Words is the market for domain names, especially for real word, single word domain names. These are often auctioned off or otherwise sold for high sums ... because they are rare and unique. NFTs have also shown us that there is value to things that are rare and unique.

NFT Words is an exploration of the boundaries of what an NFT can be. Words are meaningful to us, so why not own, collect, and trade words that we value?

NFT Words challenges the notion that NFT images and metadata must be fixed and unchanging. While this may make sense for digital art and other types of NFTs, I think there are many possibilities for NFTs that change after minting, either by owner customization or other external triggers.

What it does

NFT Words is a marketplace for owning and collecting words as NFTs. Currently only on the Rinkeby Testnet, the first "drop" includes 42 words minted as ERC721 tokens. You can login with your wallet at https://nftwords.bid to browse the words, see which ones you own. While the dapp site uses the Opensea API to display words and price data, it links to Opensea for buying and selling operations.

Once you own an NFT Word, you can customize the image and the metadata description. You can personalize the display of the words you own. And if you sell, the new owner can customize to their liking. Current image customizations include word color and background color, but this could be expanded to offer a choice of fonts, more colors, etc.

A special feature of the smart contract rewards collectors: once you own three NFT Words, you automatically get a fourth word, minted directly to your address (no need to "claim" the bonus NFT). More incentives and game mechanics are planned (suggestions appreciated!).

How we built it

NFT Words consists of four components:

  • Smart Contract: An ERC721 smart contract coded in solidity forms the core, leveraging contracts and libraries from OpenZepplin. Unique aspects include a batchMint function that is useful for word "drops", and a function that provides the "own 3, get 1 free" incentive. For contract deployment (Rinkeby testnet so far) and interaction with the dapp, Alchemy was used locally (deployment, drops), in the browser (web3 authentication and contract interaction), and in the API server (contract interaction, and authentication verification).

  • Opensea Marketplace: Opensea fetches the contract and the minted NFTs and displays them in a Collection, enabling direct sales and auctions of NFTs. All 42 NFTs in the first drop were listed for auction.

  • Dapp: https://nftwords.bid: Coded in HTML and Javascript, this client-side app interacts both with the Opensea APIs and the smart contract itself, display words and current price data. The sites lists the words and enables users to login with Metamask (or other wallet) to view which words they own, and to customize them. In order to prove ownership of a word, the site asks owners to sign a message with Metamask, which is then verified by the metadata API server.

  • Metadata API Server: Powered by Firebase Cloud Functions and coded in Node.js, the API server has 3 main functions: 1) to serve the NFT metadata for each word in JSON format, which includes the image URL, 2) to dynamically render the images for each word, including any customizations requested by word owners, 3) to enable owners to customize their images and metadata description. For the latter, the server verifies the signed message from Metamask to be sure they are the true owner of the word, and then saves their customizations. Both metadata and customization settings are stored in a Firebase Realtime (noSQL) database.

Challenges we ran into

  • working with the OpenSea SDK was a bit of a challenge, as the returned data structures weren't always in a format friendly to the objectives of this project. But I found ways to make it work, using two separate API calls for assets and orders from Opensea.
  • finding the answers to question via Discords and web searches wasn't always easy, and sometimes outdated solutions got in the way ;)
  • Opensea's Rinkeby Test site and api are pretty unstable/unpredictable. The API results in errors at times and the next refresh they work just fine (if you find the Dapp isn't showing any words, a hard-refresh may help). The UI often has progress spinners all the way down, and doing simple operations like making and accepting offers often took dozens of retries. This posed an extra challenge for recording the demo video ;)

Accomplishments that we're proud of

  • putting all the various pieces to together to work cohesively
  • innovative smart contract feature that rewards collectors with free NFTs when they acquire their 3rd word
  • doing it all solo in 5 days!

What we learned

  • how to deploy solidity contracts for ERC721 NFTs
  • how to get web sites to interact with web3 wallets such as Metamask
  • how use Metamask as means of authentication, to verify not only that the user owns the address, but also that they own specific NFT from a specific contract.
  • how to use the Opensea SDK and api to pull data from their marketplace
  • how to use the Alchemy web3 api to deploy smart contracts, and interact with contracts to mint tokens and poll the contract for data such as the owner of a specific token
  • how to use the Devcash bounty platform!!
  • how to use Uniswap to swap one token type for another -- not directly related to NFT Words, but something that was required to get Wrapped Ether (WETH) for use on Opensea

What's next for NFT Words

  • More customization options for NFTs
  • More game mechanics and rewards, such as rewards for owning certain combinations of words that spell out messages, etc.
  • Deeper integration with the Opensea API to enable buying/selling features from within the dapp, if possible
  • A mint-your-own function for those who don't want to wait for their desired word to be "dropped" -- choose your word (with restrictions) and buy it directly from the smart contract (not via Opensea)
  • Mainnet Launch!
Share this project:

Updates