The State Oracle is the newest addition to CENNZnet’s core module selection and brings with it a whole new exciting set of possibilities. Let’s dig into exactly what it is and how it can be used.
The State Oracle module works in partnership with the Emery token bridge to allow the CENNZnet network to view and read data from Ethereum. This means that contracts on CENNZnet can refer to data or activity on Ethereum and then use this information to trigger actions on CENNZnet.
CENNZnet is a highly optimised L2 solution for Ethereum, this means that users and developers can use the speed and functions of CENNZnet while also relying on the mature security and tooling offered by Ethereum. It brings together the best of both worlds.
The State Oracle module adds another layer of interoperability between CENNZnet and Ethereum. Ethereum can be used as the state of truth which securely holds assets. DApps and Web3 projects can then run cheaper faster contracts on CENNZnet to put this data to use in fun and creative ways.
An exciting example of the State Oracle at work is the concept of composite NFTs, ie. one NFT made of many NFT parts. For example, a classic NFT avatars (e.g CryptoPunks, Avastars or Bored Apes) can be composed of distinct parts/tokens: a character, a background and items. Using CENNZnet’s State Oracle these composite NFTs could incorporate much more user flexibility, for example altering background, music and items quickly and cheaply.
To do this the main token (the character) would be stored on Ethereum while supporting tokens (backgrounds, music, items) and a mapping are stored on CENNZnet. The mapping shows which supporting tokens are currently active (being displayed) on the avatar NFT. Contracts could be run on CENNZnet to change which supporting tokens are active while the ownership of the whole NFT is verified on Ethereum.
So in essence with the State Oracle, the contract to alter the composite NFT can be run and executed on CENNZnet. The main part of the NFT is still securely stored on Ethereum but users can access more functionality by using CENNZnet’s superior speed.
Summed up the State Oracle means devs can bring together the:
The State Oracle module uses a unique system to achieve an efficient and secure movement of data from one blockchain to another. The sequence goes like this:
The service works by trusting the CENNZnet validators absolutely. There is no benefit to anyone incorrectly answering or challenging the question as they will simply be fined. This type of trust system is called an oracle as a cryptographic proof is not required to provide a trusted answer (aka cryptoeconomic security vs. cryptographic).
The state oracle will be available to all developers on the CENNZnet chain. When deploying a contract, devs will be able to include specific code to run the oracle. More details on this can be found on the CENNZnet GitHub here.