NFT Proof of Ownership on Filecoin + VideoCoin — How to store NFTs right.

Devadutta Ghat
VideoCoin
Published in
4 min readApr 22, 2021

Continuing our series on VideoNFT architecture and roadmap, we look at how to store an NFT file along with its proof of ownership on Filecoin + VideoCoin. Since VideoCoin is a fully Ethereum compatible blockchain all our descriptions below can be easily ported to another ETH compatible blockchain!

When working with NFTs, the main actors to consider are:

  • Issuing Entity — The company or entity behind the NFT
  • Original Owner — The copyright owner or creator of the underlying media asset comprising the NFT
  • NFT Holder — The present holder of the NFT
  • NFT Purchaser — Someone with the intent of acquiring or transacting the NFT from the present NFT Owner

Proof of Ownership Calculation on VideoCoin

Like we explained in the previous post, the way NFTs are stored presently makes them very fragile, and their survival is tied directly to the issuing entity’s survival.

Our implementation of Proof of Ownership makes NFTs robust and can withstand an issuing entity’s untimely demise. An NFT holder can use the proof stored in Filecoin to establish veracity irrespective of whether the issuing entity is live or not and when an NFT changes hands, the NFT purchaser gets the new proof of ownership assigned, and this happens without any involvement of the issuing entity.

Here’s how Proof of Ownership works. When an original owner creates an NFT, the following steps are taken

Step 1: Create an encrypted signature from the media file

Like in VideoCoin’s Proof of Transcoding, we use the video file and create a unique ID signature of the video file using the binary contents of the file.

Once this ID is established, we use an ephemeral DRM key to encrypt the video using the public key of the owner. Deriving the public key of a VID account is straightforward and only requires the public ETH address of the owner.

This is where the VideoCoin Network does the hard work.

Workers on the VideoCoin Network pick up the media file and perform the necessary encryptions.

Step 2: Storing the NFT information on the blockchain so without breaking compatibility

Once the proof of ownership is established, it needs to be written on to the blockchain without breaking compatibility with established NFT platforms.

Thus, we support an integrated metadata schema to be compliant with ERC721 and ERC1155 and also extend it to support DRM data for rights management and tracking ownership transfers.

We use the following metadata scheme as described in “ERC721 Metadata JSON Schema” to keep the NFT 100% compatible with existing platforms.

ERC721 Metadata JSON Schema

Storage on Filecoin

Now comes the part where we have to link the ERC721 token’s metadata from above with the newly established Proof of Ownership. We do this by storing the encrypted proof of ownership, along with all the accompanying metadata in the schema below on IPFS.

That's it! Now you have an NFT that is fully compatible with other ecosystems safely stored on our blockchain along with the proof of ownership.

IPFS also stores the unencrypted video, thumbnails, and any other information that's needed by the front end application to present the NFT, and these files and metadata are pushed down to the Filecoin network for cold storage based on the storage deal and longevity of the token specified by the token creator and in most cases, given the extremely low cost of storing data on Filecoin and also the very small size of these files, data can live on Filecoin for a long long time.

Retrieving the NFT from the Filecoin network

Retrieval is straightforward. Using the IPFS CID and an IPFS gateway, an application can retrieve all the media from IPFS, and that CID is itself stored in the ERC 721 token.

In case the hot storage does not hold the CID, a caching mechanism retrieves data from the Filecoin archives and makes it available.

In this state diagram below, we show how a user app can replicate data between VideoCoin and Ethereum if it needs to hold the NFT in multiple blockchains.

Mutability and Ownership Transfer

What makes our Proof of Ownership implementation very powerful is how NFT ownership changes are handled. Below shows a state diagram of every step that happens when an NFT changes hands. VideoCoin Network re-encrypts the content using the new owner’s public key and updates the encrypted video along with associated metadata and propagates it across both VideoCoin and Filecoin.

Proving ownership

When an NFT owner has to prove that he currently owns the NFT, he does the following

  1. Retrieve the encrypted media content from Filecoin along with all relevant metadata
  2. Use his private key to decrypt the DRM keys
  3. Use the DRM key to decrypt the video
  4. If the decrypted video is a bitwise match of the unencrypted video stored on Filecoin, the proof of ownership is established

That's it! While all of this looks super complex, an upcoming demo will make it all easy to follow.

Stay tuned!

--

--