-
Notifications
You must be signed in to change notification settings - Fork 2
Define target operating model for smart-contracts on NEAR #1
Comments
Providing some high level context here. It comes down to access patterns for the NFTs. If you know that a domain of NFTs (maybe this is GateID) will only be searched after knowing the GateID, then it's fine to have the following deployment: gateid-1.mintgate.near HOWEVER, if you want to query NFTs ACROSS ALL GateIDs... then you have 2 options:
For (2) keep in mind this increases your storage requirements each time you add an attribute you'd like to query by at the smart contract level, and this is kind of an anti pattern in blockchain. The blockchain is used for the scarcity ownership layer and not intended to function as a high level database. So typically, prefer 1 access pattern only, get token by id. Here are some access patterns:
Summary, for access patterns, it's preferred to store 2 things off-chain in your own database, specifically:
|
Based on Matt's response and the system we want to develop, the below is what we're looking for. (a) Yes, only 1 instance. (a) Option a1: each GateID gets its own NFT Contract deployed Let me know if this all makes sense and appreciate any feedback if you see any potential for improvement or optimization. |
Thanks for the feedback. It is interesting from the engineering perspective. Regarding the NFT contract I would like to discuss some issues:
Regarding the Marketplace contract, totally agree with it. @mattlockyer @Jshanks21 Does this make sense? Is there any other issue I'm not seeing here? [1] Here by changes I refer to only methods changes. Data changes are not included here since data changes could break the contract. |
@Jshanks21 - let me bring few more examples. Let me assume 100 new GateIDs created daily that Creators want to deploy to NEAR (probably I am too conservative, but just to start from smth). For you this means:
Summary: technically idea looks appealing for me (e.g. thinking of future use-case when it could be possible to transfer whole subaccounts between accounts, or granularly manage access rights per subaccount), but I do not see benefits why to hunt for it right now. |
That all makes sense. When building this on Ethereum, our original design was for an 1155 semi-fungible token for similar reasons of avoiding numerous deployments and re-use one instead. This design would be optimal to pursue for NEAR if possible. Might I suggest the following then: The NFT contract creates a new token ID for each new GateID that it's associated to. Similar to ERC-1155, a token ID can mint numerous copies with the same token ID that would all be associated to a GateID. When we introduce a new GateID, a new token ID is made with the quantity the Artist specifies. If this makes sense, is it also possible to make the token ID and GateID the same? If this works,
Let me know if this would be a viable path to pursue for the NFT contract. |
@Jshanks21: if we are talking about NFT standard, then tokenId must be unique. This is required to determine an owner of every copy and to implement NFT transfer to the new owner. Also granting access right to it to Marketplaces. Otherwise, if there are numerous copies with the same tokenId, it will be very complicated to maintain the list of owners. Consider the following: user A has 5 copies, user B has 10 copies, user C has 20 copies. Then User A wants to sell 3 copies on Marketplace A, and 2 copies on Marketplace B for different prices. User C is willing to buy only 1 token copy more from user A via Marketplace B. At the same time user C is selling his token via Marketplace A, and user B buys them :) It would be error prone to make all these calculations, grant rights and settle the balance - without having a standard similar to ERC-1155 in place in NEAR Protocol. As standard for semi-fungible token is not there yet, I would suggest to:
If this sounds like a going-in position, please commend and we can conclude this ticket with a decision. Thanks! |
Thank you, this all sounds good. |
To be decided:
The text was updated successfully, but these errors were encountered: