NFT

ERC-4907 Contract Standard Introduction | Solving NFT Rental Issues, Effectively Reducing Time and Gas Costs

share
ERC-4907 Contract Standard Introduction | Solving NFT Rental Issues, Effectively Reducing Time and Gas Costs

A new smart contract standard, "ERC-4907," has passed the final review by the Ethereum development team last week. This standard is related to the leasing of NFTs, making the process of renting NFTs more efficient, reducing time and gas costs.

This article is an explanation of ERC-4907 by the Web3 software company thirdweb. For any doubts, refer to the original post.

Current Issues with NFT Rentals

Many NFTs have real-world utility, used in games or other digital assets to enhance and change experiences. For example, equipping a "sword NFT" to deal more damage and improve a player's performance.

However, for users who wish to access certain NFT functionalities without committing to a purchase, "renting NFTs" provides an alternative.

Renting NFTs allows users to temporarily store NFTs in their wallets by paying a small fraction of the price, unlocking functionalities and digital experiences.

In existing projects that offer this rental feature, NFT owners are divided into two categories: Owners and Users.

  • Owner: Holds the NFT and can sell or transfer it to another wallet.
  • User: Holds the NFT in the wallet but cannot sell or transfer it.

This means that the wallet renting the NFT temporarily gains the user's identity, and the owner must submit two on-chain transactions, one to list the wallet address as a user at the beginning of the rental period and another to reclaim the user's identity when the rental period ends.

Introduction to ERC-4907

Current rental processes often involve the two aforementioned transactions, which are inefficient in terms of time and gas costs. ERC-4907 aims to address this issue.

The ERC-4907 smart contract standard introduces an "expiration" feature that automatically ends the rental period without requiring a second transaction, significantly reducing the integration costs of NFT rentals.

Derived from the ERC-721 standard, ERC-4907 is backward compatible with any ERC-721 contract, meaning any existing ERC-721 smart contracts can implement leasing functionalities through contract extension.

The emergence of ERC-4907 also unlocks some interesting applications such as:

  • Renting NFTs for video games
  • Temporary membership in token-certified clubs
  • Temporary usage rights for token-certified software
  • Using NFTs as collateral for loans
  • Using NFTs as certificates for real-world rentable assets

The above is a conceptual introduction to ERC-4907 by thirdweb. For a deeper understanding, refer to the complete EIP proposal from the NFT leasing protocol Double Protocol.

Supplementary Examples of NFT Rentals

Referencing the initial proposal, let's look at examples of using ERC-4907.

1. Assuming Alice owns an NFT and wants to rent it out, while Bob wants to rent the NFT.

2. Alice approves the rental contract to enable the NFT transfer.

3. Alice sends the list of items she wishes to rent to the rental contract.

4. Bob selects a rental period, and the rent is calculated based on the rental time and price. Bob then transfers tokens as rent, and the rental contract transfers the NFT from Alice's address to the rental contract, sets the NFT user as Bob, and sets the expiration time to the rental period.

5. When the lease expires, Alice can redeem the NFT from the rental contract.