In on Chain
In-chain refers to something that is stored and processed on the blockchain, while on-chain refers to something that is stored on the blockchain but processed off-chain. In the case of NFT artwork, in-chain would refer to the media being processed to its final form by the first execution layer, such as the EVM in Ethereum. On-chain would refer to the media being stored on the blockchain, but the processing and rendering of the artwork happens off-chain using JavaScript, for example, in real-time.
Some media formats, such as SVG, contain multiple data streams that may require different levels of processing, it can be rendered using rasterization techniques, but it can also be enhanced with CSS and/or JavaScript. This means that some parts of the image may be processed in-chain, while others may be processed off-chain.
Additionally, depending on the context, the final form of the media may be different, it can be a raster image or a interactive vector image, so the processing can be different for each context and each final form. This can make it challenging to determine the appropriate level of in-chain and off-chain processing for certain types of media, and may require careful consideration of the specific requirements and constraints of the use case.
Thus we can define in-chain NFT where the artwork does not require* turing complete processing post first on-chain execution (e.g: when tokenURI function return embbed audio/video in metadatas) (as in mandatory). The processing capability being brought by the human user, and therefore, a NFT can be considered in-chain when it does not require post-chain processing, for example, in wallets, twitter profile pictures, and so on. On the other hand, NFTs that require Post-Chain Processing(PCP), for example, in browsers, desktop apps, or games, are considered on-chain NFTs.
Example of possible artwork media types with possible Post-Chain Processing:
Media | Audio | Image | PCP |
---|---|---|---|
AVI | X | X | |
BMP | X | ||
GIF | X | ||
GLB | X | ||
GLTF | X | ||
JPG | X | ||
MP4 | X | X | |
WAV | X | ||
WebM | X | X | |
OGG | X | X | X |
HTML | X | X | X |
SVG | X | X | X |
Examples projects by media type:
Add OpenSea Link
-
In-chain BMP NFT is Brotchain NFT processing image
-
In-chain WAV NFT is the Bleeps NFT Waveform synthetizer
(It’s worth noting that the table is not an exhaustive list of all media types that can be used for NFT artwork)
The concept of in-chain and on-chain NFTs refers to the storage and processing of digital artwork on the blockchain by smart-contracts following NFT standards. In-chain NFTs are those where the artwork does not require Post-Chain Processing and can be viewed using standard software or hardware. On the other hand, on-chain NFTs require post-chain processing, such as in browsers or desktop apps. The broad spectrum of possibilities for In-chain NFTs allows for greater compatibility across devices and opens up unexplored possibilities for on-chain computation, such as the ability to create more interactive and dynamic artwork, or the ability to use smart contracts to create unique, one-of-a-kind pieces.
INSERT DIAGRAM from DRAW.IO
NB: We could use the StarkNet Cairo CPU intercheangibly with the EVM as long as the smart-contract follows NFT standards.
More ressources: