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

CHIP-0021: NFT Fusion Puzzle #86

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

BrandtH22
Copy link
Contributor

This puzzle enables robust nft interactions while maintaining full on-chain provenance and non-fungibility of the associated tokens.

@danieljperry danieljperry changed the title Nft fusion puzzle chip NFT Fusion Puzzle Nov 7, 2023
@danieljperry
Copy link
Contributor

This PR has been assigned as CHIP-21 and is now a Draft. It is a Chialisp puzzle for combining, separating, and upgrading NFTs. Please leave your reviews as comments here.

@danieljperry
Copy link
Contributor

We will be holding a public discussion of this CHIP on Wednesday, November 29 at 7 AM PST (3 PM GMT, 11 PM in China). Please message me on Keybase if you would like a Google Calendar invitation.

@danieljperry
Copy link
Contributor

The recording of our call where Brandt discusses this CHIP is on Youtube:
https://www.youtube.com/watch?v=Rqd0hNsWgWM

@trgarrett
Copy link

@Yakuhito graciously donated some of his time to look over things. I am looking at the following items from his review.

List of pairs length check

When you do `(list_of_pairs NFT_A_LAUNCHER_IDS nft_coin_ids_to_lock)`, can't I just pass `()` as `nft_coin_ids_to_lock` and unlock all NFTs? I don't see the length to be checked anywhere, and list_of_pairs finishes execution once a list is empty

offer wallet asserts

offer_wallet_asserts ; an additional list of puzzlehash-msg announcements to assert -> are you sure this is required? since they don't create coins, someone can just modify the param to be an emty list and replace any mempool sb

OFFER_MOD_HASH should be enforced in full puzzle hash check

you pass OFFER_MOD_HASH through the puzzle, but you lose is by the time you get here: https://github.com/trgarrett/fusion-clsp/blob/main/clsp/fusion_singleton.clsp#L90 - make sure the singletons that create the puzzle announcements really have an inner puzzle of OFFER_MOD (inside the state layer, I think?) - otherwise, they might create fake announcements to trick you (e.g., the inner puzzle is my p2_, but I tell it to make the right announcement to satisfy the assert)

i.e., replace nft_inner_puzzlehashes with curry_hashes_inline NFT_STATELAYER_MOD_HASH (...) OFFER_MOD_HASH (...)

might also be applicable to https://github.com/trgarrett/fusion-clsp/blob/main/clsp/fusion_singleton.clsp#L64 - not sure since one side is always locked```

@BrandtH22 BrandtH22 changed the title NFT Fusion Puzzle CHIP-0021: NFT Fusion Puzzle Dec 1, 2023
@BrandtH22
Copy link
Contributor Author

The recording of our call where Brandt discusses this CHIP is on Youtube: https://www.youtube.com/watch?v=Rqd0hNsWgWM

Two questions arose during the zoom call:

  • does the fusion puzzle use the singleton top layer? Yes it does, the fusion_singleton puzzle is an inner puzzle to the singleton top layer.
  • will there be hinting available for display service to identify fusion puzzles onchain? Yes, there will be two different hints recommended. One relating to all fusion puzzles and another relating to project specific puzzles.

More information for these will be included in the chip prior to it being moved to the next state, we will also include more information on the clsp puzzle as it is finalized.

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

Successfully merging this pull request may close these issues.

None yet

3 participants