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-5501, a proposed mechanism for maintaining NFT rental rights until their expiration.

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

More EIP explainers:

Overview

ERC-5501 proposes adding a new user role to ERC-721. The user can use the NFT but does not gain the right to transfer it or assign its user role to someone else merely by being the user.

The role includes an expiration time (expires) and a flag indicating whether the NFT is rented (isBorrowed). The owner can delegate usage rights without transferring ownership, for example to a separate hot wallet or to a renter.

If isBorrowed is true, the owner cannot unilaterally change the user before expiration. Early termination requires mutual agreement where the relevant extension is implemented. The design allows owner and user roles to coexist.

Motivation

NFT applications extend beyond artwork to game items, metaverse land, event tickets, music, video, domains, and certificates representing physical goods. ERC-721 itself defines ownership and transfer functionality rather than a separate standardized usage role.

Separating ownership from usage enables several practical arrangements.

Reasons to assign a user

Delegation

An owner can assign usage rights to a separate hot wallet used for everyday activities while keeping ownership in a more securely managed wallet. In an ordinary delegation, the owner can change the user at any time.

Renting

When renting an NFT, the owner should not be able to revoke the renter's usage rights arbitrarily before the agreed deadline. The expiration time and isBorrowed flag provide this protection.

Example use cases

  • Delegation for security — assign usage rights to a hot wallet without moving ownership.
  • Game-item rentals — lend an item to a player who wants to try it temporarily.
  • Guild management — hold an NFT in a multisig and delegate usage rights to a hot wallet shared by members.
  • Events — distinguish the owner's organizer permissions from the user's attendee permissions.
  • Social features — give the owner read-write access to a room while allowing the user read-only access.

Differences from earlier standards

The proposal builds on concepts introduced by ERC-4400 and ERC-4907.

For an introduction to ERC-4400, see:

[ERC4400] Adding a Consumer Role to NFTs

For an introduction to ERC-4907, see:

[ERC4907] Assigning Time-Limited NFT Usage Rights

  • The NFT remains in the owner's wallet during rental. Ownership is not transferred merely to rent the NFT.
  • The NFT can be sold during rental. The owner can list it on a marketplace while the protected usage rights remain assigned to the renter.
  • Owner benefits can remain available. Ownership-based airdrops and free mints can still be available according to the application's eligibility rules.
  • Staking is not required by the rental interface. The isBorrowed flag protects usage rights without requiring the owner to stake the NFT.

These properties can simplify the design of rental marketplaces and help protect both parties.

Specification

Interface

ERC-5501 defines IERC5501, an optional extension to ERC-721 that adds a user role. Contracts claiming ERC-5501 compliance must implement this interface.

IERC5501.sol
/**
 * @title IERC5501: Rental & Delegation NFT - EIP-721 Extension
 * @notice the EIP-165 identifier for this interface is 0xf808ec37.
 */
interface IERC5501 /* is IERC721 */ {
    /**
     * @dev Emitted when the user of an NFT is modified.
     */
    event UpdateUser(uint256 indexed _tokenId, address indexed _user, uint64 _expires, bool _isBorrowed);

    /**
     * @notice Set the user info of an NFT.
     * @dev User address cannot be zero address.
     * Only approved operator or NFT owner can set the user.
     * If NFT is borrowed, the user info cannot be changed until user status expires.
     * @param _tokenId uint256 ID of the token to set user info for
     * @param _user address of the new user
     * @param _expires Unix timestamp when user info expires
     * @param _isBorrowed flag whether or not the NFT is borrowed
     */
    function setUser(uint256 _tokenId, address _user, uint64 _expires, bool _isBorrowed) external;

    /**
     * @notice Get the user address of an NFT.
     * @dev Reverts if user is not set.
     * @param _tokenId uint256 ID of the token to get the user address for
     * @return address user address for this NFT
     */
    function userOf(uint256 _tokenId) external view returns (address);

    /**
     * @notice Get the user expires of an NFT.
     * @param _tokenId uint256 ID of the token to get the user expires for
     * @return uint64 user expires for this NFT
     */
    function userExpires(uint256 _tokenId) external view returns (uint64);

    /**
     * @notice Get the user isBorrowed of an NFT.
     * @param _tokenId uint256 ID of the token to get the user isBorrowed for
     * @return bool user isBorrowed for this NFT
     */
    function userIsBorrowed(uint256 _tokenId) external view returns (bool);
}

Functions and events

  • setUser(tokenId, user, expires, isBorrowed)
    • Sets the NFT's usage information. The user must not be the zero address. Only the owner or an authorized operator can call it. If an active protected rental exists, changing the user must fail.
  • userOf(tokenId)
    • Returns the current user's address. The original article describes a revert when no valid user exists or the usage period has expired; implementations must follow the applicable specification.
  • userExpires(tokenId)
    • Returns the expiration of usage rights as a Unix timestamp.
  • userIsBorrowed(tokenId)
    • Returns a Boolean indicating the token's rental status.
  • UpdateUser
    • Emitted when the user is updated. It includes tokenId, user, expires, and isBorrowed.

Required implementation behavior

  • Treat the user separately from the owner.
  • Do not grant transfer or approval authority solely because an address is the user.
  • Reject changes through setUser while a protected rental is active and unexpired.
  • Reset user information when the token is transferred without an active protected rental; preserve protected rental information when applicable.

IERC5501Balance

This extension adds a function for retrieving the number of NFTs assigned to an address as their user.

IERC5501Balance.sol
/**
 * @title IERC5501Balance
 * Extension for ERC5501 which adds userBalanceOf to query how many tokens address is userOf.
 * @notice the EIP-165 identifier for this interface is 0x0cb22289.
 */
interface IERC5501Balance /* is IERC5501 */{
    /**
     * @notice Count of all NFTs assigned to a user.
     * @dev Reverts if user is zero address.
     * @param _user an address for which to query the balance
     * @return uint256 the number of NFTs the user has
     */
    function userBalanceOf(address _user) external view returns (uint256);
}
  • userBalanceOf(user)
    • Returns the number of NFTs for which the specified address is the user. Passing the zero address causes a revert.

IERC5501Enumerable

This extension allows applications to enumerate the NFTs assigned to a user, particularly for UI display and discovery.

IERC5501Enumerable.sol
/**
 * @title IERC5501Enumerable
 * This extension for ERC5501 adds the option to iterate over user tokens.
 * @notice the EIP-165 identifier for this interface is 0x1d350ef8.
 */
interface IERC5501Enumerable /* is IERC5501Balance, IERC5501 */ {
    /**
     * @notice Enumerate NFTs assigned to a user.
     * @dev Reverts if user is zero address or _index >= userBalanceOf(_owner).
     * @param _user an address to iterate over its tokens
     * @return uint256 the token ID for given index assigned to _user
     */
    function tokenOfUserByIndex(address _user, uint256 _index) external view returns (uint256);
}
  • tokenOfUserByIndex(user, index)
    • Returns the token ID at the specified index among NFTs assigned to the user. Invalid addresses or nonexistent indices cause a revert.

IERC5501Terminable

This extension allows the lender and borrower to agree to terminate a rental before its expiration.

IERC5501Terminable.sol
/**
 * @title IERC5501Terminable
 * This extension for ERC5501 adds the option to terminate borrowing if both parties agree.
 * @notice the EIP-165 identifier for this interface is 0x6a26417e.
 */
interface IERC5501Terminable /* is IERC5501 */ {
    /**
     * @dev Emitted when one party from borrowing contract approves termination of agreement.
     * @param _isLender true for lender, false for borrower
     */
    event AgreeToTerminateBorrow(uint256 indexed _tokenId, address indexed _party, bool _isLender);

    /**
     * @dev Emitted when agreements to terminate borrow are reset.
     */
    event ResetTerminationAgreements(uint256 indexed _tokenId);

    /**
     * @dev Emitted when borrow of token ID is terminated.
     */
    event TerminateBorrow(uint256 indexed _tokenId, address indexed _lender, address indexed _borrower, address _caller);

    /**
     * @notice Agree to terminate a borrowing.
     * @dev Lender must be ownerOf token ID. Borrower must be userOf token ID.
     * If lender and borrower are the same, set termination agreement for both at once.
     * @param _tokenId uint256 ID of the token to set termination info for
     */
    function setBorrowTermination(uint256 _tokenId) external;

    /**
     * @notice Get if it is possible to terminate a borrow agreement.
     * @param _tokenId uint256 ID of the token to get termination info for
     * @return bool, bool first indicates lender agrees, second indicates borrower agrees
     */
    function getBorrowTermination(uint256 _tokenId) external view returns (bool, bool);

    /**
     * @notice Terminate a borrow if both parties agreed.
     * @dev Both parties must have agreed, otherwise revert.
     * @param _tokenId uint256 ID of the token to terminate borrow of
     */
    function terminateBorrow(uint256 _tokenId) external;
}

Events

  • AgreeToTerminateBorrow(tokenId, party, isLender)
    • Emitted when the lender or borrower agrees to terminate the rental.
  • ResetTerminationAgreements(tokenId)
    • Emitted when termination agreements are reset, for example on a transfer or calls to setUser or terminateBorrow.
  • TerminateBorrow(tokenId, lender, borrower, caller)
    • Emitted when the rental is terminated following agreement by both parties.

Functions

  • setBorrowTermination(tokenId)
    • Records the lender's or borrower's agreement according to the caller's role. If both roles belong to the same address, both agreements are recorded.
  • getBorrowTermination(tokenId)
    • Returns whether each party has agreed.
  • terminateBorrow(tokenId)
    • Ends the protected rental by setting isBorrowed to false. Anyone can call the function, but it must revert unless both parties have agreed.

Implementation considerations

The specification defines conditions and restrictions for functions and events. Pay particular attention to authorization and state transitions in setUser and terminateBorrow.

Balance, Enumerable, and Terminable are optional extensions. A project can implement only the extensions it needs.

ERC-165 interface detection through supportsInterface must report the applicable interface identifiers correctly, including the illustrated identifier 0xf808ec37.

For an introduction to ERC-165, see:

[ERC165] Checking Whether a Contract Supports an Interface

Additional explanation

Building on ERC-4400 and ERC-4907

ERC-5501 builds on earlier proposals that separate NFT ownership from usage rights. It is designed to support lending without requiring staking or overcollateralization as part of the interface. Owners retain NFTs in their wallets while delegating or renting usage rights.

Minimal interface

The core interface limits the number of required functions to reduce the implementation burden and allow applications to select appropriate extensions.

Modular structure

Optional extensions provide additional capabilities independently. Balance counts NFTs assigned to users, Enumerable enumerates them, and Terminable supports early termination by mutual agreement.

The user role

The name user follows the terminology of ERC-4907, making the role familiar to developers using that standard.

Preserving owner benefits

NFT collections may offer ownership-based benefits such as airdrops and free mints. Escrow-based rental arrangements can prevent the original owner from qualifying because ownership is temporarily held by a contract.

Keeping the NFT in the owner's wallet can preserve eligibility for ownership-based benefits and allow applications to distinguish owner and user experiences.

Why Balance and Enumerable are optional

User rights expire over time. Maintaining accurate on-chain counts and lists of active users can therefore be difficult and costly. Implementations must account for expired usage rights rather than blindly returning stale counts or lists.

Terminable extension

An owner may accidentally assign rental rights for a very long period. Protected usage rights cannot simply be reset before expiration, potentially leaving the NFT's usage locked for that period.

The Terminable extension allows the lender and borrower to end the rental by mutual agreement, balancing protection with flexibility.

Compatibility

ERC-5501 is designed as an optional extension to ERC-721, retaining the existing ownership interface while adding rental functionality.

Its user role and expiration concepts resemble ERC-4907. Applications supporting that standard may find the transition easier, although differences in interfaces and behavior still require explicit integration checks.

Security

The coexistence of owner and user roles creates additional capabilities and risks.

Preventing double use

Applications must define which operations belong to each role and avoid conflicts. For example, an owner may list an NFT for sale while its renter continues to use it in an application.

Gas considerations

Balance-related functions such as userBalanceOf must account for expired rights. Checking expiration in real time can be expensive, so developers need to consider gas costs when designing enumeration and accounting.

Marketplace display

Marketplaces should clearly display whether an NFT is rented and when protected usage rights expire. Buyers should not assume they can immediately use an NFT whose rental rights remain active.

Citation

Jan Smrža (@smrza), David Rábel (@rabeles11), Tomáš Janča tomas.janca@jtbstorage.eu, Jan Bureš (@JohnyX89), DOBBYLABS (@DOBBYLABS), "ERC-5501: Rental & Delegation NFT - EIP-721 Extension [DRAFT]," Ethereum Improvement Proposals, no. 5501, August 2022. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-5501.

Conclusion

ERC-5501 proposes a mechanism that protects NFT rental rights until expiration or, where supported, mutually agreed early termination.

If you have questions, feel free to contact me on Twitter.

Twitter @cardene777

I also publish material on the following platforms.

https://chaldene.net/