Understanding ERC-4907 and Rentable NFTs
ERC-4907 is an extension of the ERC-721 NFT standard designed for rentable NFTs. It introduces a "user" role, allowing NFT owners (landlords) to grant temporary usage rights to others (tenants) without transferring ownership.
Key Components:
- Owner: Has full ownership and control over the NFT, including selling, transferring, and granting/revoking user access. Receives rental income.
- User: Gains temporary access to the NFT's utility (e.g., IDO allocation on Rentapad) for a specific duration. Cannot sell or transfer the NFT.
setUser
Function: Enables the owner to grant user access and define the rental period.expires
Function: Automatically revokes user access when the rental period ends, returning the NFT to the owner.
How It Works on Rentapad:
- Owners list their NFTs for rent, setting the price and duration.
- Users rent the NFT, gaining access to its utility for the specified period.
- The
expires
function automatically returns the NFT to the owner once the rental ends.
Benefits:
- Owners: Generate passive income from their NFTs.
- Users: Access IDOs without buying an NFT outright, reducing costs and commitment.
- Platform: Enhances liquidity and accessibility for IDO participation.
The expires
Function: Ensuring Secure and Automated Rentals
The expires
function is crucial for automating and securing the rental process:
- When granting access, the owner sets an expiration timestamp using
setUser
. - The
expires
function is embedded in the NFT's smart contract and automatically revokes user access at the set time. - This eliminates manual intervention and guarantees the NFT's return to the owner.
Benefits:
- Automated: No manual intervention required for access revocation.
- Secure: Prevents unauthorized use beyond the rental period.
- Reliable: Owners are guaranteed their NFT will be returned.
Owner vs. User: Roles and Responsibilities
Feature | Owner | User |
---|---|---|
Ownership | Full ownership | Temporary usage rights |
Sell/Transfer NFT | Yes | No |
Grant/Revoke User Access | Yes | No |
Receive Rental Income | Yes | No |
Access IDO Allocation | Yes (if not rented out) | Yes (during rental period) |
In Summary:
ERC-4907 and its expires
function create a secure and efficient framework for NFT rentals. Rentapad leverages this technology to make IDO participation more flexible and accessible, benefiting both NFT owners and users while fostering a vibrant ecosystem.