镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Enhancing Liquidity for Existing NFTs: Implementing Lock-up Mechanism to Return DN404 Tokens with Matching Token IDs #110

Open

Description

@abitocodes

Hello DN404 community and developers,

I'm reaching out to propose an enhancement aimed at increasing the liquidity of already minted NFTs through the DN404 protocol. Specifically, I believe there is a significant opportunity to extend the utility and accessibility of our existing NFT assets by implementing a mechanism that allows for the locking up of an NFT in exchange for DN404 tokens that carry the identical token ID as the original NFT.

The current scope of DN404, which primarily focuses on tokens minted after 2024, seems to target a rather narrow market and community. By broadening this approach to encompass existing NFTs, we could significantly expand our reach and impact within the broader NFT ecosystem.

However, as I attempt to draft a contract to realize this functionality, I've encountered challenges in devising a robust logic that accurately matches the token IDs of the locked-up ERC721 tokens with the DN404 tokens returned to the user. This issue is crucial for ensuring that users can reclaim their original NFTs upon returning the DN404 tokens, thereby maintaining a seamless and secure exchange process.

I'm opening this issue to solicit feedback, suggestions, and potential collaborations from the DN404 community and developers. Our goal is to refine this concept further and explore viable implementations that could bring this idea to fruition. I believe that by working together, we can overcome the technical hurdles and create a more fluid and dynamic NFT market that benefits all stakeholders involved.

I don't know if this idea has already been addressed or if it's impossible, but I'll raise an issue. Thanks.

Activity

  1. Vectorized commented on Mar 8, 2024

    @Vectorized
    Owner

    Rough idea: fill in all 10k bits in the exists bitmap.

    Then whenever a token is wrapped, we will directly mint on the exact ID.

    When it's burned in DN404, unset the bit in the exists bitmap.

  2. abitocodes commented on Mar 17, 2024

    @abitocodes
    Author

    Thanks, I've written a contract based on your idea and will start testing it soon, I'll update and come here again.

    https://github.com/abitofdots/convertERC721toDN404

  3. Vectorized commented on Mar 17, 2024

    @Vectorized
    Owner

    @abitofdots You gotta prefill all 10k bits in exists bitmap too. It will cost some gas on deploy, but your customers won't need to pay that much gas.

    Also, for _isTokenLocked, use Solady's LibBitmap, or the built-in bitmap in DN404. To save more gas.

  4. abitocodes commented on Mar 18, 2024

    @abitocodes
    Author

    Thnks you really ! Following what you said, I prefilled the existing bitmap with all 10,000 bits and replaced the existing bitmap with solady's LibBitmap.

    Could you check the revised contract one more? Even if it's rough, It'd be very helpful for me.

    https://github.com/abitofdots/convertERC721toDN404/blob/main/contracts/convertERC721toDN404.sol

  5. Vectorized commented on Mar 18, 2024

    @Vectorized
    Owner

    @abitofdots Can you write some tests to ensure that only the original owner of the token can unwrap the token?

    Don't take my word for an approval of safety. I'm only 10% alert right now.

    Something we will need to account for the edge case of collection where the token IDs start from 0 instead of 1. But this is homework for another day.

  6. abitocodes commented on Mar 23, 2024

    @abitocodes
    Author

    Sure. I'll have the tests ready and share it with you soon. Thanks for your fast feedback always.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions