ERC-5187 EIP-1155 Rental Usage Rights Extension (Extend EIP-1155 with rentable usage rights)

Stagnant · NFTs & multi-token · created 2022-04-17

Adds a rental function to EIP-1155 tokens, separating ownership from usage rights. The owner can lend usage rights to multiple users for a fixed term, and the smart contract automatically reclaims them upon expiration.

Why it is needed

EIP-721 and EIP-1155 have focused on proving ownership of unique assets. However, as NFTs increasingly see actual use, such as game items or media assets, demand has grown for borrowing them for a limited period without owning them. Previously, such rentals had to rely on over-collateralization, centralized custody, or pure trust: the renter would post collateral worth the NFT's value, a third party would hold the asset in escrow, or the parties would simply trust each other, and returning the asset at expiration had to be handled manually. This made it difficult for a decentralized NFT rental market to take hold.

What to implement

In depth

Separation of ownership and usage rights

propertyRightOf(id) returns the address of the token's property right holder (owner), which is distinct from the renter who received usage rights via safeRent. The owner transfers only usage rights through safeRent while retaining ownership, and can still transfer the NFT itself to someone else even during the rental period.

Multiple rentals via safeRent

safeRent(address from,address to,uint256 id,uint256 amount,uint256 expire) lends the usage rights of token id from from to to, in the given amount, up until the expire time, under from's approval. If a token has multiple units, the owner can simultaneously lend to several users for different terms.

Checking expiration and reclaiming

expireAt(id,user) returns the expiration time of a particular user's rental. Once a rental expires, the owner can call takeBack(user,tokenId) to reclaim the usage rights, which emits a TakeBack event.

Resubletting usage rights via sublet

Calling sublet(address to,uint256 id) lets the user currently holding usage rights transfer them to another address to without the owner's consent. This call emits a Sublet event. If a user sublets their usage rights back to the owner, this has the effect of an early return before the rental period ends.

Extending the term via renew

renew(address user,uint256 id,uint256 expire) changes the expiration time of user's rental of token id to the new expire value. A successful call emits a Renew event. According to the original Rationale, a user may ask the owner to perform this renewal on their behalf.

ERC-165 identifier and inheritance

This interface, IRental, has the ERC-165 identifier 0x6938e358 and is defined to inherit from IERC165 and IERC1155.

Backward compatibility with EIP-1155

Since this standard is an extension of EIP-1155, it is fully backward compatible with EIP-1155.

Proposal status

This proposal is currently in Stagnant status, and its Security Considerations section is written only as "Needs discussion," meaning security review has not yet been completed. In other words, this specification has changed or stalled and may be revised in the future.

Original ERC · ← ERCs