Protocol Overview
The UniBridge Rental Protocol would be described here.
Last updated
The UniBridge Rental Protocol would be described here.
Last updated
The main functionalities of contracts in UniBridge and their purposes are:
The primary method of listing a lend in the UniBridge Protocol. The Lend function will be used to initiate communication with UniBridge, including the aforementioned specifications
_nfts:
An array of addresses of NFTs a lender wants to lend out
Example: ["0x6Daec97b7aF9622c7Be9dAd72271A30601c298cB"]
_tokenIds
The token ids a lender wants to lend out, corresponding to the _nfts
addresses.
Example [1]
_lendAmounts:
Amount a lender wants to lend out. Be noted that it would always be 1
if the token is an ERC721 token.
example [1]
_maxRentDurations
The max duration in days for a lending. Duration of each renting shouldn't exceed it, or the lender would be able to claim the collaterals.
Example [3]
_dailyRentPrices
Daily price to pay for renter.
Example ["0x00010001"]
_paymentTokens
Token type that specified for rental
Example [1]
_nfts:
A list of NFT addresses that a lender wants to lend to
Example: ["0x6Daec97b7aF9622c7Be9dAd72271A30601c298cB"]
_tokenIds
The token ids belong to _nfts
addresses that a lender intends to lend out.
Example [1]
_lendAmounts:
Amount a lender wishes to lend out. Noted that it would always be 1
if the token is an ERC721 token.
example [1]
_maxRentDurations
Maximum day count for a lending. Each rental period shouldn't go beyond that limit or the lender may be able to take the collateral.
Example [3]
_dailyRentPrices
Daily rent payment for a renter.
Example ["0x00010001"]
_nftPrices
Collaterals for a renter renting the NFT token.
Example ["0x10001000"]
_paymentTokens
Token type that specified for rental
Example [1]
For those prepared to rent your preferred NFT collection. Depending on the contract you engage with, the rent function determines whether you can access it along with your collateral or not. The variables consist of:
_nfts:
A list of NFT addresses a renter is interested in renting in
Example: ["0x6Daec97b7aF9622c7Be9dAd72271A30601c298cB"]
_tokenIds
The token ids belong to_nfts
addresses that a renter wants to rent in.
Example [1]
_lendingIds
The lending ids returned when a lending was started.
Example [1]
_rentDurations
The time frame a renter is open to. It shouldn't go over the maximum time frame that a lender has established.
Example [2]
Depending on the contract and lending id you engage with, the function returns the rented NFT for renters prepared to do so. Noted that renters will get their collateral back when returning a collateralized token before expiry, and of course remaining rental. The variables consist of:
_nfts:
A list of NFT addresses a renter plans to return
Example: ["0x6Daec97b7aF9622c7Be9dAd72271A30601c298cB"]
_tokenIds
The token ids belong to_nfts
addresses that a renter plans to return
Example [1]
_lendingIds
The lending ids returned when a lending was started.
Example [1]
Depending on the contract and lending id you engage with, the function gets lenders' NFT back from UniBridge contracts, representing the lend has been stopped. Noted that lenders should keep their NFT in contracts if they still want them be rented out. The variables consist of:
_nfts:
A list of NFT addresses a lender plans to stop lending
Example: ["0x6Daec97b7aF9622c7Be9dAd72271A30601c298cB"]
_tokenIds
The token ids belong to_nfts
addresses that a lender plans to stop lending
Example [1]
_lendingIds
The lending ids returned when a lending was started.
Example [1]
Depending on the contract and lending id you engage with, the function liquidates collaterals to lending. Noted that lenders can get collateral and rental only if the rent has been expired and it's a collateralized token, whereas they can only get maximum rental that has been paid by renters if it's a collateral-free token. The variables consist of:
_nfts:
A list of NFT addresses a lender plans to claim rental or collateral
Example: ["0x6Daec97b7aF9622c7Be9dAd72271A30601c298cB"]
_tokenIds
The token ids belong to_nfts
addresses that a lender plans to claim rental or collateral
Example [1]
_lendingIds
The lending ids returned when a lending was started.
Example [1]