Combining parts of the ERC20 and ERC721 Ethereum token standards could help to provide stable tokens that are backed by real world assets.

ERC, EIP and ESD?

Because some code patterns in Ethereum smart contracts were repeated often, the idea arose to define standards. These are formalized by discussion in an Ethereum Request for Comments (ERC). When a standard is sufficiently discussed these are locked in Ethereum Improvement Proposals (EIP), which can later turn into a standard (ESD).

ERC20 — Token Standard

One of the first well known patterns started as ERC20 which is widely used to issue a token via smart contracts on the Ethereum blockchain. This standard defines the needed functionality to create a crypto currency in code, called a token. All ERC20 tokens have at least the following functions:

totalSupply: Returns the total token supply.

balanceOf: Returns the token balance of a specified account

transfer: Transfer tokens from the calling account to another account

approve: Allow an address to withdraw tokens from your account

allowance : Returns the amount which an address is still allowed to withdraw

transferFrom: Transfer tokens on behalf of someone. (useful for contracts)

There are more elements which are normally included in a token like the name, symbol and decimals variables and events which are fired like Transfer and Approve. The above described elements you are able to create a token on the Ethereum blockchain that can be used like any other cryptocurrency and that’s supported by a lot of wallets.

ERC721 — Non-Fungible Token Standard

Recently a new standard was introduced to track and transfer the ownership of non-fungible tokens (NFTs). Something is considered non-fungible if it’s distinct and not interchangeable with something of the same kind. Examples that are listed in the standard are:

Physical property — houses, unique artwork

Virtual collectables — unique pictures of kittens, collectable cards

“Negative value” assets — loans, burdens and other responsibilities

Collectibles are hot

There are a lot of examples of ERC721 implementations being used for virtual collectibles. One of the first implementations is crypto kitties which are unique digital kittens that have a randomly generated DNA. Each kitten is a unique token that is tradeable and transferrable. More that 360864 crypto kittens have been sold to date of which the most expensive kitten was sold for more than 253 ether (~$106,500.00 at that time). The overwhelming success of this project spawned crypto zombies which teaches users to write smart contracts by making a crypto collectibles game. Another spin off is crypto countries where users can own a land of the world. Other creative applications are software licensing (dotlicense) and owning 3d space in a game (decentraland). Another interesting experiment called Palm explores the possibility of creating virtual in-game assets that evolve over time.

Physical Asset Provenance

Virtual collectibles are fun, but one of the more serious applications of ERC721, is giving a blockchain identity to a physical object by turning it into a token. By doing that you can refer to the physical object on chain and add programmable traits to it. You can start by logging real world events for this identity and keeping a transparent ledger of it. Imagine a mechanism where you enrich these event with metadata like ERC1046 proposes so you can create a well documented provenance history. At oneUp we have experience in building blockchain provenance implementations for a multitude of applications. We’ve explored the areas of predictive maintenance, decentralised trading and supply chain provenance for our clients.

So why not combine it all and make a hybrid?

Simplified functionality (not everything is in here)

Recently we explored the concept of combining ERC20 and ERC721 to have the best of both worlds. A token that registers non-fungible assets and provides the ability to break this asset up into pieces so it can be used as currency.

ERC721 registry

The owner (or minter) which has custody of a physical asset, can use the ERC721 part of the contract illustrated above to add an asset and mint an X amount of ERC20 token supply. Furthermore the owner can provide a provenance history for the asset by adding media uri’s that hold information on it. Think of documents like: proof of ownership, customs approval, certificates of authenticity or images of the actual asset.

ERC20 token

Users can see the media uri’s associated with an asset and they have access to the ERC20 part of the contract. This part facilitates things like getting the balance of a user, transferring tokens and approving another user or contract to spend tokens on their behalf. It is this last functionality that makes it possible to trade the token via decentralized exchanges.

So what’s the use?

The creation of this token would mean anybody can HODL part of a physical object and can trade this for any other token. Possible use cases are numerous, like co owning any registered asset (like lambo’s) for the purpose of timesharing, investment or collateral. Imagine the possibility of hedging against crypto volatility into real estate, wine, art or diamonds!

Checkout our repository to play with some example code.