Tradable, Breedable, Non-Fungible Tokens Now Available on Stellar with Litemint

The upcoming NFT factory in action.

Let’s have fun! Non-fungible tokens (NFT) are unique and non-interchangeable crypto assets. They can be used to represent rare and exclusive collectibles—a powerful concept for new digital markets and now available on Stellar and live in Litemint!

While such tokens have been standardized with ERC721 and proficiently used on the Ethereum blockchain (e.g. CryptoKitties), their implementation on Stellar remains challenging due to the absence of programmable smart contracts.

However, it was possible to leverage several characteristics of Stellar Smart Contracts (including batching, atomicity and sequencing) to implement a blockchain-based NFT contract on Stellar.

The requirements were as follow:

  • Decentralized verification of NFT contract terms (i.e. on the blockchain).
  • Tradable tokens, compatible with Decentralized Exchange (DEX).
  • Optional traits mechanism (for implementing inheritance, breeding, generation…).
  • Optional immutable meta data.

The Contract

A combination of atomicity constraints applied to 4 mandatory operations seals the NFT creation process to a unique transaction preventing future tampering and ensuring the asset is unique and undivided from inception.

An NFT contract is valid IFF:

  1. The issuer has ONNE signer, zero-weighted.
  2. The issuer has ONNE transaction.
  3. The transaction created ONNE account.
  4. The transaction created the issuer account.
  5. The transaction has ONNE set_options operation.
  6. The transaction has ONNE payment operation from issuer.
  7. The issuer payment operation amount is equal to 0.0000001 XLM (one stroop).

IFF = If and only if.
ONNE = One and only one.

Traits & Inheritance

Optionally, the contract accepts any number of payment operations (traits) as long as they do not involve the issuer account (this would violate rule number 6). These operations can be used as a simple method to involve existing tokens in the creation of new NFTs e.g. allowing the implementation of generational tokens and/or breeding.

View the NFT transaction for this example.

The NFT factory (upcoming) provides an easy interface to experiment and breed NFT tokens.

More complex interactions (e.g. siring with other parties) can also be implemented using this mechanism.

Trades

NFTs are tradable on the DEX like any other assets, directly from Litemint.

They can also be listed in your app shop to benefit from cross-currency payments with Stellar path payments.

Conclusion

The project has now been committed to the Litemint codebase and is already available to all web app, desktop and mobile users. If you are running a self-hosted Litemint setup you can pick up the change from the master branch to start playing with NFTs.

Head over to the Tokenz.store website to view all NFTs created including the first offspring (an Angry Punk Zombie).

Enjoy and stay tuned for more!