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 (batching and atomicity) to implement a blockchain-based NFT contract on Stellar.
Batching / Atomicity — Batching is the concept of including multiple operations in a single transaction. Atomicity is the guarantee that given a series of operations, if one operation fails they all fail. Kolten
Learn about Stellar Smart Contracts: https://medium.com/stellar-community/understanding-stellar-smart-contracts-23ebe1568b6
Litemint NFT requirements
- Decentralized verification of NFT contract terms (i.e. on the blockchain).
- Tradable tokens, compatible with Decentralized Exchange (DEX) and Stellar wallets.
- Optional traits mechanism (for implementing inheritance, breeding, generation…).
- Optional immutable meta data.
De Facto NFT on Stellar
The Litemint implementation of non-fungible tokens is de facto—that is, regardless of whether someone knows the implementation or creation process of the NFT tokens, the non-fungibility of such tokens remains intrinsic and non repudiable.
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 and any other Stellar Wallet.
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!
Prev. Developer and Technical Lead for BGC Partners and Crédit Lyonnais Bank (trading systems), British Government National Program for IT (smart card technology in healthcare).
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.