capsule-corp-ternoa / ternoa-proposals

5 stars 2 forks source link

TIP-400: Rental NFTs #22

Closed peshwar9 closed 1 year ago

peshwar9 commented 2 years ago

Hi @Victor-Salomon : Well written spec, with complex rules!

I had the following questions/comments:

  1. Royalties can not be set for rented NFTs.: If Royalties are already set for an NFT, can it not be rented?
  2. Revocation type is not mentioned in any of the interfaces, but is referred in spec. Should the revocation type be added to contract creation interface?
  3. What does the term 'flexible tokens' mean in this sentence? Flexible Tokens can only be applied for Fixed Contract Duration: Fees will be calculated on a Pro-Rata basis.
  4. What does this mean? NFT renter can't rent the NFT
  5. What does tokenstype mean in this sentence? rentFee can only be a tokens type, as an NFT can be used for subscription fee.
  6. Why can't ended contract directly delete contract from storage? I see two separate interfaces here - one for end_contract and another for `remove_expired_contract.`
  7. These two sentences are not clear: What does it mean by either user is whitelisted in acceptance list or there is no acceptance list?
  1. Numbering to be corrected in this sequence: _ If RenterCancellationFee are set, when revoking contract, renter will pay the fees/nft. If Rentee want to revoke the contract. 3.Rentee can send a revokeContract extrinsic with the NFT ID. 4.If RenteeCancellationFee are set, when revoking contract, rentee will pay the fees/nft.

cc @Leouarz @markopoloparadox

markopoloparadox commented 2 years ago
  1. This probably means that you cannot change the royalties of an NFT that is rented.
  2. Revocation type has been replaced by two new flags: renter_can_cancel and a bool that represents if a subscription can be cahnged.
  3. All of those private extrinsics don't exist anymore
Victor-Salomon commented 2 years ago

@peshwar9 More explainations step by step. 1- I assume we can't set the royalty while the contract is rented. See : https://ternoa.atlassian.net/wiki/spaces/TO/pages/307658769/Phase+3.1+-+NFT+Renting+-+Technical+Specification#Side-Effects 2- Revocation type has been replaced as @markopoloparadox explained. 3- see NFTR-F07 from : https://ternoa.atlassian.net/wiki/spaces/PRODUCT/pages/307462352/NFT+Renting+Specifications#Functional-Requirements 4- Maybe this rule does not need to be written as it seems more confusing than anything : it means that the creator of the contract, can't rent its own contract he created. 5- When creating a contract, rentFee can be either a token amount or an NFT (So RentFee Type can be an amount as BN or an NFTId as Number). If you create a Subscription rent contract, you can only set the rentFee as an Amount (not an NFT). So when you change the Subscription Terms, you can only set a new amount not an NFT. 6- I will let @markopoloparadox / @Leouarz answer. end_contract is triggered when the contract reach its ending block or if the new terms of a subscription contract are not accepted. remove_expired_contract is triggered if a contract is created and reach the expiration periode without anyone renting it. 7- Both acceptanceType can have a white list of user, but it's optionnal:

8- Indeed needs to be fixed.

Again, some changes are coming on the pallet and will impact the TIP/SDK/Indexer. I'll make the changes asap.