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

✨ Ownership detection for ERC721 side #42

Open

Description

@Vectorized

For marketplaces like Opensea

  • Upon initialization handshake, the mirror will try to get the owner from the base contract. If there is an owner, the owner will be updated to that owner, and a OwnershipTransferred(address indexed oldOwner, address indexed newOwner) event will be emitted. Store the current owner in the deployer slot.

  • Upon logging a batch NFT mint / burn, try to get the owner from the base contract. If the owner is different from that of the deployer slot, a OwnershipTransferred(address indexed oldOwner, address indexed newOwner) will be emitted, and the owner in the deployer slot will be updated.

Not sure if this will work, someone help me try.

Activity

  1. lambdalf-dev commented on Feb 13, 2024

    @lambdalf-dev
    Collaborator

    Why not just have an owner() function that returns the owner of the DN404 base contract?

  2. wwhchung commented on Feb 13, 2024

    @wwhchung

    Opensea does not rely on owner or OwnershipTransferred because it’s easily spoofable.

  3. lambdalf-dev commented on Feb 13, 2024

    @lambdalf-dev
    Collaborator

    Event easily spoofable for sure, owner is what the contract considers owner.

  4. lambdalf-dev commented on Feb 13, 2024

    @lambdalf-dev
    Collaborator

    Proposed solution here:
    #43

  5. wwhchung commented on Feb 13, 2024

    @wwhchung

    Event easily spoofable for sure, owner is what the contract considers owner.

    Yup, but OpenSea typically doesn't use this to group things under an address's 'created tokens' because that can also be faked. i.e. I can hardcode the owner() to return as you, and have these tokens as 'created by you' if OpenSea trusted the contract return values as the source of provenance.

  6. lambdalf-dev commented on Feb 13, 2024

    @lambdalf-dev
    Collaborator

    Well, if I'm the owner of the contract, it makes sense that the items were created by me...

  7. wwhchung commented on Feb 13, 2024

    @wwhchung

    Well, if I'm the owner of the contract, it makes sense that the items were created by me...

    Not necessarily. I could create a contract with a fake owner function and inject tokens into your collection. Similar exploit has been used in the past to make fake beeples which is why rarible and opensea moved away from relying on owner.

  8. cygaar commented on Feb 13, 2024

    @cygaar
    Collaborator

    Yeah @wwhchung is correct here - it's extremely easy to game owner() to make it look like someone else deployed your contract

  9. TechnicallyWeb3 commented on Feb 19, 2024

    @TechnicallyWeb3

    Why is the owner needed at all? I’ve got a version of ERC404 on my TW3404 repo that uses ERC1155 instead of ERC721 which allows for batch transfers natively.

  10. lambdalf-dev commented on Feb 20, 2024

    @lambdalf-dev
    Collaborator

    Why is the owner needed at all?

    For marketplaces collection management

  11. sonicsmith commented on Feb 20, 2024

    @sonicsmith

    Looks like a good solution would be to implement ERC-7015 since Opensea uses this for proof of ownership. (https://docs.opensea.io/docs/contract-level-metadata)

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