LUKSO WEBSITE TAGS — “Unlimited metadata”

This post is part of a series where DROPPS breaks down the meaning of the keywords in the LUKSO website section about Universal Profiles, NFTs and Cultural Currencies.

DROPPS
DROPPS
4 min readOct 8, 2022

--

This time, we will analyze what’s behind “Unlimited Metadata”, under the NFT 2.0 section.

The Key/Value store

The concept behind this feature is that asset contracts adhering to LSP7 or LSP8 possess a Key/Value store just like the one in a UP.

Notice that the solidity declaration of the LSP7 & LSP8 interfaces starts precisely by stating that an LSP7 asset incorporates the ERC725Y standard (which means the contract contains a Key/Value store).

From: https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol
From: https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol

Just like in a UP, we can add arbitrary keys and attach them to the store of an NFT. We’re no longer restricted by the metadata written in the code before deployment of the smart contract, like in the ERC721 standard:

From: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721.sol

Instead, we save all the metadata in the Key/Value store. This variable here called store:

The Key/Value store is defined as a mapping in the smart contract. You can put things on it and erase them when you want. Just keep track of the label you choose when you store data!

We can, at any time, erase or add new forms of metadata such as a “description”, “tags”, a list of “creators”, whatever comes to mind. However, in order for this metadata to be meaningful across the whole ecosystem, people need to agree on a set of metadata keys that fundamentally describe a digital asset and prepare all dApps to handle and display these keys.

That’s exactly what the LSP4 Digital Asset Metadata standard is set to do.

The beauty of having the keys defined in the standard and not the smart contract code itself is that even if the community comes up with new attributes they deem essential for upcoming NFT collections, already deployed NFTs can simply add to or modify the existing metadata keys in their storage and stay just as relevant and up to date! In other words, staying compliant with the Asset Metadata standard.

On-chain vs Off-chain Storage

A combination of both. Storing data on-chain means that other smart contracts can read and interpret it, leaving room for automation to happen to NFTs, for example, smart contracts that read an NFT’s list of creators and distribute royalties. However, most blockchains are not tailored to store large amounts of data, an act which becomes way too expensive.

Following this rationale, another very important role of the LSP4 standard is to define the format of the metadata that is going to be stored under each key. For example, it makes sense to store the name of an asset as text, directly on-chain, because it is just a very small piece of text. It might also make sense to store the list of creators directly on-chain because it is just a list of addresses, and each address is a fairly small sequence of characters.

However, a 3D model, for example, is far too big to store on-chain and for that reason it needs to be stored somewhere else (somewhere cheaper). What gets stored on the blockchain is a reference (a link to IPFS, for example) to where the 3D model is saved. This is what is meant by “metadata that is always hash referenced wherever it is stored”, when you hover the button on the LUKSO webpage. Usually, the link is saved in the smart contract, together with a proof of what it contains. This is to prevent someone from going unnoticed after sneakily changing the link’s content, pretending an NFT is something that it is not.

In summary, dynamic storage provided by the Key/Value store of the ERC725Y contract and hash referencing metadata stored off-chain are the two key technological features that make NFTs 2.0 metadata “unlimited”.

We hope you’ve this article insightful. On our next piece we’ll be going through “Updatable” metadata and its ramifications.

--

--