EIPs Explained

ERC-5560 · Stagnant · ERC · 2022-08-30

ERC-5560: Redeemable NFTs

Proposed a minimal ERC-721 extension with `isRedeemable` and `redeem` so an NFT can signal, on-chain, whether it has already been exchanged for the physical object it represents.

What problem does it solve?

Artists, galleries, auction houses and brands increasingly sell NFTs that come with a physical item: a print, a garment, an artwork. Buyers and marketplaces need to know whether that claim has already been used. Without a standard, each issuer tracks redemption off-chain or in a custom way, and a buyer on the secondary market cannot easily check whether the physical object is still claimable.

How it works

The extension adds two functions and one event to ERC-721:

Item Purpose
isRedeemable(tokenId) true until the token is redeemed, then false; anyone can call it
redeem(tokenId) Marks the token as redeemed; the issuer decides who may call it
Redeem(from, tokenId) Emitted on redemption so indexers and marketplaces can track status

Tokens start redeemable. The spec recommends restricting redeem to the token's owner. supportsInterface must return true for 0x2f8ca953.

The standard only records the on-chain flag. Shipping, identity checks and the link between the token and a specific physical item are left to the issuer.

Sample code

A compact implementation using OpenZeppelin ERC-721 (v5):

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";

contract RedeemablePrint is ERC721 {
    mapping(uint256 => bool) private _redeemed;
    event Redeem(address indexed from, uint256 indexed tokenId);

    constructor() ERC721("Print", "PRNT") {}

    function isRedeemable(uint256 tokenId) public view returns (bool) {
        _requireOwned(tokenId);
        return !_redeemed[tokenId];
    }

    function redeem(uint256 tokenId) external {
        require(ownerOf(tokenId) == msg.sender, "not owner");
        require(!_redeemed[tokenId], "already redeemed");
        _redeemed[tokenId] = true;
        emit Redeem(msg.sender, tokenId);
        // off-chain: issuer watches Redeem events and ships the item
    }

    function supportsInterface(bytes4 id) public view override returns (bool) {
        return id == 0x2f8ca953 || super.supportsInterface(id);
    }
}

Things to know

  • Status: Stagnant. Its security considerations were left as "Needs discussion".
  • A redeemed NFT stays transferable unless the issuer adds rules. Marketplaces should show isRedeemable so buyers know whether the physical claim is spent.
  • The on-chain flag proves nothing about delivery. Trust in the issuer to honor redemptions remains.
  • The spec's reference code targets older OpenZeppelin versions (_exists); adapt it to the version you use.

#nft #erc-721 #physical #redemption #phygital

Details

Authors
Olivier Fernandez (@fernandezOli), Frédéric Le Coidic (@FredLC29), Julien Béranger (@julienbrg)
Status
Stagnant
Type
Standards Track / ERC
Created
2022-08-30
Requires

Machine-readable: Markdown · JSON