Introduction
In the ever-evolving landscape of blockchain technology, the Ethereum ecosystem continues to push the boundaries of innovation with new proposals and standards aimed at enhancing functionality and user experience. One such proposal is ERC-7699, an extension to the widely adopted ERC-20 token standard. ERC-7699 introduces a novel concept: the ability to include a reference in ERC-20 token transfers. This seemingly simple addition has the potential to significantly improve the clarity and traceability of transactions, enabling users to attach contextual information, such as payment details or transaction purposes, directly to their transfers. As decentralized finance (DeFi) and other blockchain-based applications grow in complexity, ERC-7699 emerges as a practical solution to streamline communication and accountability within the Ethereum network. This article delves into the mechanics, benefits, and potential use cases of ERC-7699, shedding light on how it could shape the future of token interactions.
Brief Overview of EIPs and ERCs
ERCs, Ethereum Request for Comments, governs and sets boundaries/rules for the tokens on the Ethereum blockchain. ERCs are related to the tokens on Ethereum.
ERCs provide Ethereum with significant benefits, particularly in standardization, development efficiency, and coordination. Standardization ensures user safety by preventing the risks associated with interacting with tokens and DeFi protocols that follow different, non-uniform standards. By adhering to accepted ERCs, users can engage with DeFi more securely. Additionally, ERCs simplify development by offering predefined frameworks, reducing the complexity of working with blockchain technology and the Ethereum Virtual Machine (EVM). This enhances interoperability at the development level, making it easier for developers to build and integrate new features. Lastly, ERCs foster coordination within the Ethereum ecosystem, ensuring that developers and DeFi products align with accepted proposals. When an ERC or EIP is adopted, projects must implement the standard to remain compatible and benefit from new improvements, maintaining a seamless and interconnected DeFi environment.
ERC standards are available as fungible and non-fungible tokens. The main fungible token standard is ERC-20, while the non-fungible standard is ERC-721.
ERC-20: Cornerstone of Fungible Token Standardization and Interoperability
The main and fungible token standard in Ethereum is ERC-20. ERC-20 allows builders to put together interoperable token applications with other products and services.
ERC-20 introduces methods such as: name
, symbol
, decimals
, totalSupply
, balanceOf
, approve
, allowance
, transfer
, and transferFrom
. It also provides two additional events: Transfer
and Approval
. Essentially, it implements an API for tokens within smart contracts.
ERC-20 provides:
- Transferring tokens from one account to another,
- Getting the current token balance of an account,
- Getting the total supply of the token available on the network,
- Approve whether a third-party account can spend the token amount from an account.
ERC-7699 improves ERC-20 with some additions in transfer
and transferFrom
methods. Here is an overview of the improvements ERC-20 gains with ERC-7699.
In ERC-20,
transfer
: Includes an identifier for the amount of tokens, an identifier for the target address, and an event calledTransfer
. It checks if identifiers fulfill certain criteria for success.transferFrom
: Includes identifiers for the amount of tokens and the target address, and an event calledTransfer
. It can allow a contract to transfer tokens on your behalf and/or to charge fees.
Introduction to ERC-7699: A standard to ERC-20 improvement with transfer reference extension
ERC-7699 proposes a new token standard with a transfer reference extension in addition to the ERC-20 fungible token standard. It suggests the inclusion of a unique identifier for each ERC-20 transaction to associate transfers with orders/invoices in the ERC-7699 as a standard. By standardizing the reference, ERC-7699 tries to achieve the user experience in TradFi transfers.
Background and Motivation
Ethereum’s improvement processes through standardization are the key to achieving its best version. ERC standardization has opened a lot of new ways to use and develop the DeFi ecosystem.
1- Achieving Greater User Experience: Transfer extensions in the traditional banking system achieve greater user experience. ERC-20 sets the foundations of token transfer, but ERC-7699 improves the processes and introduces UX gains. This transferReference
method can include the user ID of the invoices/purchase orders.
2- Improving Mass Adoption: Ethereum needs more users and ERC-7699 gives the same user interface and experience as TradFi systems. ERC-7699 may improve the mass adoption rate.
Further, ERC-7699 allows Ethereum to provide an arbitrary message when sending ETH, a feature which the ERC-20 standard didn’t have.
Understanding ERC-7699
ERC-7699 establishes the standard for new use cases in payment and everyday usage of Ethereum. By providing a reference for ERC-20 transactions; payments and transfer of the value will be easier.
Understanding ERC-20 Basics
Because this EIP is a further improvement and extension, building upon previous Ethereum protocol upgrades, this ERC proposal requires EIP-20 and EIP-165 for development.
- EIP-20 (ERC-20): This defines the standard interface for fungible tokens on Ethereum, ensuring interoperability between different tokens and simplifying integration with wallets, exchanges, and smart contracts.
- EIP-165 (ERC-165): This standard introduces a method for smart contracts to declare the interfaces they support, making it easier for other contracts to interact with them efficiently.
At its core, ERC-20 includes Transfer
and Approval
events, which trigger and facilitate token transfers. The Transfer
event records token movements, while the Approval
event allows third-party contracts to spend tokens on behalf of a user.
In ERC-7699, we focus on additional identifier changes in the transfer
and transferFrom
methods, enhancing their functionality while maintaining compatibility with the ERC-20 standard.
ERC-7699: Additional Functionalities to ERC-20
ERC-7699 brings just basic additions to ERC-20 in its transfer
and transferFrom
methods.
In ERC-20, the transfer
method is:
function transfer(address _to, uint256 _value) public returns (bool success)
This includes an address parameter as the destination and a value parameter as the token's representative amount of the token to be sent. It also publicly returns whether the function fails or not in a call.
transferFrom
method is:
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success)
This includes an address parameter as the source and another as the destination. It also includes a value parameter as the token’s representative amount of the token to be sent. It also publicly returns whether the function fails or not in a call.
ERC-7699 introduces a new parameter called transferReference
.
In ERC-7699, the transfer
method is:
function transfer(address to, uint256 amount, bytes calldata transferReference) external returns (bool);
This includes the same parameters of destination address and amount but has an additional transferReference
. transferReference
parameter is defined as calldata
, because it can keep some data.
The public
to external
changes make the structure more efficient. The usage of external
keyword serves:
1- The external
keyword is designed to read data from calldata
but the public
keyword is designed to copy the array arguments to memory. This approach improves efficiency in Solidity.
2- Memory allocation is more expensive against reading data from calldata
. In an example of defining some code with public
and external
keywords, gas usage of using the public
keyword almost doubles the gas usage of the external
keyword.
transferFrom
method is like:
function transferFrom(address from, address to, uint256 amount, bytes calldata transferReference) external returns (bool);
This function has the same parameters as its ERC-20 version with an addition of transferReference
. It uses external
keyword for efficiency and to reduce gas cost.
ERC-7699 also includes a small event called TransferReference
. This is not an additional change in ERC-20, but it is a new event in this standard.
event TransferReference(bytes32 indexed loggedReference);
TransferReference
event has only one parameter called loggedReference
. loggedReference
may be the exact copy of transferReference
parameter or can be derived from the transferReference
parameter’s process. All the loggedReference
parameter and the TransferReference
event does is, logging the reference in the form of calldata
. With this, the reference content will be hashed in the event log. Also, it will be publicly readable because of bytes32 type’s non-hashed presence.
Why now?
Achieving greater user experience and mass adoption through new users is important for Ethereum’s sustainability. Additionally, the improvements that bring about better UX need to augur well with regulations across all or most jurisdictions.
Regulations are being implemented across the globe that target cryptocurrencies, blockchains and especially stablecoins. For instance, the European Union has MiCa, whereas the Securities and Exchange Commission (SEC) governs the US regulations. Enabling and understanding the regulations enable major fintech players like card companies, such as Visa and Mastercard, to participate in the space. ERC-7699 introduces pairing of the transaction and the intent, which is a key TradFi characteristic.
Currently, if a user wants to include a payment reference in their transactions, they have to rely on off-chain external systems or custom payment proxy implementations to store and process the information. However, in TradFi systems, payment references are natively included in transfers. Ethereum introduces this functionality, which has been a fundamental need in on-chain transactions, through ERC-7699.
Collaboration, adoption, and community involvement
Protocols and products can adopt ERC-7699 in their project to enhance user experience and push for mass adoption of blockchain and crypto use cases.
1- Wallets: Traditional banking systems attained their best user experience numbers when mobile banking systems and applications matured. Bringing relevant products into users’ easy grasp via everyday devices was the key. Similarly, Ethereum stands to benefit by enhancing mobile development and abstracted adoption. Wallets play a significant role in this manner. Web extension wallets are good, but mobile wallets are easy to use. Mobile wallets with abstracted usage are the work of abstraction improvements. With ERC-7699 integration, they will achieve more users because such moves introduce better UX. Essentially, ERC-7699 brings the equivalent of ETH transfers to ERC-20 token transfers.
2- Protocols: ERC-7699 can do regular things like swapping and staking across DeFi protocols. People can use text extensions to drop messages for swaps. The standard has relevant use cases for treasuries, DAOs, and CEXs that have on-chain activities. Treasuries can send funds with unique reference parameters. CEXs have regular on-chain activities which are costly and burden networks when they shouldn’t. Such CEXs can provide users with a collection account and ask that transfers include unique references.
3- Formal Institutions: Formal institutions like government departments can transfer or hold funds on-chain using ERC-7699 instead of leveraging decentralized protocol treasuries. For instance, a strategic crypto reserve the US uses to hold crypto proceeds of cyber crime can take advantage of text information this standard offers to tag the finances appropriately. Governments that work off-chain with conventional paperwork and simple governing programs but leverage bank treasuries that use blockchains can also apply the innovations of ERC-7699.
4- Projects: Mainstream adoption implies that users turn to crypto and blockchain use cases for everyday challenges. ERC-7699 is an ideal approach for facilitating such evangelism because its key component is the extensions that improve UX. For instance, adopting mutable ERC-20 projects becomes attractive because they ease project management processes. Projects like CZKC already adopted the ERC-7699 standard.
Main Scope
ERC-7699 is an extended (or upgraded) version of ERC-20 with interface specifications that administer changes on ERC-20.
Contracts that want to have the standard equivalence with ERC-20 and extension with ERC-7699 need to implement this interface:
interface IERC7699 {
function transfer(address to, uint256 amount, bytes calldata transferReference) external returns (bool);
function transferFrom(address from, address to, uint256 amount, bytes calldata transferReference) external returns (bool);
event TransferReference(bytes32 indexed loggedReference);
}
The illustration above indicates how transfer and transferFrom methods that we mentioned earlier get additions in this ERC besides ERC-20.
If you look at the code snippet of the ERC-7699 interface and the versions of methods in ERC-20, transfer
and transferFrom
methods have an event addition to emit called transferReference
with a parameter called loggedReference
.
The Transfer
event has to be emitted following the TransferReference
event. The condition here is that the Transfer
event’s log record has to be sought for the client then the TransferReference
event will be emitted. Also, the emitted loggedReference
may be the exact copy of the transferReference
or the derived data from the rich transferReference
. It is important to note that transferReference
and loggedReference
are not expected to be equal all the time.
Importantly, these methods are extensions. Therefore, it is not necessary to fulfill the new identifiers all the time. For instance, transferReference
may be empty. In such a case, the user can but must not emit the TransferReference
event. In such situations, transfers happen under the normal ERC-20 standard.
Also, TransferReference
must not be declared with an anonymous specifier to ensure the event signature is logged and can be used as a filter.
Backward Compatibility
ERC-7699 is fully compatible with the existing ERC-20 token standard. This means that since it is just an extension, new functions that come with this standard can be used alongside the existing transfer
and transferFrom
functions. Existing upgradable ERC-20 tokens can use this standard and can choose to add payment references with this token standard.
interface IERC7699 {
event TransferReference(bytes32 indexed loggedReference);
function transfer(address to, uint256 amount, bytes calldata transferReference) external returns (bool);
function transferFrom(address from, address to, uint256 amount, bytes calldata transferReference) external returns (bool);
}
This code snippet introduces the ERC-7699 token standard’s interface. Tokens that use this token standard could achieve processes, such as minting and transferring through this interface. Additionally, transfer
and transferFrom
functions have transferReference
. Also, the TransferReference
event is defined in the interface for emitting.
contract ERC20TransferReference is ERC20, IERC7699 {
constructor() ERC20("ERC20 Transfer Reference Example", "TXRE") {
_mint(msg.sender, 987654321 * 1e18);
}
function _logReference(bytes calldata transferReference) internal virtual {
if (transferReference.length > 0) {
bytes32 loggedReference;
assembly {
loggedReference := calldataload(transferReference.offset)
}
emit TransferReference(loggedReference);
}
}
function transfer(address to, uint256 amount, bytes calldata transferReference) public virtual returns (bool) {
_logReference(transferReference);
return transfer(to, amount);
}
function transferFrom(address from, address to, uint256 amount, bytes calldata transferReference) public virtual returns (bool) {
_logReference(transferReference);
return transferFrom(from, to, amount);
}
}
This code snippet is where the contract mints ERC-20 tokens through the ERC-7699’s interface. This part has the transfer
and transferFrom
functions for the default ERC-20 token standard. _logReference
function allows us to compare the loggedReference
against the output of the TransferReference
event.
Security
Two issues are important to consider regarding the security of the standard:
- Privacy: Because this ERC includes payment references, the sensitive data could be exposed. Users must be aware of these and watch out not to reveal sensitive information through transparent transactions. Incorporating encryption in the payment reference input may offer complete privacy for this token standard.
- Manipulation: The payment reference index could be manipulated by malicious actors. There is no validation for references and this could lead to risks through manipulation.
Practical Use Cases
- Banking Sector: We have already experienced ecosystems that accept ETFs and CBDCs. Such processes are forerunners to central banks. A central bank that wants to leverage Ethereum for its workflow can do so through ERC-7699 to achieve the traditional user experience it is already giving to its customers through traditional services.
- Payments: Individuals and businesses already use the Ethereum blockchain to process monthly and annual payments. And, CZKC stablecoin has already implemented the ERC-7699 as their token model. Using ERC-7699, users may specify the additional narrative they wish to accompany their transactions. Such text could be user ID, purpose of the transactions, etc.
- Exchanges and crypto gateways: One of the pain points of exchanges is the need to sweep the funds across many of their users' on-chain accounts. Such processes increase costs and impose an unnecessary burden on the network. Providing users its collection account as highlighted in an earlier example and allowing for transfer of funds with a unique reference (per user request) would help trim costs associated with such administrative procedures.
Conclusion
ERC-7699 represents a thoughtful and practical evolution of the ERC-20 standard, addressing a long-standing gap in token transfers by enabling the inclusion of reference data. Allowing users to attach memos or contextual information to transactions enhances transparency, accountability, and usability across the Ethereum ecosystem. Whether for DeFi applications, cross-border payments, or enterprise use cases, ERC-7699 opens up new possibilities for clearer communication and more efficient transaction tracking. As the blockchain space continues to mature, standards like ERC-7699 underscore the importance of incremental yet impactful improvements that cater to the growing needs of developers and users alike. With its potential to streamline workflows and improve interoperability, ERC-7699 is poised to become a valuable tool in the ongoing evolution of decentralized technologies.
We express our sincere gratitude to Radek Svarz who reviewed the text, and Daniel Ayuko who edited the article and wrote the introduction and conclusion segments.
The content provided by 2077 Research is for informational purposes only and does not constitute financial, legal, or tax advice. The views expressed are those of the authors and do not necessarily reflect the opinions of 2077 Research or its affiliates. Readers should conduct their own research and exercise independent judgment when interpreting the information presented.