DDC Concepts

Problem Statement:

The functionalities are separate between DDC core and a number of DDC engines.

DDC Core

The core of DDC is responsible for the following tasks.

This is achieved by a smart contracts, interfaces, and data formats.

DDC Engines

A DDC engine does this:

DDC Core Smart Contract

Cluster

A cluster is the main coordination point between a set of nodes and a set of users.

Governance of a cluster.

There are several decisions required to organize a service around a cluster: - Which providers and which nodes are semi-trusted to provide correct services. - Whether a node should be removed from the cluster, and which new nodes should take on its service responsibilities. - Whether a provider actually did provide correct services and is entitled to payments. - Whether a provider misbehaved and should be penalized or excluded. - To update the cluster metadata if necessary. - To change the governance scheme of the cluster.

A cluster may be managed by a trusted party using an external account, or by a smart contract. A smart-contract-as-manager may in turn take cluster-related decisions by consensus of several accounts in a multisig, by consensus of a community in a DAO or a reputation system, and by cryptonomics such as proof-of-storage based on zero-knowledge crypto, or by connecting to the nominated-proof-of-stake mechanism of the blockchain itself.

Interactions between parties

Providers and Clusters

```mermaid sequenceDiagram actor Provider participant Contract actor Manager

Provider ->> Contract: trusts a manager
Provider ->> Contract: registers his nodes

Manager ->> Contract: discovers and selects nodes
Manager ->> Contract: creates a cluster

loop
    Manager ->> Contract: maintains the cluster
    Contract ->> Provider: distributes payments
end

```

Buckets and Clusters

```mermaid sequenceDiagram actor App

App ->> Contract: discovers and selects a cluster
App ->> Contract: creates a bucket

loop
    App ->> Contract: deposits funds
end

```

Nodes and Apps

```mermaid sequenceDiagram actor App

App ->> Node: requests a service within a bucket
Node ->> Contract: checks the status of the bucket
Node ->> App: serves the request

```

Interactions between contract components

```mermaid graph LR

Bucket[[Bucket]]
Account[Account]
Cluster((Cluster))
Node[(Node)]

Bucket -- is owned by --> Account
Bucket -- uses resources --> Cluster

Cluster -- reserves resources --> Node
Cluster -- takes payments from --> Account

Node -- is owned by --> Account
Cluster -- distributes payments to --> Account

```

An example network

```mermaid graph BT;

Cluster1((Cluster 1)) Cluster1 -. is managed by ..-> Manager1 Cluster1 -- vNode0 --> Node1 Cluster1 -- vNode1 --> Node2 Cluster1 -- vNode2 --> Node1 Cluster1 -- vNode3 --> Node_2

Node1[(Node 1)] Node1 -. is owned by .-> Provider_1

Node2[(Node 2)] Node2 -. is owned by .-> Provider_2

Bucket1[[Bucket 1]] Bucket1 -. is owned by ...-> User1 Bucket1 -- is allocated into --> Cluster_1

```