Tokens are the backbone of the Ethereum blockchain, and each type of token must have a smart contract containing a set of standards that allow it to execute specific operations. However, these functions are usually static and unchanging, meaning different kinds of token standards must exist to support different types of applications, exchanges, and other blockchain-based projects.
ERC-721 and ERC-1137 are two of the many token standards currently available, so understanding them is vital to the dApp development process. So what are these token standards, and how do they work and differ from each other? Keep reading for plain English explanations of each format.
If you’re ready to move on and learn more about different ERC token standards, check out our other comparisons below:
ERCs And Token Standards Demystified
ERC stands for Ethereum Request For Comment, a phrase that many people in the programming community may find familiar. These ERCs are technical documents containing detailed application-level rulesets and standards for later implementation. But what does that mean, exactly?
Smart Contract Standards
In order to develop a working understanding of ERCs, it’s essential first to define smart contract standards. As you may know, smart contracts are chunks of code that are preprogrammed to be self-sustaining and self-executing when specific conditions are met.
On the other hand, smart contract standards are the rulesets that govern a smart contract and allow it to function correctly. Simply put, it contains all the technical details of how a token should work and the necessary parameters for implementation. So what does this have to do with ERCs and token standards? The answer: token standards.
Everything built on the Ethereum blockchain has to be predictable and completely decentralized, which means developers need a set of standards to build applications that are compatible with the blockchain. This is where token standards come into play.
Token standards are a subset of smart contract standards, which means that they’re also powered by these self-executing bits of code. These rulesets are designed to tell developers how to plan for new tokens on the Ethereum blockchain plus how they’re meant to interact with other applications.
The Difference Between Smart Contract And Token Standards
It’s important to note that token standards occupy a different space than smart contract standards on the blockchain. Smart contract standards contain all the technical “how-to”, while token standards represent the API or interface of a token. Here’s a real-life example to demonstrate the difference between both standards:
Imagine you’re about to purchase a new car from a retailer. You’d walk up to a salesperson and ask for the specific model, right? What you wouldn’t do is tell that salesperson how exactly to make your car, because the manufacturer handles that. In this example, the salesperson is the token standard or interface, while the manufacturer is the smart contract standard. An ERC needs both types of conventions to function.
As we mentioned earlier, ERCs contain conventions for application development, planning, and deployment. That means they consist of smart contract standards and token standards. In short, they outline all the necessary conventions for fully executing an Ethereum-based app and act as a type of crypto development guidebook.
These comprehensive documents are written by programmers and start as EIPs, or Ethereum Improvement Proposals. Anybody can propose a new EIP, but it’s their responsibility to garner support and spread awareness of the proposal’s potential. Once the EIP has been voted on and finalized by a committee, it can become an ERC.
Every new ERC changes the way users and developers can interact with the blockchain, making it an exciting concept for many enthusiasts and developers.
The ERC-721 Token Standard Explained
Even before limited edition crypto assets hit the market and captured the public’s imagination, humans had a propensity for collecting items. Specifically, things like baseball cards, figurines, and even limited-run comic books have all experienced tremendous popularity and soared in price over the years. The main driving factor behind the perceived value of these assets is their rarity and uniqueness, meaning that one item isn’t directly interchangeable with another. But how does this connect to the ERC-721 token standard?
In simple terms, this set of conventions lends the same level of uniqueness and non-fungibility to blockchain-based assets. But that’s not all there is to this robust token standard. Here’s a simple yet comprehensive explanation of the ERC-721 token standard and how it works.
What Is The ERC-721 Token Standard?
The ERC-721 token standard implements all the functions and conventions specified in EIP-721. It defines NFTs on the blockchain and makes them completely unique. That means you can’t make a copy of an ERC-721-based NFT and exchange it with an existing one because the parameters and definitions are simply not the same.
Something to note is that ERC-721 tokens were initially known as “deeds” rather than non-fungible tokens. This is because the developers wanted to convey that a token holder also owned all rights and the representation itself. However, “deeds” was too closely associated with real estate. So they settled on “non-fungible tokens” because it better represented the standard’s potential.
How Does The ERC-721 Token Work?
As we mentioned before, the ERC-721 token standard turns digital assets into completely unique NFTs located on the Ethereum blockchain. It does this by adding a layer of metadata to the token’s information, which is what identifies a specific item’s rarity and, therefore, its value. But how does this powerful token standard work?
To answer this question, we’ll list a few of its functions.
Functions Resembling ERC-20
ERC-20 is the technical standard for smart contracts on the Ethereum blockchain, which means that most (if not all) ERCs borrow functions from it. Here’s what it shares with ERC-721:
- name: This identifies a token’s name, which applications and smart contracts can discern.
- symbol: This represents a token’s shorthand or symbol. Ex. USDT, BTC
- totalSupply: This fetches the total supply of a specific token present on the blockchain. The number need not be constant.
- balanceOf: This returns the number of NFTs held by one particular wallet address.
Ownership functions lay the foundation for user and holder attribution. With these commands, dApps can manage, transfer, and acquire more tokens.
- ownerOf: This function retrieves the address for the wallet currently holding a specific NFT. Because these tokens are non-fungible, every ID is completely unique.
- approve: This grants a third-party entity permission to transfer assets or tokens for the holder.
- takeOwnership: This allows one user to “withdraw” specific tokens from another person’s wallet. However, this must be done in tandem with Approve to be appropriately executed.
- transfer: This function allows owner-initiated transfers to other users, unlike the takeOwnership function.
- tokenOfOwnerByIndex: This makes the ID retrieval process more efficient. Because every NFT has a specific ID on the blockchain, retrieving its data can become cumbersome and taxing to the blockchain. Luckily, with tokenOfOwnerByIndex, all IDs of NFTs owned by a single user are collected in a tray for easier fetching.
The metadata function, while simple, is the backbone of a token’s non-fungibility. Without this specific command, NFTs wouldn’t be recognized by the blockchain as particularly unique or rare.
- tokenMetadata: This feature provides an interface that helps users link to a token’s metadata or actual data.
Events are user-driven actions that may or may not act as a trigger for something else. Here are the two main functions outlined in the ERC-721 standard:
- Transfer: This event is recorded when the ownership of a specific token is transferred from one user to the next. It produces all relevant information, such as which account moved what token, the token’s ID, and which user received the asset.
- Approve: This event is recorded whenever one user approves another user’s request to take ownership of a token. Like the transfer event, all relevant data (sender, recipient, and token ID) are produced upon firing.
Advantages Of ERC-721
The main advantage of the ERC-721 token standard is its non-fungibility. Because every asset is unique, the use case potential can expand into many different products, projects, and industries. But it isn’t all about potential, and the current popularity of NFTs demonstrates this.
Artists, in particular, can benefit from the editioning of their work. By implementing ERC-721 on decentralized exchanges, they can release generative NFTs or several “editions” within a collection. This way, they can create digital scarcity while building value. Moreover, these tokens are also immune to piracy.
Another advantage of this specific token standard is that it’s reliable and immutable, which means that it can represent essential documents. A few compelling use cases would be certificates of investments, ownership, or other static, verifiable data.
Disadvantages Of ERC-721
Before the NFT boom, one of the most significant disadvantages of using this token standard was its slow adoption among blockchain developers. However, that’s long since changed. So what are the other drawbacks of using this convention for your project or token?
In one word: inflexibility. Because NFTs, by definition, are immutable, unchangeable, and totally unique, they don’t offer much in the way of flexibility. For example, let’s say you’re attempting to buy a fungible and non-fungible token in the same transaction. You may find that the dApp or exchange won’t allow it and charge you twice the gas fees for one purchase.
How Do You Make ERC-721 Tokens?
Now that we’ve covered the basics of ERC-721, you may be wondering about deploying this token yourself. Unfortunately, the process can be pretty technical, so we’ll only be providing a quick overview of the necessary steps without getting too specific. Let’s dive in.
Step 1: Get Test ETH
The first thing you need to do when attempting to deploy your token with ERC-721 is to retrieve some test ETH. You can do this through an Ethereum faucet, but you will need a browser extension called MetaMask before proceeding. Once you’ve installed the requisite software, you’ll need to head over to an Ethereum faucet that awards small amounts of currency for menial tasks. For this example, we’ll be using TESTNET Ropsten.
Next, you’ll have to connect your ETH wallet to the faucet by copying your wallet address from MetaMask and pasting it into the specified field. Once you’re done, all you need to do is click the button to receive test currency.
Step 2: Create Your Assets
Now that you have your test currency, you’ll need to prepare the digital asset for your NFT. This step is entirely open-ended since you can turn almost any digital asset into an NFT. Users have uploaded static drawings, generative art (such as CryptoPunks), videos, 3D models, and entire experiences to NFT marketplaces and successfully made a product.
In the same vein, you can theoretically upload assets that don’t technically belong to you. For example, many NFT creators have taken to stealing other people’s intellectual property and minting it on the blockchain as an NFT. Others have even taken screenshots of popular tweets or uploaded memes as tokens. However, this is generally frowned upon. Some people may see this as a cheap cash grab rather than the full utilization of blockchain technology.
Step 3: Add Files To IPFS
Once you have your art ready for uploading, you’ll need to add the files to the IPFS or Interplanetary File System. We’re using this hosting service because it’s completely decentralized, which aligns perfectly with the driving forces behind blockchain-based creation and trading.
But more than just being a secure and censorship-resistant hosting service, IPFS is necessary for NFT creators because it never goes down. So now that we’ve established the why, let’s dive into the “what”.
Uploading your asset onto IPFS requires coding knowledge (or a willingness to learn). You’ll need to prepare your files in a cmd/terminal window and do some light coding. Also required is a JSON file containing your NFT’s metadata. For detailed instructions, we recommend navigating to the IPFS website for relevant documentation.
Step 4: Create The Token
This is where the technical side of things comes into play. Once you’ve prepared everything, you’ll need to import the ERC-721 contract for a seamless creative experience. Then, you’ll need to create a solidity file and input the necessary code. Much of the code mentioned above is widely available on the internet, and it should be easy to find an existing tutorial for your specific needs.
After this step is done, you can deploy your compiled smart contract and approve the transaction through MetaMask. Once it’s been deployed, you can expand the details and plug in your Ropsten address, the URI of your JSON file, and a few numerical values. Now you have a token hosted on the Ropsten chain.
Applications Of ERC-721
Because ERC-721 is the backbone for all non-fungible tokens, real-life implementation is present across the blockchain. Everything from the ever-popular Bored Ape Yacht Club (BAYC) to CryptoKitties is based on the standard, with some projects expanding upon existing conventions for added functionality.
But ERC-721 application doesn’t end with buying and selling NFTs. In the coming years, we may see this token standard being used for real estate, physical art trading, loan financing, land management, and even identification.
The ERC-1337 Token Standard Explained
SaaS (Software as a Service) is king in today’s ever-changing digital landscape. Many of the most profitable projects and companies are taking on a subscription model to support themselves and create income. The EIP or ERC-1337 token standard seeks to replicate the popular subscription model for the blockchain, although it has yet to see any actual Web3 implementation. Here’s a plain English guide to the ERC-1337 token standard.
What Is The ERC-1337 Token Standard?
As we mentioned earlier, the ERC-1334 token standard contains a set of rules and conventions that support a subscription-based model for blockchain businesses. In some ways, it can be considered Web3’s answer to one of its predecessors’ most effective income generators.
This is a fascinating development because it can create consistent revenue streams for creators and developers while remaining aligned with the decentralized philosophies of the blockchain. Additionally, customers can remain completely anonymous behind their crypto wallets.
However, this is all speculation. As of May 2022, the ERC-1337 token standard has not yet been approved and is still in its proposal phase.
How Does The ERC-1337 Token Standard Work?
Blockchain technology is still in its infancy stages, which means that achieving basic functionality like a scheduled payment system requires a lot of effort. Luckily, the EIP or ERC-1337 seeks to simplify the process by emulating the same methods traditional companies and service providers use. But how do they do this?
Hypothetically, decentralized applications built on ERC-1337 will allow people to “sign” their transaction data for repeated transactions. An excellent real-life analog would be using checks for a new rental. For example, if a landlord asks their renter to send post-dated checks, then the person renting would have to pre-fill 11 more bills, all dated for future encashments or deposits. In this example, “signing” an ERC-1337-based transaction would be similar to post-dating your checks. Let’s get into more detail.
Say you’ve just discovered a blockchain-based dating app that requires a monthly subscription, but only comes in yearly packages. Typically, you’d have to send individual payments every month, but if the dApp was built using ERC-1337, you’d just need to sign your details once and swipe away. But how does this work?
The answer is that, by signing your details once, you’d be authorizing 12 payments to your chosen merchant. The first payment will go through upon the initial signing, with the rest executed at specific dates.
These pre-scheduled payments are possible because the ERC-1337 token standard contains smart contracts designed to interact with your Ethereum wallet. As a result, the overall payment process is simplified while also providing a user-friendly interface to manage ongoing payments and subscriptions. Likewise, users can cancel their payments at any time.
Advantages Of ERC-1337
Before we dive in, it’s important to note the difficulty of pinpointing a token standard’s specific advantages and disadvantages without seeing it in action. Its main (presumptive) advantage is that it unlocks one of the most profitable business models for blockchain-based projects and organizations. On the consumer side, it cuts out the need for regular payments, which can be cumbersome if a user has several subscriptions on their plate.
Disadvantages Of ERC-1337
There are two main disadvantages of using ERC-1337, with one being linked to the token standard itself while the other being more of a byproduct of its design.
The first drawback is the inherent costs (not necessarily monetary) of supporting a subscription-based business model. dApp owners and developers would have to take steps to continuously provide value to their customers, which means that there needs to be a relatively quick turnover for content or improvements to their service. This is especially true if the subscription fees are a project’s primary source of income. Again, however, this is more of a business issue than a token standard-specific one.
That aside, there is a bigger, more relevant drawback to using the ERC-1337 token standard. Specifically, many people may be put off planning for it because it hasn’t seen any real-life use yet. The standard is still in the middle of its proposal phase, making it uncharted territory for blockchain devs and enthusiasts.
Implementations Of ERC-1337
As we mentioned earlier, the ERC-1337 protocol hasn’t seen any use because it hasn’t been approved yet. Blockchain enthusiasts and dApp developers have discussed the token standard and its many potential applications. Here are a few ways the ERC-1337 may be used in the future.
dApp developers and creators work tirelessly to provide services, improve existing technology, and create content for marketplaces – often without any compensation. However, implementing the ERC-1337 protocol in a Patreon-style website would allow creators to receive monetary support for their work. Likewise, it can even be used for crowdfunding ventures.
The ERC-1337 token standard was meant to power subscription-based payments, which means that these products and services will be its primary outcome.
Key Differences Between ERC-721 vs. ERC-1337
Earlier, we discussed how every token standard has a unique set of functions and rules. That means many different protocols exist to address other gaps in functionality. With that in mind, it’s crucial to understand how each convention functions when planning for a dApp or project. So how do the ERC-721 and ERC-1337 token standards differ?
Because the ERC-721 token standard acts as the technical model for everything related to non-fungible tokens, it’s seen a lot of use in the last year. From regular, static NFTs to generative art pieces born from code, the ERC-721 has quickly become one of the most common token standards in today’s crypto space.
On the other hand, the ERC-1337 has seen no use. As we mentioned earlier, this standard is still in its proposal phase, which means a committee will have to review and finalize it before deployment. Even if it were officially approved, however, it’s improbable that it would be used as widely as ERC-721.
While both standards exist to improve functionality on the Ethereum blockchain, they do entirely different things. For example, the ERC-1337’s functions are more connected to user crypto wallets, while the ERC-721 token standard deals more with the type of asset that can be traded on the various exchanges.
Final Thoughts On ERC-721 vs. ERC-1337
While developing a deep understanding of every token standard might be unrealistic for many people planning their decentralized app or project, even the gist can help immensely. After all, choosing the wrong protocol can lead to bottlenecks and functional failures for many applications.
In this guide, we compared one of the most popular standards (ERC-721) with one of the lesser-known ones (ERC-1337). Despite their different level of recognition and implementation, both seek to make the Web3 experience more comfortable and accessible for users. Both also rely on decentralization to create a more democratic internet experience, which is why folks have started developing for the blockchain in the first place.
Do you want to contribute to Web3 and the Ethereum blockchain with your decentralized app? If you answered yes, then be sure to check out the Tokenfy web page to see how we can transform your ideas into a fully-formed project!