---
description: >-
  On-chain NFT Image Storage with Full Censorship Resistance, Immutability, and
  Permanency
---

# Onchain NFT Storage

Most NFTs today are not stored on the blockchain, but instead use IPFS. This means that the image data is not actually stored on the blockchain itself, but on a decentralized file storage system. While IPFS is a valuable tool, it is not as secure or tamper-proof as the blockchain.

Our project is different. We store all of our NFT images directly on the blockchain. This means that our NFTs are fully censorship resistant, immutable, and permanent.

This method is based on the following principles:

* **The blockchain is used to store the state of the Pixels.** This means that the state of the canvas is immutable and publicly verifiable, including the artist who triggered the color-change.
* **Anyone can read the state of the smart contract for free.** This means that anyone can view the image at any time. Since reading data from the blockchain is free this requires no cost.

**Benefits**

This method of storing images on the blockchain has a number of benefits:

* **Immutability:** Once a pixel is colored, it cannot be changed. This means that the image is tamper-proof and cannot be altered by anyone.
* **Transparency:** The state of the canvas is publicly verifiable. This means that anyone can verify the authenticity of the image and see who owns each pixel.
* **Decentralization:** The image is stored on the blockchain, which is a decentralized network. This means that the image is not controlled by any single entity and is resistant to censorship.
* **Accessibility:** Anyone can view the image at any time for free. This means that the image is accessible to everyone, regardless of their location or financial resources.

**How it works**

To store an image on the blockchain using this method, the process begins with a blank grid of pixels. Users can view the image by visiting the dApp, which retrieves the historical states directly from the smart contract.

To change the color of a pixel, users click on the desired pixel and confirm the interaction through a function on the smart contract. This function requires three arguments: the X-axis coordinate of the pixel, the Y-axis coordinate, and the new color, which get automatically selected based on the pixel and color that the user selected.

When the function is executed, it emits an event containing the information for the changed pixel. This event is secured like any other transaction on the blockchain. Once our dApp detects this new event, it updates the color of the specified pixel accordingly and the user can see it. This usally takes less than 10 seconds so it feels almost instant for the user.

**Security**

The image is stored securely on the blockchain. The blockchain is a decentralized network, which means that it is not controlled by any single entity. This makes it very difficult to tamper with the image. You can confidentally say that all Artworks created on ArtGridz will exist as long as Ethereum exists.

**Conclusion**

Storing images on the blockchain through pixel coloring via smart contract functions represents a pioneering approach to image storage. This method offers numerous advantages, including immutability, transparency, decentralization, and accessibility. Crucially, it eliminates reliance on third-party off-chain storage solutions and enables proof of ownership. In an era dominated by generative AI, this approach is one of the few ways to effectively prevent the theft of art ownership and preserve the value of human-made artworks.

\
