In-chain? Don't you mean on-chain?
Yes and no!
“On chain” is a term that is used in many ways. In some cases, it means that the code used to generate a piece of generative art has been stored on-chain—but it isn't actually called on to generate the visuals pointed to by the NFT. Artblocks is an example of the latter; in fact many of their artworks are not even images but interactive pieces of software. This approach gives huge flexibility—you can create art with any software you like—but it does mean the output NFTs have external dependencies. In other words, if the servers get switched off, or if the IPFS image isn't pinned, the NFT could eventually point to a blank.
In other cases, on-chain is used to describe a piece of art which has been live-rendered by the contract. In other words, when a platform asks the contract “what is the image”, rather than sending them to another URL the contract instead gives the requester instructions to create the image straight in the browser. Followers of Dom Hoffman (or the 0xchainArt organization) might recognise this as “3 star” on-chain-ness. This approach isn't suitable in many cases: the simplicity of the coding language, Solidity, significantly reduces what's possible; you could also store pre-generated components but that can get very expensive. On the plus side, though, these NFTs are entirely on-chain with no dependencies at all. Your NFT's image will exist for as long as Ethereum survives.
It is this second category the Moonbirds now fit in—and we are calling it in-chain in an attempt to help collectors understand the difference between the two.
What are the benefits?
Your bird is fully decentralized, permissionless and eternal(ish—as long as Ethereum survives!). We can't turn off a server and turn off your art.
It is also composable. This means its data can be easily used by other contracts (or off-chain software) to create derivatives. Loot is a well known example of an in-chain collection created entirely for this use case.
Yes!! Twitter doesn't yet support SVGs (the file type used by most in-chain projects), so we turned our images into bitmaps instead. We think this will mean ours is the first in-chain PFP you can flex with a hex…
How much will it cost?
The transaction will cost 96k gas per bird; that’s about 0.002 ETH at a gas rate of 20 gwei. You can commit multiple birds' data at once, but it won't significantly reduce the cost.
What happens to the birds that aren't put in chain by owners?
For now, the art will continue to be read from the PROOF team's server. In 6 months' time, in April 2023, we will put any remaining data on chain on behalf of the holders who have not yet done so themselves.
Yeah, yeah, in-chain, got it, now WHERE'S MY PROOF COLLECTIVE BACKGROUND
Good things have come to those who have (reluctantly) waited!
Proof Collective pass holders are now able to apply a special background, which is available in your Moonbird's individual page (where you claim your nest rewards). This can be applied to all birds held in the same wallet as one or more passes. The birds have to be nested to turn the background on; when the bird is unnested (or transferred to another wallet) the background will be automatically turned off.
The background won't be labeled in the metadata, to avoid interfering with rarity scoring systems.
Technically speaking, how does this work?
All image layers such as bodies, beaks, headwear and so on are stored in a DEFLATE compressed form as contracts (totalling 24M gas and costing just 0.38 ETH at a 15.7 gwei gas price). They have been generated programmatically from the image data using a generic pipeline that can also be applied to other collections, which we will open-source soon. There is also an attribute registry, with each bird's attribute set written into a single storage word together with the address of the holder making the transaction (via our website). We've used a Merkle proof to ensure that only the correct data can be written (sorry, no rarity upgrades allowed!). At the end of the 6 month period we'll add the data for any Moonbirds the owners have not yet committed to the chain.
There are then other, specialized contracts which will assemble the individual layers based on the registered Moonbirds attributes and blending them together into a single image. The raw pixel data is then wrapped as a BMP and returned as a Marketplace-conforming dataURI.
Even though all the artwork information is in principle already contained in the native 42x42 resolution image, we have scaled it up in our in-chain renderer by 16x for better appearance at larger sizes. This was opted for over an SVG wrapper because the latter still needs a browser to be rendered, and is not yet supported as Twitter Blue PFP.
For more information on on-/in-chain-ness, we'd recommend starting with these fantastic articles by the likes of Takens Theroem and Simon de la Rouviere(both are fairly technical but still accessible to non-engineers!)