New Here? Claim Your 30% Discount on Your First Blockchain Node Access!

banner image

ERC-721 vs ERC-1155: Comparison of NFTs Standards

Vance Wood

Vance Wood

October 6, 2023

9 min read

article cover

Creating non-fungible tokens or NFTs, verifiably unique virtual collectibles, remains among the most impressive and ambitious use-cases of blockchain technology. That’s why developers agreed to make the process of NFTs creation more or less standardized.

ERC-721 and ERC-1155 are two mainstream standards of NFTs for Ethereum and all Ethereum-like blockchains using Ethereum Virtual Machine (EVM). In this longread, GetBlock compares two standards and displays their pros and cons.

ERC-721 and ERC-1155 standards for NFTs: Highlights

Like other ERCs, ERC-721 and ERC-1155 are mainstream standards for token minting on Ethereum used to create non-fungible and semi-fungible tokens.

  • ERC-721 and ERC-1155 (short for “Ethereum Requests for Comment”) are two NFTs standards for Ethereum and plenty of Ethereum Virtual Machine (EVM) blockchains like Polygon, BSC, Arbitrum, and so on;
  • Both ERC-721 and ERC-1155 describe the standardized procedure of creating non-fungible tokens on the blockchains;
  • ERC-721 was proposed in late 2017 by Dapper Labs, a studio behind CryptoKitties, a first-ever mainstream commercial NFTs project;
  • ERC-1155 standard was invented in Q2, 2018 by Witek Radomski, a co-founder and CTO of Enjin Coin, a pioneering NFT-centric blockchain;
  • While ERC-721 and ERC-1155 have a lot in common, there are some differences: with ERC-1155, smart contract can support various functions;
  • Also, ERC-1155 tokens can be transferred in batches; many tokens can be “wrapped” in single transactions;
  • ERC-1155 standard might be used for semi-fungible tokens; it also supports “safe transfer” mode that allows transaction reversal.

By 2023, both token standards are used in NFT marketplaces, gaming and metaverse dApps on Ethereum-like blockchains.

What are NFTs?

Non-fungible tokens or NFTs are cryptocurrency tokens with unique features that can not be replaced with each other. Like all other digital assets, they should be referred to as cryptographically secure contracts on this or that blockchain.

  1. Fungible tokens. The majority of cryptocurrency tokens are fungible: you can easily swap 1 USDT for 1 USDT as all USDT stablecoins (even issued on various blockchains) are equally valuable. Bitcoin (BTC), Ethereum (ETH) are also fungible cryptocurrencies.
  2. Non-fungible tokens. Every token has its unique features. For instance, NFTs can be associated with specific videos, images, texts, and so on. That’s why you can not exchange Bored Ape Yacht Club #1111 for Bored Ape Yacht Club #2222 as they are verifiably different tokens.

NFTs gained traction in 2020-2021; most of them represented digital collectibles with primitive artworks. Crypto Punks (“Punks”), Bored Ape Yacht Club (“Apes”), Mutant Ape Yacht Clubs (“Mutants”), and Azukis were the most overhyped NFTs collections.

What is ERC?

In Web3 development, ERC stands for Ethereum Request for Comments which is a standard of creating tokens for Ethereum and other blockchains based on Ethereum Virtual Machine (EVM).

Simply put, instead of creating new tokens from scratch again and again, Ethereum developers agreed on the standardized routine for creating tokens.

In larger perspective, ERCs are part of EIPs (Ethereum Improvement Proposals), a suggestion on how Ethereum networks should be advanced. Say, EIP-20 (the common token standard for EVM-based cryptocurrencies) paved the path for ERC-20 tokens, and so on.

Standard Concept First Proposed
ERC-20 Core standard for EVM-based cryptos 2015
ERC-621 Allows EVM tokens to be destroyed and re-deemed 2017
ERC-721 Basic standard for non-fungible tokens 2017
ERC-777 Advanced version of ERC-20 2017
ERC-1155 Semi-fungible tokens or advanced NFTs 2019

While there are plenty of token standards for Ethereum (ETH), ERC-20 and ERC-721 remain the most widespread standards.

What is ERC-721?

Actually, ERC-721 is an Ethereum (ETH) token standard that brought the concept of non-fungible tokens (NFTs) to popularity. It was proposed in 2017 by Dapper Labs, a Web3 studio behind CryptoKitties, a first-ever mainstream NFTs project.

CryptoKitties_first_commercial_NFTs

Image by CryptoKitties

Creators were focused on making the token standard that would protect the uniqueness of this or that token. Tokens of new type were prohibited from replicating. Their ownership history was completely transparent: everyone was able to check it via block explorers like Etherscan.

In general, ERC-721 tokens were designed to be easily transferred between on-chain wallets (like ERC-20 tokens), to be easily attributed to this or that owner, and to have transparent supply.

The majority of NFTs are tokenized certificates of ownership of this or that piece of content: image, video, photo, in-game asset, and so on. For instance, here’s how the contract of ERC-721 asset with tokenized GetBlock logo would like:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract GetblockLogoNFT is ERC721Enumerable, Ownable {
    
    string private _baseTokenURI;

    constructor(string memory baseURI) ERC721("GetblockLogo", "GL") {
        _baseTokenURI = baseURI;
    }

    // Mint a new NFT
    function mint(address to) public onlyOwner {
        uint256 newTokenId = totalSupply() + 1;
        _safeMint(to, newTokenId);
    }

    // Set the base URL (can only be called by the owner of the contract)
    function setBaseURI(string memory baseURI) external onlyOwner {
        _baseTokenURI = baseURI;
    }

    // Retrieve the URL for a specific token's metadata
    function tokenURI(uint256 tokenId) public view override returns (string memory) {
        return string(abi.encodePacked(_baseTokenURI, uint2str(tokenId), ".json"));
    }

    // Helper function to convert uint to string
    function uint2str(uint256 _i) internal pure returns (string memory _uintAsString) {
        if (_i == 0) {
            return "0";
        }
        uint256 j = _i;
        uint256 length;
        while (j != 0) {
            length++;
            j /= 10;
        }
        bytes memory bstr = new bytes(length);
        uint256 k = length - 1;
        while (_i != 0) {
            bstr[k--] = byte(uint8(48 + _i % 10));
            _i /= 10;
        }
        return string(bstr);
    }
}

In general, ERC-721 is the most widespread NFT standard suitable for basic speculative, entertainment, GameFi, and Play-to-Earn use-cases.

What is ERC-1155?

ERC-1155 is yet another token standard for non-fungible assets. It was introduced in 2018 by CTO of Enjin Protocol Witek Radomski. The combination of fungible and non-fungible token features was the main rationale behind the launch of the new token standard.

In particular, this idea was interesting for on-chain games when players needed to transfer “semi-unique” assets in a single transaction. ERC-1155 tokens can be compared to general admission tickets on certain concerts: they are not mapped to specific seats (“fungible” feature), but can not be exchanged to the tickets for another concert (“non-fungible” feature). ERC-1155 tokens can be transferred in a batch; also, they can support the “safe transfer” option with the opportunity to reverse crypto transfer sent to a wrong address.

ERC-721 vs ERC-1155: Unbiased comparison

Now let’s compare technical features, utility aspects and security designs implemented in ERC-721 and ERC-1155 tokens.

ERC-721 vs ERC-1155: Basics

Basically, both ERC-721 and ERC-1155 are standards of cryptocurrency tokens for Ethereum and EVM ecosystem blockchains. Moreover, both of them solve the problem of fungibility, i.e. uniqueness of this or that crypto token. ERC-721 and ERC-1155 are frequently referred to as the standards for non-fungible tokens (NFTs).

While it’s not a mistake, we should understand the difference between two approaches to fungibility championed in ERC-721 and ERC-1155 standards. ERC-721 is a standard for “classic” NFTs: each of them is unique and can’t be exchanged for other tokens.

By contrast, ERC-1155 might be used for semi-fungible tokens that merge the functionality of ERC-721 and ERC-20 (fully fungible) assets. Also, ERC-1155 can be converted to non-fungible assets while ERC-721 can’t become semi-fungible.

ERC-1155 is also known as the "Multi Token Standard” since it can represent both fungible tokens (similar to ERC-20) and non-fungible tokens (similar to ERC-721) within a single smart contract.

As such, we should perceive ERC-1155 as a more feature-rich form of ERC-721 with a number of added functions.

ERC-721 vs ERC-1155: Tech and security

To implement a number of “new-gen” instruments, ERC-1155 adopted some additional features compared to its predecessor. First, ERC-1155 supports “batch transfers”: multiple tokens can be transferred in a single transaction. This instrument makes operations with tokens more gas-efficient: the sender only needs to pay for gas once while every ERC-721 transfer is charged with a separate fee.

Also, ERC-721 and ERC-1155 have different approaches to metadata: in case of ERC-721, every token has its own metadata while with ERC-1155, large groups of tokens can share metadata. This is also useful for semi-fungible tokens minting and transfer.

As a result, the design of the ERC-721 contract is less sophisticated. To allow the safe transfers, batch transfers and advanced metadata operations, ERC-1155 supports native batch functions (balanceOfBatch and safeBatchTransferFrom), making it more efficient for operations involving multiple tokens.

Last but not the least, ERC-1155 uses a Uniform Resource Identifier (URI) pattern where token metadata can be defined either on-chain or off-chain (in IPFS), with potential placeholders that allow for each token to have distinct metadata if required.

ERC-721 vs ERC-1155: Use-cases

Technical differences between two standards paved the path for various use-cases in GameFi, trading, Play-to-Earn and other segments. ERC-721 is a “basic” standard, it caters for NFT collections associated with the artworks, videos, texts, images, and so on. It works when uniqueness is a key feature needed while gas-efficiency can be sacrificed.

ERC-1155 is a crucial standard for GameFi as it is suitable for in-game assets. For instance, in an online MMORPG with blockchain-based economics, minter can transfer 500 virtual axes in a single transaction with low gas. Each of them will be equal and fungible within this game, but can not be used in another one.

Also, ERC-1155 can be of paramount importance for some “serious” use-cases. Minter can create verified and cryptographically secure insurance documents, digital authenticity certificates, diplomas, and so on, with shared metadata.

In future, the set of use-cases for ERC-1155 will highly likely grow hand in hand with the increased massive adoption of NFTs.

GetBlock, a cutting-edge blockchain RPC node provider, is a reliable tech basis for building GameFi and Play-to-Earn apps. With our 50+ blockchains, high RPS, competitive prices, you can get all you need in a single interface.

Also, don’t miss the opportunity to get 20% bonuses via our affiliate program. Sign in with MetaMask or email and try our Web3 infrastructure today.

Context Banner

Wrapping up

ERC-721 and ERC-1155 are two Ethereum Virtual Machine token standards used in the digital collectibles segment. ERC-721 was proposed in 2017 by Dapper Labs while ERC-1155 is a brainchild of Enjin revealed in 2019.

ERC-1155 has a number of functions unavailable for its predecessor: safe (“reversible”) transfer, batch transfer, shared metadata, and so on.

ERC-1155 provides a more generalized and efficient framework, especially when dealing with diverse and large sets of tokens within a single application or platform.

FAQ

  • What are ERC-721 and ERC-1155 tokens?

    plus
  • How do ERC-721 and ERC-1155 differ?

    plus
  • ERC-721 and ERC-1155: Which one is better?

    plus
  • Are ERC-721 and ERC-1155 tokens scams?

    plus
Vance Wood

Vance Wood

October 6, 2023

9 min read

twittertwittertelegramtelegramLinkedinLinkedin