I’m trying to come up with a couple designs for transfer of ‘items’ between ‘entities’ in my program. Items should be non fungible and only transferable between entities.
Curious on thoughts about going about this
Model 1: Traditional NFT model
In this model there would be a centralized canister (or set of canisters) that holds all of the information for an item including the owner.
Then each entity would look up ownership and item information from the canister. If any data needs to be associated with an item for an entity, the entity would use the itemid as a reference and store any additional data itself.
Whenever an item is transferred, the entity would send a message to the ownership canister saying who to transfer the item to. Then the entity would remove any references/meta data to the item because the entity no longer owns it
Ex: A man (canister) has a unique gem (id + data). That gem information/ownership would be stored in the GemDatabase (canister). Then the man would have information on which pocket the gem was in (gem id to meta data map). The man could send the gem to anyone by messaging the GemDatabase
Pros:
Central place to have a unique set of items with only the owner principal changing
Easy to lookup who owns an item
Cons:
An entity has to stay in sync with the central canister and cleanup transferred item meta data correctly
Central canister that limits scalability or complicates scalability
Model 2 : Direct ownership
An entity canister would store all info related to an item with no central database.
Transferring an item would consist of validating the sender is a ‘valid entity’. A valid entity would be determined by a centralized database holding a set of all entity canisters.
Pros:
No duplication of item data
Easy cleanup with transfer
No item database complexity
Cons:
Hard to get item owner without knowing owner
If some exploit is found, would be harder(?) to know fake items
Model 3 : ???
Any direction would be great. Trying to get my head in the actor model headspace