ERC-7561 Simple NFT (simplified ERC-721) (Simple NFT, Simplified ERC-721)

Draft · NFTs & multi-token · created 2023-10-29

A simplified NFT standard that removes approval-related functions and safeTransferFrom from NFT contracts, leaving only lookups and transfers. Permission management such as approvals is designed to be handled by smart contract wallets.

Why it is needed

The existing NFT standard, ERC-721, was designed on the premise of externally owned account (EOA) wallets, which cannot store code or state. As a result, permission management features such as approve, which lets another address move your NFT on your behalf, and setApprovalForAll, are borne by the NFT contract itself. Under this structure, the NFT contract becomes more complex, and the risks that arise from the contract implementing approval functionality come along with it. Meanwhile, most NFT-related proposals add functionality, but this proposal takes the opposite view: since smart contract wallets can take on more responsibility, NFT contracts should become simpler. It therefore proposes a simpler NFT in which the NFT contract is responsible only for transfers, while permissions such as approvals are managed at the user level.

What to implement

In depth

Design premise: smart contract wallets, not EOAs

ERC-721 defined a standard NFT that can be traded and transferred, but it is fundamentally based on an externally owned account (EOA) wallet design. EOA wallets have no state or code storage, whereas smart contract wallets do. This proposal designs a new NFT asset on the premise of user contract wallets that include account abstraction. Most NFT-related ERCs add functionality, but this proposal takes the opposite stance: more functionality should be handled by smart contract wallets, and NFT contracts should be simpler.

Five removed functions and the shift in permission management

This proposal removes five functions from ERC-721: approve, setApprovalForAll, getApproved, isApprovedForAll, and safeTransferFrom. The NFT contract is kept simple and responsible only for the transferFrom function. Permission management for the four approval-related functions is handled at the user level rather than by the NFT contract, which is explained as giving users greater flexibility and control, increasing user autonomy, and also reducing certain risks that arise when an ERC-721 contract implements these functions.

Why safeTransferFrom was removed

The safeTransferFrom function is also removed. The source text explains that a better way to call someone else's NFT asset is not to access the NFT asset contract directly, but to access the counterparty's own contract. In other words, instead of placing safe-transfer logic that checks whether the recipient is a contract inside the NFT contract, this approach replaces it with interaction through the counterparty's own contract (wallet).

Required interface IERC7561

Compliant contracts MUST implement the IERC7561 interface. It consists of only four elements: the Transfer(address indexed from, address indexed to, uint256 indexed tokenId) event announcing a transfer, balanceOf(address owner) returning the owner's NFT count, ownerOf(uint256 tokenId) returning the owner address of a tokenId, and transferFrom(address from, address to, uint256 tokenId) transferring ownership. Keywords such as MUST are interpreted according to RFC 2119 and RFC 8174.

Behavior of the reference implementation

In the reference implementation, transferFrom uses require to check that from == msg.sender and to != address(0), then calls the internal _update to update the owner record and balances, and re-checks that the owner before the update matches from. In other words, since there is no concept of approval, a transfer only happens when the owner calls it themselves. _update decreases from's balance, increases to's balance, changes _owners[tokenId] to to, and emits the Transfer event. The implementation also has a totalSupply() lookup function, and the ERC-165 interface identifier for this interface is 0xc1b31357.

Compatibility: forward compatible but not backward compatible

This ERC is forward compatible with ERC-721. Since ERC-721 can encompass this ERC in the reverse direction, every ERC-721 NFT can be compatible with this proposal. Conversely, this ERC is not backward compatible with ERC-721. NFTs that implement only this standard do not have ERC-721's approval and safe-transfer functions, which creates incompatibility with existing dapps that expect those functions.

Proposal status

This proposal's status is Draft. It was created on October 29, 2023, and lists ERC-721 as a requirement. Since it is still in draft stage, the specification content may change going forward.

Things to watch out for

Original ERC · ← ERCs