Skip to content

Design the Oracle component

Description

Click to expand

Who

  1. @safiullahmubashir08 @yitbarekyohannes -- developers;
  2. @kabir.kbr @janaina.senna -- advice and help related to the architecture, reviewers.

What

  1. NuNet Oracle is a NuNet new platform component which implements (at least a part) of Compute API and Tokenomics API;
  2. Most importantly -- and initially NuNet Oracle will be responsible for validating results of compute jobs and solving disputes; As such, the initial implementation will be centralized and governed by NuNet;
  3. Eventually, however, we will want to decentralize this component -- as all the other platform components;
  4. Decentralization of this component means that in the future NuNet will allow different and competing Oracle implementations which can be developed by the community and monetized via NuNet network tokenomics;

How

  1. NuNet Oracle is an off-chain component and is therefore chain-agnostic, as the whole platform -- therefore it will need to communicate with any chain that NuNet will be using (the first one is Cardano);
  2. Interact with the on-chain smart contract / script as discussed and preliminary designed in
  3. For the centralized version, most probably the best would be to run the oracle on the same server as Cardano Node of repective network (dev in this case);
  4. However, please consider comments made by @safiullahmubashir08 here #4 (comment 1148755453) (specifically regarding private keys as well as potential vulnerability to ddos attacs);
    • Regarding privacy / security, we may want to consider implementing it in the firecracker container (?); we could encrypt the container centrally in this case, which makes it somewhat simpler than SPO use-case;
    • Regarding DDoS attacks, we may want to design the component so that it could be scaled up by spawning multiple instances...

Why

  1. In order to build the economy of compute processes, NuNet will have to make sure that compute providers get compensated for correctly executed workflows as well as compute users pay only for the correctly executed work;
  2. Agreements and settlements between all platform constituents (currently compute providers, service providers and users) will be done via NuNet's smart contract and using NTX token; Current implementation uses cardano blockchain and is developed in https://gitlab.com/nunet/tokenomics-api/tokenomics-api-cardano;
  3. In order for the contracts to be finished properly, there will be a need a function / decision / off-chain component that could make a decision about correctness of the work performed and solve disputes;
  4. This component cannot be build into the contract / script in general case, since it is not possible to formally prove correctness of general computing work;
  5. Which means that we need to implement an off-chain component which could interact with on-chain contracts / scripts and provide needed inputs (after verifying computing results and resolving disputes)

When

  1. This issue is related to this #4 (closed) and this #11 (closed)
  2. Start developing as soon as on-chain contract / script is deployed and the first endpoint that needs input from oracle can be accessed;

Acceptance Criteria

Click to expand
  1. Oracle component designed;
  2. Oracle component implemented as per design;
  3. Correctly interacts with on-chain scripts;
  4. All implemented functions exposed via Tokenomics and Compute APIs.

Work Breakdown Structure (WBS)

Task Description Duration Status Start Date End Date Comment
A Implement the off-chain signing process 8 Hrs Done
B Update the smart contract to redeem the singed string 72 Hrs Doing
Edited by Safi Ullah