EIP-3652: Hierarchical NFT

EIP: [WIP] EIP-3652: Introduce hierarchical NFT by k06a · Pull Request #3652 · ethereum/EIPs · GitHub

2 Likes

We could use CREATE2 to deploy proxies with salt=tokenId, this would allow to have same tokenId dimension of 32 bytes.

Just FYI we’re actively working on this and have recently launched our prototype of nestable, equippable, multi-resource NFTs at kanaria.rmrk.app - each bird is an NFT which can hold other NFTs and visually reacts to them by changing the render when they are equipped in specific slots, and each NFT can have specific alternative resources for different rendering (e.g. first 100 birds, owners can switch resource priority). This makes for interesting mechanics described here. We’ll be building an EVM version of these RMRK standards in the coming months.

Updated example: GitHub - 1inch/ERC3652

Extracted ERC3652Deployer to a allow any existing ERC721 to have lazy ownership feature. Lazy means proxy contract could be deployed on demand of managing owned assets.

I am surprised that this conversation is not very alive because the proposal is very interesting and powerful. @k06a, I wonder if you guys have dropped it out or are working on an alternative. Any update?

2 Likes

Thx, we had some implementation, but I believe nowadays it could be even better: GitHub - 1inch/ERC3652

Would love to have someone ready to try this protocol out. Deprecation of SELFDESTRUCT would allow to use DELEGATECALL safely within proxy contracts

I am studying it to understand if it makes sense in a project on which I am working on. If so, I may implement it. One issue is the cost. I must find a way to keep the new deployed contract small enough to avoid excessive costs for the deployer. I was thinking of mixing it with Diamonds so that the facets are deployed separately and are common. Another alternative is to use a registry to handle external contracts that manage the storage, etc.
But I am still not sure about it. Anyway, I will keep you posted.

This EIP is closed but for anyone interested on hierarchical NFTs, there’s already: ERC-6059: Parent-Governed Nestable Non-Fungible Tokens, it allows multiple level of nesting an parent-child relationships can be created among any NFT collection implementing the interface.

I took a look at that and it defines a much more complex and structured scenario.

Also, I think that defining EIP-3652 as “Hierarchical NFT” is reducing its scope.
For example, I am considering to use it to create on-chain wallets associated to single NFTs, so that the owner of the NFT is the only one able to manage the wallet.

Sounds a lot like what 6551 is doing, might wanna check.

1 Like

I didn’t know that. Thanks for pointing out to it

@stoicdev0 I saw bunch of hierarchical NFT EIP, they all struggle with non-compatibility with existing predeployed NFTs and it’s too complex in general which makes no sense to use it.

1 Like

We could make proxies super cheap to deploy, moreover they could be deployed on demand.

ERC6551 is supposed to deploy very small contracts and being fully compatible with existing tokens too.
I would bet that they have seen your ERC and started their work from there.

This seems very short minded. If you want something which is specialized in Nesting NFTs, where can easily move through parents/children and have multiple levels, you can either deploy new contracts or wrap you existing one and use 6059. Several projects already do. If a contract owned by an NFT being able to receive NFTs is enough, then you go with 6551.

I would be careful in defining something short minded.
@k06a motivation is very close to 6551’s authors one.
Also, the two protocols are very similar. 6551 just came much later than 3652, replicating the same approach.

You’re right, apologies for the wording.
If they want to replicate the functionality with a simple interface, my only argument against is that it makes adoption harder when several EIPs address similar problems. I would just not discard other proposals because they seem “too complex”.

Upgraded proxy implementation with EVM bytecode for the best gas efficiency:

But delegatecall means proxy could be destroyed by SELFDESTRUCT intentionally or non-intentionally. But upcoming Ethereum hard fork Dencun gonna change SELFDESTRUCT opcode behavior to non-delete smart contract.

1 Like

In this new implementation, to transfer, for example, an ERC721 from the proxied account to some address address, someone should just implement a transferNft function inside TokenTransferDelegatee, right?