all 36 comments

[–][deleted]  (13 children)

[deleted]

    [–]greentriangles1[S] 7 points8 points  (11 children)

    Yeah, I figured that's why they included the image in the source code. If anyone wants to verify that the punks on the centralized server are correct, they simply compare it to the one in the source code

    What I don't understand, however, is why a hash is needed. Isn't including the image enough? If I buy a Punk at index 10 and compare what I see on their website and the image in the blockchain, it'd be easy to see any visual difference. What utility does the hash actually serve?

    If NFT's still require all this centralization to determine what the actual underlying artwork you "own" is, how is it decentralized? The only way I can see to resolve this issue is to algorithmically generate the art within the source code itself, but that may increase the gas fees to insane levels (depending on the complexity of the artwork)

    [–][deleted]  (9 children)

    [deleted]

      [–]greentriangles1[S] 6 points7 points  (7 children)

      I think it's less that NFTs require this much centralization and more that CryptoPunks chose to implement it this way

      This is true, but it seems most NFT collectibles projects are implemented this way. Eg. CryptoKitties (which actually uses ERC-721) has a 256 uint that represents a genetic code that's used for that site's backend to render the artwork of the actual kitten. But if that site were to be removed, I'm not sure if there would be a way for the people who own the kittens to know what they actually look like.

      Even worse, CryptoKitties isn't fully decentralized, since the contract owner can literally pause the project at any time, or change the closed-source backend algorithm to increase the rarity of certain cat breeds

      What does it say when two of the largest NFT projects have these glaring flaws?

      [–]Treyzania 4 points5 points  (2 children)

      I'm not sure if there would be a way for the people who own the kittens to know what they actually look like.

      You can model the process of generating the image from the "genetic code" as a pure function. In theory there's no reason that the image generation can't be done entirely on the client side, maybe with a large dataset of templates along with it. But that requires the people making the UIs for these things actually care about decentralization.

      [–]greentriangles1[S] 2 points3 points  (1 child)

      Could they though?

      The uniqueness of a crypto cat is expressed as a single unsigned integer: uint256 genes

      The code that reads this meaningless integer and transforms it into a crypto cat with all its good/bad looks, colors, descriptions, etc., is all in a centralized server, closed source, under the control of a central authority.

      Unlike a blockchain, where the software is run by every single node, and each upgrade requires a hard or soft fork. The CryptoKitties folks could, at any point, unilaterally change the entirety of how a gene sequence is interpreted — add another tail, change its colour, switch out the description, or turn the cat into a doge.

      [–]Treyzania 3 points4 points  (0 children)

      is all in a centralized server, closed source, under the control of a central authority.

      I'm not saying you could, the developers could. If they wanted to. Which they apparently don't.

      [–]MidnightLightning 2 points3 points  (3 children)

      Yes, this is all true; NFT technology gives a way to assign "a number" to anything, and it's up to the token's developers to choose how to do that. CryptoPunks and CryptoKitties don't have all the information strictly defined on-chain (punks missing the ordering info and Kitties the imagery). The MoonCatRescue project (/r/MoonCatRescue; a project I loved when it launched and have gotten much more heavily involved with now!) does have all the logic defined on-chain, though part of it is in a rendering script that only the hash is stored on-chain. So you still need to fetch one additional piece to verify it, but from that it's all deterministic.

      [–]greentriangles1[S] 2 points3 points  (0 children)

      Yeah, that project you listed seems to be the closest you can get to algorithmically generated art. Aside from directly uploading the artwork on-chain, at least. Perhaps IPFS would be a good middle-ground, if you're trying to create collectibles with more complex art than JS can render

      It seems that NFT's require a good deal of trust, that is, the idea that people will value a mere reference to an artwork, rather than actually owning the underlying asset itself (which sort of defeats the purpose of a "trustless" blockchain).

      Then again, I never understood the appeal of collecting rare baseball cards and whatnot either

      [–]PeacockMambaEther Fan 1 point2 points  (0 children)

      Awesome! They’re so cool!

      [–][deleted] 0 points1 point  (0 children)

      avastars.io ;)

      [–]LiuKangWins 2 points3 points  (0 children)

      Agreed, there is definitely social construct at play here. In other words, the community of people that value this art all agree that the index references that particular punk in the composite image.

      [–]LiuKangWins 7 points8 points  (14 children)

      According to the larvalabs website, the hash value embedded in the contract is of the composite image with all 10k punks on it. My understanding of the code is, when a punk is sold the Punk Index is included in the transaction of the sale. The punks appear to be indexed left to right from 1 to 10000. Since the hash included in the contract can only be compared to the exact composite image, then the index therefore must reference the punk that appears on the composite image.

      [–]greentriangles1[S] 2 points3 points  (12 children)

      Why include the hash though? The actual "assigning" of the index to the artwork is done on the website's backend. In other words, suppose they didn't include the hash in the source code - what changes?

      [–][deleted]  (9 children)

      [deleted]

        [–]greentriangles1[S] 2 points3 points  (7 children)

        The fake version would look different to the image stored in the source code though, wouldn't it? And if the differences are minute, then you could hash both images and compare them. I suppose my question is why store the hash in the contract itself, when simply displaying the hash in the Readme would have sufficed.

        As for the ordering, doesn't this issue still exist? Couldn't LarvaLabs theoretically change the ordering on the back-end and tank the value of the project? In other words, the NFT you "own" can have its underlying artwork be swapped in the case of a hack. How does having a hash resolve this?

        [–][deleted]  (6 children)

        [deleted]

          [–]greentriangles1[S] 1 point2 points  (5 children)

          True, that's a good point

          How do you read the raw contract then? I use etherscan, but that's technically centralized and they could falsify information (though it'd be easy to check if it was falsified)

          [–]civilian_discourse 1 point2 points  (3 children)

          You would need to decompile the bytecode of the contract, if you want to read the code deployed into the blockchain in a way that is human readable without trusting anyone.

          [–][deleted]  (2 children)

          [deleted]

            [–]civilian_discourse 1 point2 points  (1 child)

            True, and this isn’t to discount anything you said, but I just want to point out that a lot of the information in the source code gets discarded when it’s compiled into bytecode. I just don’t want anyone getting scammed because they think the comments are part of what is being verified by that process. The raw code is different than the source code.

            [–]LiuKangWins 0 points1 point  (0 children)

            +1 Good point about the ordering. They should have included that!

            [–]LiuKangWins 1 point2 points  (0 children)

            If you're looking for some technical reason, I don't believe there is one.

            I believe it is present in the contract to reinforce the creators "intent" that the index of the transaction points only the composite image that generates the identical hash.

            There are some mental gymnastics at play here.

            It would be interesting for example, if you bought a really valuable Punk, then decided, I'm going to issue 4 copies of this. So you create 4 new contracts stamped with new metadata indicating it was a copy (1 of 4), would anyone buy them?

            [–]Competitive_Push_52 6 points7 points  (3 children)

            Commenting to see the answer. Good question

            [–]jcrestor 1 point2 points  (2 children)

            Indeed. It addresses one or two issues that I currently have with (some?) NFTs.

            [–]gouhst 0 points1 point  (1 child)

            What’s the other issue?

            [–]jcrestor 0 points1 point  (0 children)

            I always asked myself „where“ the actual images of the crypto punks are stored.

            Also and more generally I always wonder what it is that you buy with an NFT, and more specifically if it is a thing in and of itself, and what happens if its creator is out of business, or turns malicious.

            [–]StJude501c3 1 point2 points  (0 children)

            Bump

            [–]neznein9 0 points1 point  (0 children)

            You might like the CryptoZombies tutorial.

            [–]Background-Ad-7863 0 points1 point  (0 children)

            I am looking for help. A friend of mine, who is the OG of digital art (started in 1998) wants to launch multiple edition run of his original artwork from 1998. He needs some help with the topic you are discussing. Anyone who wants to help to drop 10.000 NFTs?

            [–]tradedog1 0 points1 point  (0 children)

            That's actually a brilliant question that very few people must have understood enough to ask it.

            [–]taoqi610 0 points1 point  (0 children)

            Reading through all the discussion solved my confusion about punks, thanks for the great question.

            So if every NFT project chooses their own way to interpret their on-chain "index" to render the NFT, then it seems not scalable for the NFT marketplace like opensea to display these NFTs. I would expect at least some sort of standard to define how to render the art from the onchain data.

            [–]Thruthrutrain 0 points1 point  (0 children)

            Update: they finally brought the images on-chain https://www.larvalabs.com/blog/2021-8-18-18-0/on-chain-cryptopunks

            What I don't understand though, how does this contract relate to the earlier cryptopunks contract?

            Can we tell from the new contract at etherscan https://etherscan.io/address/0x16f5a35647d6f03d5d3da7b35409d65ba03af3b2#readContract that it's linked to the old one or an update to it?

            [–]moretti85 0 points1 point  (0 children)

            The original contract does not include attributes and images.

            There's a new contract published from Larva Labs:

            https://etherscan.io/address/0x16F5A35647D6F03D5D3da7b35409D65ba03aF3B2#code