HOW THE CUDOS BLOCKCHAIN WORKS?
CUDOS operates by allowing smart contracts in a layer 1 network to engage the CUDOS smart contract, which resides in the same layer 1 network. This interaction serves two purposes: off-chain computation and accessing external data. The off-chain computation takes place within CUDOS validator nodes, which require a stake of 2,000,000 CUDOS for eligibility. These nodes continuously monitor events in the CUDOS smart contract to detect new requests for computing tasks.
A typical request to the CUDOS smart contract consists of three main elements:
1. Target Identifier: This identifier helps CUDOS nodes determine when to execute a job. It can be a set of hashes identifying individual nodes or a unique identifier used by nodes to decide whether to run the job.
2. App Hash Identifier: The app hash determines which code the CUDOS nodes need to execute. It can refer to an existing app from the CUDOS dapp marketplace or point to an external storage address containing code uploaded by the requester.
3. Inputs: The request may also include inputs required for the code or app running on the nodes. These inputs can be provided directly in the request or as addresses pointing to external storage where the input data is stored.
Once a node identifies the event and decides to perform the work, its WebAssembly executor component is activated. Importantly, listening to the blockchain is an off-chain process, freeing it from blockchain limitations. During execution, the node retrieves the specified inputs and sends relevant API requests to the marketplace and the app to execute the computing task.
After each CUDOS validator node obtains the result, a consensus check may be necessary to provide a unique result to the original smart contract on the layer 1 blockchain that made the request. Once the unique result (or the address storing the result) is determined and sent to the CUDOS smart contract, the original smart contract can retrieve it.
To find out more information about the CUDOS BLOCKCHAIN, kindly visit: https://cudos.org