viefam / metabio-smart-contracts

Public Smart Contracts for MetaBio
1 stars 0 forks source link

Smart contract business constraints #7

Open vietdht opened 2 years ago

vietdht commented 2 years ago

Things to consider

Problems Consequences
Should we check uniqueness of metadata tokenURI (which decided by the plant and its properties) before allow user to mint? More than 1 NFT which have identical metadata
Let say we allow user to update their NFT based on latest properties of plant, what if they just mint a new one (with latest properties) instead of update?
What if User 1 mint NFT 1 from Plant 1, then sell and transfer Plant 1 to User 2? User 1 is the owner of NFT 1, then related to the 1st problem, should User 2 re-mint NFT from Plant 1? (assume it doesn't change, and have same properties)
gaupoit commented 2 years ago

"Let say we allow user to update their NFT based on latest properties of plant, what if they just mint a new one (with latest properties) instead of update?" . I have some concerns about this:

  1. One Plant will have multiple NFTs, how can we link / store their connections / time series?
  2. If user lends the NFTs for metaverse builder, how to replace the latest NFT?
  3. Comparing the cost (gas) between update tokenURI to mint a new NFT
gaupoit commented 2 years ago

"Should we check uniqueness of metadata tokenURI (which decided by the plant and its properties) before allow user to mint?" My suggestion is in our VieFAM off-chain database, the plant should have a field to store the NFT address. If the plant already has the NFT address, plant owners cannot mint again. They can only update the NFT metadata.

gaupoit commented 2 years ago

"What if User 1 mint NFT 1 from Plant 1, then sell and transfer Plant 1 to User 2?" It's same concern with my mind. In business logic, we need to decide the relationships between owner, plant, NFT.

cc @nguyendh2601 @nguyenltd . Please advise us. Cheers.