Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERC998 addition #3062

Closed
3scava1i3r opened this issue Dec 30, 2021 · 6 comments
Closed

ERC998 addition #3062

3scava1i3r opened this issue Dec 30, 2021 · 6 comments

Comments

@3scava1i3r
Copy link

🧐 Motivation

For the problem statement i would say we don't have any specific boilerplate to make NFTs that contain ERC20s so might as well start this here in openzepplin.(FYI This is something similar to what charged particles protocol provides)
I found aavegotchi project pretty amazing and thought of making something like it.ERC998 has been one of the most promising draft for an extension of ERC721.

📝 Details

Here are some of the features we seem to add -

  • An ERC998ERC721 top-down composable is an ERC721 token with additional functionality for owning other ERC721 tokens.
  • An ERC998ERC20 top-down composable is an ERC721 token with additional functionality for owning ERC20 tokens.
  • An ERC998ERC721 bottom-up composable is an ERC721 token with additional functionality for being owned by an ERC721 token.
  • An ERC998ERC20 bottom-up composable is an ERC20 token with additional functionality for being owned by an ERC721 token.

you can get more information about the same here - https://github.com/ethereum/EIPs/blob/master/EIPS/eip-998.md.
I was thinking of updating the contracts and adding a new ERC under token section here.I would surely need a lot of help from the community for the same.I have finished my work with topdown composables right now.Adding the PR for the same soon

@3scava1i3r 3scava1i3r mentioned this issue Dec 30, 2021
3 tasks
@Amxx
Copy link
Collaborator

Amxx commented Dec 30, 2021

Hello @3scava1i3r

I see that ERC998 is still a draft. It was created over 2 years ago, and has not received any meaningful update since sept 2018. I'm curious what lead you to consider this ERC today.

Are you aware of any implementation/usage of this ERC in production?

AFAIK, there are efforts to "shard" NFTs and other assets. I can think of niftex that allow users to shard a smartwallet. Shards are ERC20 tokens, and the smartwallet can be manage any class of asset (ERC20, ERC721, ERC1155, ...)

@3scava1i3r
Copy link
Author

3scava1i3r commented Dec 31, 2021

Hi, @Amxx
I wish to talk about this now as there is no implementation from openzepplin for the same and i see a lot of potential in GameFi using ERC998, also i had this hackathon and thought why not make a boilerplate for everybody else.

Yes some of the the implementations of this ERC in projects are as follows -

also for the case of sharding, i worked with niftex like a year ago and had fractional nfts being made out of our nfts, so we have to give an sc our nft and that is converted to a set amount of ERC20 tokens - 5 tokens for protocol.This implementation is very different from the above stated

I wish to implement something like defi+nfts so i think this ERC could have a greater impact for the same cause.We can check charged particle protocol for interest bearing nfts seems like a fun project to me🙂

@TrejGun
Copy link

TrejGun commented Jan 20, 2022

Hi guys!

I was working for BitGuild back in 2018 and I really really want to see this standard implemented in OZ but I'm afraid it has less to no sense of doing this. Let me briefly explain why.

  • in the official implementation you can't use a token with id 0, it is just broken, you have to burn it right away, or you have to rework several checks to support it.
  • its a pain to move tokens inside the tree, especially if it is just plain 721, you will have to have a mix of top-down and bottom-up. sometimes both at the same time.
  • in real-world applications, you most likely will not use contracts, not from your ecosystem. say you have a character with some gears, where this character is 998 and gears are 721. you most likely will not allow users to equip CryptoKitty as a sword or shield. This means you have to add a white list for contracts that could be used as children. You most likely will not allow users to wear 10 swords at a time, so you have to add a limit too. In the most complicated scenario, you have a 3-dimensional array tokenId->address->amount which will cost you a hell ton of gas and storage space

so to summarize you have 721 base, 7 OZ extensions, 998+721td, 998+721bu, 998+20, 998+1155, filter+limit, maybe something else. The total size of bytecode is way more than any public blockchain limit, you just won't be able to deploy this monster. In fact, you can barely fit 721 base, access control, burnable, enumerable, 998+721td, and 998+20.

speaking of your particular case, if you develop the game and want to use 998 I can help you.

@3scava1i3r
Copy link
Author

I'd like to work on a project that would require 998 and i would most certainly like to work here to implement it through OZ as well @TrejGun

@frangio
Copy link
Contributor

frangio commented Feb 8, 2022

I don't think this ERC is a good candidate to be included given it's a Draft and the author has no plans to keep working on it.

@frangio
Copy link
Contributor

frangio commented Sep 16, 2022

Closing for the reasons stated above.

@frangio frangio closed this as not planned Won't fix, can't repro, duplicate, stale Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants