Introduction
Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.
I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.
I also build and publish a variety of tools, libraries, and open-source projects.
This article examines ERC-4950, which proposes delegating operational permissions for a contract account through ERC-721 NFTs.
This explanation translates, summarizes, and expands on the following specification.
For other EIPs, see https://cardene.dev/proposals.
Overview
ERC-4950 proposes an interface for delegating smart contract wallet permissions through a pair of ERC-721 tokens.
This enables ownership and usage rights to be transferred through NFTs. For example, a purchaser could obtain access to a wallet by acquiring an NFT.
Motivation
ERC-4950 offers a simple mechanism for sharing and delegating wallet access using NFTs. The following use cases illustrate the proposal.
-
Establishing an enduring relationship between an artist and an NFT purchaser.
Artist T creates work P and issues a pair of associated NFTs, A and B. T retains A and transfers B to the purchaser. Because they are entangled tokens, the relationship between the movements of the two tokens can be observed, providing an on-chain basis for provenance and artist attestations.
-
Maintaining an enduring connection between a work and its creator.
User U issues an artwork as entangled token A and sells it while keeping the corresponding B in their wallet. The connection to the creator can thereby be maintained as ownership changes.
Applications and Expected Use Cases
- NFT authorship and artistic provenance: Token relationships can make the claimed creator of a work visible.
- Royalty distribution: The artist's entangled token could be used as the basis for automated royalty distribution.
- Authenticity: Restricting legitimate issuance to the artist could facilitate a limited edition, such as 1,000 copies.
- Usowner model (user and partial owner): A usage arrangement in which an NFT user also holds a partial ownership interest.
- Redefining ownership: An arrangement in which acquiring an NFT conveys defined ownership rights without a physical handover.
- Identity association: An entangled token could link a person to credentials or qualifications.
- Value Reservers: Tokens could be used to represent or preserve a form of value.
Specification
The entangled tokens defined by ERC-4950 are ERC-721 tokens with the following properties and behavior.
Exactly Two Tokens Are Minted
The proposed contract mints only two tokens, with token IDs 0 and 1, at deployment. The number remains fixed.
The two NFTs form a closely associated pair that serves as the basis for contract access control and operations.
ERC-721 with Wallet Functionality
The entangled token contract functions both as an NFT contract and as a contract wallet. It can hold assets such as ERC-20 tokens and allows the holders of the entangled tokens to operate those assets.
Specifically, the owner of token ID 0 or token ID 1 is authorized to operate the wallet.
tokenTransfer
The contract defines a function for transferring ERC-20 tokens held by the contract.
function tokenTransfer(IERC20 token, address recipient, uint256 amount) public onlyOwners;Parameters
- IERC20 token: the address of the ERC-20 token contract whose tokens are to be transferred.
- address recipient: the destination address.
- uint256 amount: the quantity of tokens to transfer.
Access Control
The onlyOwners modifier restricts this function to owners of token ID 0 or token ID 1. Other users cannot move the contract's assets using this function.
Additional Considerations
Why ERC-721 Was Chosen
ERC-721 is widely supported by major NFT marketplaces such as OpenSea and Blur. Conforming to it provides several benefits for entangled NFTs.
- Existing marketplace listings: Using ERC-721 instead of a proprietary token interface allows the NFTs to be listed on existing marketplaces.
- Automatic transfer of wallet permissions: Receiving an NFT transfers the corresponding wallet permissions, allowing those permissions to change dynamically through token transfers.
Why ERC-1155 Was Not Selected
ERC-1155 could also be used and supports multiple fungible and non-fungible token types. ERC-721 was considered more appropriate because it clearly represents each entangled token as a unique member of a pair and offers immediate marketplace compatibility.
Bridging Wallet Functionality and Marketplaces
The central idea of ERC-4950 is that purchasing an NFT simultaneously grants wallet usage permissions. Rather than representing ownership of an image alone, the NFT acts as an access key to contract functions such as ERC-20 transfers or, where supported by the implementation, management of other NFTs.
Using ERC-721 for entangled NFTs allows users to access advanced smart wallet functionality through familiar NFT transactions, potentially improving Web3 user experience.
Reference Implementation
The constructor issues exactly two tokens and sets the minted flag to true.
bool private _minted;
constructor(string memory name, string memory symbol, string memory base_uri) ERC721(name, symbol) {
baseUri = base_uri;
_mint(msg.sender,0);
_mint(msg.sender,1);
_minted = true;
}
function _mint(address to, uint256 tokenId) internal virtual override {
require(!_minted, "ERC4950: already minted");
super._mint(to, tokenId);
}The following functionality allows NFT owners to operate ERC-20 tokens held by the contract.
modifier onlyOwners() {
require(balanceOf(msg.sender) > 0, "Caller does not own any of the tokens");
_;
}
function tokenTransfer(IERC20 token, address recipient, uint256 amount) public onlyOwners {
token.transfer(recipient, amount);
}Citation
Víctor Muñoz (@victormunoz), Josep Lluis de la Rosa (@peplluis7), Easy Innova (@easyinnova), "ERC-4950: Entangled Tokens [DRAFT]," Ethereum Improvement Proposals, no. 4950, March 2022. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-4950.
Conclusion
ERC-4950 proposes delegating contract-account permissions through paired ERC-721 NFTs.
Further reading and author links:




