This document discusses rentable non-fungible tokens (NFTs) and the ERC-4907 standard. It begins with an overview of NFTs and common standards like ERC-721. It then introduces the concept of renting NFTs and outlines the rental experience. The ERC-4907 standard is presented as enabling risk-free NFT rentals by allowing contracts to set users and expiration dates for rented NFTs. Code examples and next steps are provided to implement rentable NFTs using this standard.
2. DISCLAIMER
§ The views and opinions expressed by the Presenter are those of the Presenter.
§ Presentation is not intended as legal or financial advice and may not be used as legal or
financial advice.
§ Every effort has been made to assure this information is up-to-date as of the date of
publication.
3. PLAN FOR TODAY
1.Refreshing memory about ERC-721
2.Rentable tokens
3.ERC-4907 standard
4.Creating our own rentable token
5. BUZZ AND REALITY
What we read in news
Celebrities, Billionaires, Athletes
purchasing NFTs
… NFT was sold on … for $.....
What’s going on
One form of smart contracts,
ERC-721 has interesting
characteristics:
Can verifiably prove ownership
Ownership of NFTs can grant
some privileges within online
communities
6. DEFINITION
“A non-fungible token (NFT) is a unique
and non-interchangeable unit of data stored
on a digital ledger (blockchain). NFTs can be
used to represent easily-reproducible items
such as photos, videos, audio, and other
types of digital files as unique items, and use
blockchain technology to establish a verified
and public proof of ownership.”
11. COMMON TOKEN STANDARDS
ERC-721
Default
Gold Standard
Most widely used
Not suitable for minting NFTs in
mass
Transferring one token at a time
Contains “symbol” and “name”
ERC-1155
Dual purpose: fungible and non
fungible
Used often to tokenize things
like common gaming skins and
other commoditized items
Single contract to make various
types of NFT
Less information in blockchain
logs (in events)
All metadata in URI
13. ERC-721 METADATA EXTENSION
name()
symbol()
tokenURI(uint256_tokenId)
{
"title": "Asset Metadata",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Identifies the asset to which
this NFT represents"
},
"description": {
"type": "string",
"description": "Describes the asset to which
this NFT represents"
},
"image": {
"type": "string",
"description": "A URI pointing to a resource
with mime type image/* representing the asset to
which this NFT represents. Consider making any
images at a width between 320 and 1080 pixels and
aspect ratio between 1.91:1 and 4:5 inclusive."
}
}
}
16. WHY RENTABLES?
• NFT surge in popularity due
to metaverse and play-to-
earn models
• NFTs become unaffordable
in some cases
• Need for additional liquidity
• Need to have risk-free rental
experience
NFT
17. NFR RENTAL EXPERIENCE
1.Alice approves rental contract could transfer the NFT Alice owns.
2.Alice sends a rental listing to the rental contract.
3. Bob select a lease time, the rent is calculated according to the lease
time and rental price. Bob transfer tokens as rent, rental contract transfer
NTT from Alice to rental contract and set the user of the NFT to Bob, set
the expires by the lease time.
4. When the lease expires, Alice can redeem the NFT from rental contract.
https://eips.ethereum.org/EIPS/eip-721
https://docs.openzeppelin.com/contracts/3.x/api/token/erc721#IERC721
interface ERC721Metadata /* is ERC721 */ { /// @notice A descriptive name for a collection of NFTs in this contract function name() external view returns (string _name); /// @notice An abbreviated name for NFTs in this contract function symbol() external view returns (string _symbol); /// @notice A distinct Uniform Resource Identifier (URI) for a given asset. /// @dev Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC /// 3986. The URI may point to a JSON file that conforms to the "ERC721 /// Metadata JSON Schema". function tokenURI(uint256 _tokenId) external view returns (string); }