{In,On}Chain discussion
In the rapidly evolving realm of Non-Fungible Tokens (NFTs), distinguishing between “inchain” and “onchain” is crucial for understanding how digital artworks are stored and processed within the blockchain ecosystem. This article delves into the nuanced differences between these two concepts, shedding light on their implications for NFT artwork and its interaction with blockchain technology.
Inchain vs. Onchain: Definitions and Distinctions⌗
Inchain refers to data that is both stored and processed on the blockchain. When applied to NFT artwork, this means that the media is processed into its displayable form by the blockchain’s first execution layer, such as the Ethereum Virtual Machine (EVM) for Ethereum. This process ensures that the artwork does not require Turing complete processing after the initial onchain execution, making it directly observable from the blockchain without additional postchain processing.
Onchain, in contrast, pertains to data that is stored on the blockchain but processed offchain. This means that while the media is stored within the blockchain, the actual rendering and processing of the artwork occur offchain, often in real-time and using external technologies like JavaScript. NFTs that necessitate such Postchain Processing (PCP) include those that are displayed or interacted with through browsers, desktop applications, or games.
Challenges and Considerations⌗
Selecting the appropriate level of inchain versus onchain processing for a specific media type involves navigating multiple challenges. These include considering the media’s format (e.g., raster image, interactive vector image, sound) and the processing capabilities required at each layer (EVM to JavaScript, Equalizer, etc.). The decision hinges on the unique requirements and constraints of each use case, aiming to strike a balance between onchain storage efficiency and offchain processing flexibility.
Differentiating between pure SVG/HTML and Turing-complete languages highlights a conceptual challenge due to the inherent nature of SVG (Scalable Vector Graphics) and HTML (HyperText Markup Language) as descriptive languages, rather than computational or programming languages. SVG and HTML are fundamentally designed to describe the layout, structure, and presentation of content on the web, lacking the ability to perform arbitrary computations or algorithmic processes that define Turing completeness. This distinction becomes blurred when considering the interactive and dynamic capabilities that can be embedded within SVG and HTML documents through the use of JavaScript and CSS. While SVG and HTML alone do not possess the computational capabilities to be considered Turing complete, their integration with scripting languages enables them to support complex interactions and behaviors, making it difficult to separate their descriptive nature from the potential for Turing-complete operations facilitated by external scripts. This complexity underscores the challenge in categorizing SVG and HTML strictly as non-Turing-complete languages, especially in the context of modern web applications where the lines between content description and computational logic increasingly intersect.
Media Types and Postchain Processing⌗
The following table highlights various media types and their requirements for PostChain Processing (PCP):
Media types with Postchain Processing:
Media | Audio | Image | PCP | Example | Comments |
---|---|---|---|---|---|
BMP | X | MoonBirds, ReaperGambitEpitaph | Stored on Ethereum mainnet | ||
GIF | X | n/a | n/a | ||
GLTF | X | ? | SkyLight | Bitcoin Ordinal 489270 | |
JPG | X | n/a | n/a | ||
MP4 | X | X | ? | n/a | May contains multiple media streams |
WAV | X | Bleeps | Onchain sound note | ||
OGG | X | X | X | n/a | n/a |
HTML | X | X | X | Yet Another Doom Clone | Ordinal 466 |
SVG | X | X | X | n/a | n/a |
These examples underscore the versatility and potential of inchain NFTs for ensuring compatibility across various devices and platforms, opening new avenues for interactive and dynamic artwork creation via smart contracts.
Costs⌗
Inchain data insertion typically incurs lower costs compared to onchain methods due to the ability to leverage RPC provider execution to optimize the final artwork. The specifics of cost reduction may vary across different implementations. Additionally, storage maintenance is often provided at no additional cost on most blockchains.
Conversely, offchain storage solutions are significantly more cost-effective but require ongoing maintenance. Over an extended period, these maintenance expenses can accumulate, potentially surpassing the initial cost savings.
Conclusion⌗
The distinction between inchain and onchain NFTs lies at the heart of how digital artworks are stored, processed, and experienced within the blockchain framework. While inchain NFTs offer a seamless experience without the need for additional processing, onchain NFTs provide a canvas for more complex and interactive artworks, albeit with the requirement for external processing resources. As the NFT landscape continues to evolve, understanding these nuances becomes paramount for creators, collectors, and technologists alike.
Future work - NFT Dynamism⌗
NFT can be interactive and evolve, here is a mind map laying out the disambiugation work.
Click here if you have trouble navigating the document.
More ressources: