What is ERC-777?
ERC-777 is a technical standard for fungible tokens on the Ethereum blockchain. Ethereum provides templates containing rules to guide developers on how to create a certain type of token. These templates are known as technical standards.
The Long Definition
ERC-777 is a technical standard for fungible tokens on Ethereum. It is the template that defines the rules for creating tokens that can be swapped directly for one another (fungible tokens).
In that regard, ERC-777 is similar to ERC-20, which also defines functions for creating fungible tokens. It, however, focuses on allowing more complex trade interactions on decentralized exchanges (DEXs).
Technical Standards Explained
Ethereum hosts many crypto projects. These are created by different developers from all over the world.
Ethereum also wants to create an ecosystem. Here, different projects can interact with one another, allowing users to smoothly move between them
However, given there are many developers worldwide creating their own projects. Since these developers are working independently, they are more likely to create incompatible products.
Ethereum doesn’t want that to happen. And this is where ERC-777 and other technical standards come in.
Ethereum has implemented technical standards for many of the blockchain processes. These standards have the prefix ERC, which stands for Ethereum Request for Comment.
The ERC standards provide a common template for developers to follow. Doing so prevents two products from different projects from being wildly different.
Products that follow the same standard have key technical similarities. These similarities allow them to be compatible with one another.
History of ERC-777
ERC-777 was created in 2018 by Jordi Baylina, Jacques Dafflon, and Thomas Shababi. This is around the same time that the decentralized finance (DeFi) movement was born.
DeFi is a revolution that brought with it a whole range of new financial services on the blockchain. These include decentralized trading, lending, and borrowing.
The ERC-777 standard was inspired by the desire for a better-decentralized trading experience. So, it was designed with functions – rules written in code – that would allow for better DEX integration.
Overall, these improvements are aimed at making it an ERC-20 replacement. However, ERC-777 hasn’t quite taken off. ERC-20 remains the commonly accepted standard for fungible tokens.
What does ERC-777 do?
ERC-777 was created with decentralized trading in mind. This is evident in the fact that the token standard is designed to be fully compatible with existing DEXs. It features special functions to facilitate complex trade interactions.
This works by allowing a new classification of addresses known as operators. An operator is an address that can, with permission, send tokens on behalf of another address. This can be a crypto exchange. In this context, ERC-777 tokens allow DEXs to automatically withdraw and send funds from a user’s wallet.
Another defining feature of the token standard is its hook mechanism. This reduces a common issue with ERC-20 tokens where tokens often get stuck in a contract.
Tokens can get stuck when they’re sent to the wrong smart contract. When that happens, the tokens cannot be withdrawn or used in any way. They are trapped forever.
So, how does the ERC-777 hook mechanism work?
Hooks are special functions that allow contracts and accounts to react to incoming tokens. They streamline how smart contracts and accounts communicate when receiving tokens. So, when you transfer a token to a contract, the hooks will notify it about the incoming token.
Contracts need to implement these hooks in order to receive ERC-777 tokens. If you attempt to send such tokens to an incompatible smart contract, the transaction will not go through. And since the tokens never make it to the contract, they don’t get stuck.
Hooks also allow for several other use cases. These include:
- Rejecting reception of tokens
- Redirecting tokens to other addresses
Other token standards
Other token standards on the Ethereum blockchain include:
ERC-20
ERC-20 is the commonly accepted standard for fungible tokens on Ethereum. Most tokens in the Ethereum ecosystem are ERC-20. Popular examples include Basic Attention Token (BAT), Tether’s USDT, and Maker (MKR).
ERC-721
ERC-721 is the technical standard for Non-Fungible Tokens (NFTs). NFTs are unique assets. They are not divisible into smaller units and cannot be interchanged evenly for one another.
ERC-1155
ERC-1155 defines the rules for creating multiple token types. It allows for the deployment of an infinite number of fungible and non-fungible tokens on one smart contract. So, it can be viewed as a combination of ERC-20 and ERC-721.
ERC-4626
ERC-4626 is a standard for yield-bearing tokenized vaults. These are smart contracts that lock funds and provide a yield in return.
Want to join the Dypto journey? Follow our socials!