Neti Rental Interface for NFT Ecosystem
Hi, we are Neti - a software development boutique hooked on blockchain. We believe that NFT tokens (apart from the art) have a huge utility potential. But why would you have to buy NFT to use it? You can borrow a bike from your friend without any collateral, you can borrow a laptop or jacket. Why not NFT?
With the rescue comes NeRINE - Neti Rental Interface for NFT Ecosystem. It's the first solution on the market that offers the possibility of safely renting NFTs without the need to pay a deposit while guaranteeing both parties the return of the item on agreed terms. Most importantly, you don't need to lock any deposit; only the amount agreed for renting. Interesting?
- The owner of the NFT registers the token as "ready to be rented" and specifies the deal's details: time of rent, price, etc.
- Our "lease manager" (a smart contract) sets itself as the operator. It means it can transfer NFT to other users.
- The token is placed on the marketplace so that everyone can borrow it just for the agreed price and for an agreed period
- After borrowing the token, the user can use its utility for the agreed period
- When the rental period finishes, our "leas manger" will ensure that the token is returned to the original owner.
It works with the usage of Tezos Custom Policy, the functionality that is present only on the Tezos chain. It allows us to set the operator's role to the smart contract for the given NFT and enforce return through that mechanism later on.
- Users don't need to put collateral to borrow the NFT
- The owner of the NFT has a guarantee that after the agreed period, the token will be returned to him.
- Items market in the computer gaming industry, which allows you to make money on the items you have in a safe way
- Subscription model through renting NFT, which allows any application to behave like a Web2 SaaS platform
- Safely borrow NFT to a friend (even for free) with the guarantee of return. The NFT can represent tickets, access to some resources, or whatever you need :)
Well, what we built during the hackathon is just proof of technology. We know how to make it work for all NFS on the Tezos chain, and we have ideas on how the approach can be monetized and profitable for NFT creators and also users. For us, it's just the beginning of the story.
- Technology Stack
- Key Features
- Future Enhancements
- Installation, Setup and Testing
- Usage: LeaseManager Contract Entrypoints
- Testing the LeaseManager Contract
- Contributing
- Contact
- SmartPy: A language for developing smart contracts on the Tezos blockchain.
- Smartpy.io IDE: An integrated development environment for SmartPy.
-
NFT Registration in Lease Manager Contract:
- Users have the capability to register their NFTs for rental purposes. Upon successful registration, the NFT's status is set to 'OPEN' for rental, and it becomes non-transferable by the owner. The transfer of the NFT is exclusively managed by the Lease Manager Contract.
-
Renting NFTs:
- Users can rent NFTs for a predetermined duration as defined in the Lease Manager Contract. During the rental period, the lessee has usage rights but cannot transfer the NFT to other parties.
-
Returning NFTs:
- Post the expiration of the rental period, the NFT is returned to its original owner by the Lease Manager Contract. Subsequently, the NFT is unlocked and deregistered from the Lease Manager Contract, enabling the owner to transfer it freely.
- Secondary Market for NFT Rentals:
- Future enhancements include the development of a secondary market where users can rent out NFTs they have leased to other users. This will create a dynamic and user-driven rental ecosystem. A modified Tezos wallet will be introduced to facilitate these transactions, ensuring a secure and efficient process. The system will automatically distribute fees between the original NFT owner and the Rental platform, maintaining a fair revenue-sharing model.
Use the smartpy.io environment to deploy smart contracts and run tests.
The LeaseManager
contract in the NeRINE has several entrypoints, each requiring specific data inputs. Below are the details for each entrypoint.
Registers an NFT for rental.
token_address
: Address of the NFT token (type:sp.address
)token_id
: Unique identifier of the NFT (type:sp.nat
)lease_contract
: Address of the lease contract (type:sp.address
)
Allows a user to lease a registered NFT.
nft_data
: A record with the following fieldstoken_address
: Address of the NFT token (type:sp.address
)token_id
: Unique identifier of the NFT (type:sp.nat
)lease_contract
: Address of the lease contract (type:sp.address
)
Returns the leased NFT to the original owner after the rental period.
nft_data
: A record with the following fieldstoken_address
: Address of the NFT token (type:sp.address
)token_id
: Unique identifier of the NFT (type:sp.nat
)lease_contract
: Address of the lease contract (type:sp.address
)
Ensure that all data provided to the entrypoints follow the specified types and formats. Incorrect or invalid data may result in transaction failures or unintended behavior.
The LeaseManager
contract includes several tests to ensure its functionality and robustness. These tests simulate various scenarios to validate the contract's behavior under different conditions. Below is an overview of what each test is designed to accomplish.
To verify that an NFT can be successfully registered for leasing and then leased to a user.
- A test NFT is created and registered in the
LeaseManager
contract. - The test simulates a user leasing the NFT.
- Checks are performed to ensure the NFT's status changes appropriately and that it cannot be transferred outside the contract's control during the lease.
To confirm that a leased NFT is correctly returned to the owner after the rental period.
- An NFT is leased as per the first test.
- The test simulates the passing of the rental period.
- The contract's
unlease
function is invoked to return the NFT. - Checks are performed to ensure the NFT is returned to the owner and its status updated accordingly.
To test the contract's ability to prevent invalid transfers of a leased NFT.
- An NFT is leased to a user.
- Attempts are made to transfer the NFT to another user, which should be invalid during the lease period.
- Checks are performed to ensure these transfer attempts fail as expected.
To ensure that the NFT's status is accurately updated throughout the lease process.
- The status of an NFT is monitored as it goes through registration, leasing, and return.
- Checks are performed to ensure the status reflects the current state of the NFT (e.g., 'OPEN', 'LEASED').
Contributions to the NeRINE project are welcome. Please follow standard open-source contribution guidelines.
For more information:
- Website: www.neti-soft.com
- Email: [email protected]