ERC-4907: an NFT user can expire while the owner stays

Explainer7 min read

Separate ERC-4907 NFT ownership, temporary users and expiry. Follow the reference code’s timestamp boundary, early changes and application limits.

Fictional ERC-4907 illustration: Brokzi compares an NFT owner record with a separate timed user pass. The user role expires while ownership stays with the same address. A conceptual interface example, not a live NFT, rental contract or access guarantee.
AI-assisted editorial illustration · Brokzi
On this page

An NFT can have an owner and a different, temporary user. When the user's time runs out, the token does not have to move back anywhere: ownership may never have moved in the first place.

ERC-4907 adds that distinction to ERC-721. It gives applications a common way to record a user address and an expiry timestamp. For someone reading a rental listing or an NFT utility screen, the useful question is which record the screen is showing: ownership, a current user role, or an old assignment.

This explainer follows the published standard and its included reference code. It does not assess a live collection, rental platform, legal agreement or promised benefit.

ERC-4907 separates owner, user and expiry

The ERC-4907 specification extends ERC-721 with three functions and an event. The original ownership record remains a separate question.

Read or actionWhat it describes
ownerOf(tokenId)The ERC-721 owner of that token
setUser(tokenId, user, expires)An assignment or change of the user address and expiry
userOf(tokenId)The current user address, or the zero address when there is no effective user
userExpires(tokenId)The expiry value associated with the assignment
UpdateUserAn event recording a change to the user or expiry

The expires input is a Unix timestamp, expressed in seconds, rather than a duration such as “seven days.” The setter takes a uint64 expiry; the expiry getter returns a uint256.

The user role alone does not confer the owner's ability to transfer the token or assign another user. A user address might separately hold another permission, but that must be established independently. Brokzi's ERC-721 and ERC-1155 explainer covers the underlying ownership and balance records.

“Use” also needs an application definition. A game might consult the user record before allowing a character to equip an item. Another application might never consult it. The interface does not specify every game's behavior or make every marketplace adopt the role.

A timed user pass can end without an ownership transfer

Consider a fictional ERC-721 token, ID 41. Address O owns it. An authorized assignment names U as its user, with expiry T. Neither O nor U is a real address, and T is a symbolic Unix timestamp.

For this example, follow the reference implementation printed in the current ERC-4907 document. Assume no transfers, burns, upgrades, reassignment or other state changes during the three observations below.

Observed block timestampownerOf(41)userOf(41)userExpires(41)
T − 1 secondOUT
Exactly TOUT
T + 1 secondOZero addressT

The middle row is deliberate. That reference code returns the stored user while expires >= block.timestamp. It therefore includes equality. The interface's descriptive wording says the user can use the NFT “before expires”; the exact comparison in this reference is inclusive. Do not assume every deployed implementation handles the boundary identically without inspecting its code.

One second after T, the reference's user query returns the zero address. The owner is still O. Nothing in this example requires a transfer back from U, because U never became the owner.

The expiry getter can still return T after the effective user has expired. A nonzero expiry number is consequently not sufficient evidence of a current user. Read the user result, expiry, implementation and relevant block time together.

These rows are a local reasoning example, not captured contract responses. No NFT was minted, assigned, rented, transferred or queried on a network.

Automatic expiry does not mean a background transaction

In that reference implementation, userOf checks the stored expiry against the current block timestamp when called. It does not need a separate cleanup transaction merely to return the zero address after expiry.

That also explains why the stored expiry can remain unchanged. Time passing changes the result of the check; it does not run a scheduled function that deletes the stored assignment.

UpdateUser is emitted when an assignment or expiry is changed. The reference's time comparison does not emit a fresh event just because the deadline has passed. An application relying only on the last assignment event can therefore display stale information if it does not account for expiry.

An application's own access decision remains separate. A cached screen, an off-chain service and an on-chain function may use different evidence. ERC-4907 supplies a shared record; it does not demonstrate that a particular app checked that record correctly.

Who can change the user?

The standard describes the separation of owner and user. Its included reference implementation restricts setUser through the inherited _isApprovedOrOwner check: the caller must be the owner or an approved party under that implementation.

Being the named user alone does not satisfy that check. Conversely, an address with separate approval may have authority even if it is not the user. Treat ownership, approval and the user role as distinct records.

The reference setter can replace the user and expiry before the old expiry is reached. It does not enforce an unchangeable rental term. It also accepts the zero address to represent no user. A valid authorized assignment to the zero address can remove the effective user before the previous deadline.

Calling a value “expires” does not promise uninterrupted access until that time. A rental product would need to explain which implementation, permissions and any additional restrictions support such a promise. This article does not establish those restrictions for any platform.

Transfers need an implementation-specific check

The supplied reference code has an ERC-721 transfer hook. When from and to differ and a nonzero user is stored, it deletes that user record and emits UpdateUser with the zero address and an expiry of zero.

That is a concrete reference behavior, not evidence about every NFT using the label “rentable.” The condition matters: the hook is not simply an unconditional reset on every possible call. Check the exact contract before assuming what happens to a user assignment when ownership changes.

The printed example imports OpenZeppelin ERC-721 and uses its older _beforeTokenTransfer hook and _isApprovedOrOwner helper. It is a reference for the behavior discussed here, not a claim that those extension points exist unchanged in every library version or a recommendation to paste it into a current project.

A support badge is not a rental or access guarantee

ERC-4907 requires ERC-165 support reporting for interface ID 0xad092b5c. A positive declaration helps software discover the interface. As our ERC-165 explainer explains, it does not prove the implementation's behavior, permissions or safety.

Nor does this interface define a rent price, deposit, payment transfer, refund process or legal rental agreement. Those would belong to other code, product rules or agreements. No particular jurisdiction, licence or enforceable off-chain right is assessed here.

ERC-2981 royalty information answers another question: a royalty recipient and amount at a supplied sale price. A royalty setting does not establish an ERC-4907 user assignment, and a user assignment does not establish a royalty payment.

Read the record behind the listing

Before interpreting a “rented” or “active user” label, establish:

  1. The asset: network, full contract address and token ID. A picture or collection name is not enough.
  2. The ownership record: which address owns the token, separately from the address allowed to use it?
  3. The user evidence: user result, expiry timestamp, relevant block time and the actual implementation's boundary comparison.
  4. The change authority: who can replace the user, clear the assignment or change the implementation?
  5. The promised utility: which application consults the record, and what evidence establishes that application's access rule?

ERC-4907 makes temporary use easier to describe without confusing it with ownership. Keep those records separate: a user role can expire while the owner stays the same, and an expiry field alone cannot prove the full promise of a rental product.

Sources

The complete current ERC-4907 document was read on November 4, 2026, including the interface, rationale, test example, reference implementation and security section. Its creation date is March 11, 2022; this explainer does not describe a new launch.

The equality boundary, stored-expiry result, assignment permission check and conditional transfer reset above describe the code printed in that document. They are not observations of a deployed collection or a universal implementation guarantee. The document's broad security language is not treated as a security certification.

O, U, token ID 41 and T are invented. The timestamp comparisons were checked locally. No RPC request, contract deployment or call, wallet connection, signature, approval, rental payment or token transfer was performed. The illustration is fictional.

See something wrong? Brokzi logs material changes. Prepare a correction note.

About the byline

Brokzi Editorial

The accountable byline for Brokzi’s explainers, definitions, news notes, and corrections.

Editorial responsibility →