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.
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:
- The issuer has ONNE signer, zero-weighted.
- The issuer has ONNE transaction.
- The transaction created ONNE account.
- The transaction created the issuer account.
- The transaction has ONNE set_options operation.
- The transaction has ONNE payment operation from issuer.
- 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.
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.
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.
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!
Founder of Litemint. Developer and Technical Lead with 10+ years of experience working for financial firms BGC Partners and Crédit Lyonnais Bank (Crédit Agricole) in London and Paris. 2+ years working on smart card technology in the healthcare sector (British Government National Program for IT).
Founder of Okijin (indie games) and co-founder of Israeli-based video game company Massive Games (pie.ai). Winner of the Honorable Mention Prize at the 2014 Linux Foundation & Samsung Tizen App Challenge.
Born in Korea, raised in France. Studied French Literature and Latin at the university of Angers (one of the most beautiful cities of France) before I taught myself the poetry of the machines.