Example for rental
The following diagram demonstrates an example for the rental functionality.
Suppose Alice owns NFTs and wants to rent out a NFT, and Bob wants to lease a NFT.
-
Alice approves rental contract could transfer the NFT Alice owns.
-
Alice sends a rental listing to the rental contract.
-
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.
-
When the lease expires, Alice can redeem the NFT from rental contract.