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-1633, which proposes a mechanism for shared ownership of ERC-721 NFTs.

This explanation translates, summarizes, and expands on the following specification.

For other EIPs, see https://cardene.dev/proposals.

Overview

ERC-1633 extends ERC-20 with a Re-Fungible Token (RFT) that represents shared ownership of an ERC-721 NFT. It aims to preserve ERC-20 compatibility while using ERC-165 interface detection to identify the RFT relationship at the contract level.

For ERC-165, see the following article.

ERC-165 Explained: Checking Whether a Contract Supports an Interface

Motivation

Shared ownership is used across many industries, including digital and real-world assets represented by ERC-721 NFTs.

For example, ARTBLX Inc. developed a protocol for jointly owning physical, digital, and conceptual artworks. The resulting ERC-20 tokens represent interests in the associated NFT and may support price discovery, liquidity between owners, and financial products such as loans and stablecoins.

An RFT interface helps other DApps identify these tokens. A wallet could display the underlying NFT metadata, and an NFT marketplace could direct users to an exchange trading the RFT. Wherever ERC-20 tokens are used, it can be useful to determine whether a token represents shared NFT ownership.

Specification

Capabilities Required by Other DApps

The RFT standard is designed to let DApps:

  • Distinguish an RFT representing shared NFT ownership from an ordinary ERC-20 token.
  • Determine whether a specific NFT is owned by an RFT contract.

Checking from an RFT

js
pragma solidity ^0.4.20;

/// @dev Note: the ERC-165 identifier for this interface is 0x5755c3f2.
interface RFT /* is ERC20, ERC165 */ {

  function parentToken() external view returns(address _parentToken);
  function parentTokenId() external view returns(uint256 _parentTokenId);

}

RFT contracts implement two read functions.

  • parentToken(): returns the address of the underlying NFT contract.
  • parentTokenId(): returns its uint256 token ID.

These identify the NFT represented by an RFT. Applications can additionally check ERC-721 support and whether the RFT contract owns the NFT.

On-chain Verification Example

ConfirmRFT.sol
pragma solidity ^0.4.20;

import './RFT.sol';
import './ERC721.sol';

contract ConfirmRFT {

  function confirmRFT(address _RFT) external view returns(bool) {
    address _NFT = RFT(_RFT).parentToken(); // returns address of NFT contract
    uint256 _tokenId = RFT(_RFT).parentTokenId(); // returns id of ID of NFT

    return
      NFT(_NFT).supportsInterface(0x80ac58cd) && // confirm it is ERC-721
      NFT(_NFT).ownerOf(_tokenId) == _RFT; // confirm the owner of the NFT is the RFT contract address
  }

}

Off-chain Verification Example (JavaScript + web3.js)

javascript
async function confirmRFT(web3) {

  const ERC721ABI = [...] // abi for ERC721
  const RFTABI = [...] // abi for RFT
  const RFTAddress = '0x0123456789abcdef0123456789abcdef' // address for the deployed RFT

  const RFTContract = new web3.eth.Contract(RFTABI, RFTAddress) // deployed RFT contract instance
  const ERC721Address = await RFTcontract.methods.parentToken().call() // returns address of NFT contract
  const ERC721TokenId = await RFTcontract.methods.parentTokenId().call() // returns id of ID of NFT

  const ERC721Contract = new web3.eth.Contract(ERC721ABI, ERC721Address) // deployed ERC721 (as reported by RFT)
  const isERC721 = await ERC721Contract.methods.supportsInterface('0x80ac58cd').call() // confirm it is ERC-721
  const ownerOfAddress = await ERC721Contract.methods.ownerOf(ERC721TokenId).call() // get the owner of the NFT

  return ERC721Response.toLowerCase() === RFTAddress.toLowerCase() // confirm the owner of the NFT is the RFT contract
}

The examples are reproduced as provided in the original article; the off-chain snippet contains inconsistent variable names and should not be treated as tested executable code.

Checking from an NFT

To determine whether an NFT owner is an RFT, use ERC-165 interface detection.

  • supportsInterface must return true for 0x01ffc9a7 (ERC-165) and 0x5755c3f2 (RFT).
  • The RFT interface ID is the XOR of the selectors for parentToken() and parentTokenId().
js
function supportsInterface(bytes4 interfaceID) external view returns (bool);

On-chain Verification Example

js
pragma solidity ^0.4.20;

import './RFT.sol';
import './ERC721.sol';

contract ConfirmRFT {

  function confirmRFT(address _NFT, uint256 _tokenId) external view returns(bool) {
    address _RFT = ERC721(_NFT).ownerOf(_tokenId); // get the owner of the NFT

    return
      RFT(_RFT).supportsInterface(0x01ffc9a7) && // confirm it supports ERC-165
      RFT(_RFT).supportsInterface(0x5755c3f2) // confirm it is RFT
  }

}

Off-chain Verification Example (JavaScript + web3.js)

javascript
async function confirmRFT(web3) {

  const ERC721ABI = [...] // abi for ERC721
  const RFTABI = [...] // abi for RFT
  const ERC721Address = '0x0123456789abcdef0123456789abcdef' // address for the deployed NFT
  const ERC721TokenId = '7' // token Id of the NFT

  const ERC721Contract = new web3.eth.Contract(ERC721ABI, ERC721Address) // deployed ERC721
  const RFTAddress = await ERC721Contract.methods.ownerOf(ERC721TokenId).call() // owner address of the NFT


  const RFTContract = new web3.eth.Contract(RFTABI, RFTAddress) // deployed RFT contract instance
  const isERC165 = await RFTContract.methods.supportsInterface('0x01ffc9a7').call() // confirm it is ERC-165
  return isERC165 && await RFTContract.methods.supportsInterface('0x5755c3f2').call() // confirm it is RFT

}

Additional Considerations

The design aims to maximize flexibility for a broad range of use cases. It maintains backward compatibility with ERC-20 and supports interaction with existing and future ERC-721 contracts.

Projects using RFTs can design their own minting, burning, and governance mechanisms to meet their requirements.

Backward Compatibility

The RFT standard is compatible with ERC-20.

Citation

Billy Rennekamp (@okwme), Dan Long dan@artblx.com, Kiryl Yermakou kiryl@artblx.com, Nate van der Ende nate@artblx.com, "ERC-1633: Re-Fungible Token Standard (RFT) [DRAFT]," Ethereum Improvement Proposals, no. 1633, November 2018. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-1633.

Conclusion

ERC-1633 provides an ERC-20-compatible interface for identifying tokens representing shared ownership of an ERC-721 NFT.

Further reading and author links:

https://chaldene.net/