Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 97 additions & 57 deletions tools/dataProtector/dataProtectorSharing.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,97 @@
# DataProtector Sharing

The DataProtector Sharing module includes a set of methods for distributing and
monetizing your protected data. These work seamlessly in your own applications
in a way that's transparent to end users. The Sharing module supports the
following options for distributing a user's protected data:

- Sharing freely with other users
- Renting data for a pre-determined period of time
- Providing access for a recurring subscription fee
- Selling ownership of the data

Once access is obtained through one of these distribution methods, the `consume`
methods allow interaction with the protected data. The application designer uses
these methods to securely retrieve data from IPFS and decrypt it on the client
side. This ensures only the consumer gains access to the data.

## How does it work?

The user's protected data is managed by a special Data Sharing smart contract.
This smart contract enforces the user's desired sharing paradigm. Protected data
is bundled by the user into one or more collections. Within the collection, the
user may specify different sharing options for different pieces of data. This
illustration shows the hierarchy of a Data Sharing smart contract:

![Data Sharing smart contract](./dataProtectorSharing/data-sharing-sc.png)

The Data Sharing smart contract enforces governance over the user's protected
data based on their desired distribution choices. The user has complete control
over the mode of sharing for each Collection and each Protected Data contained
in their collections.

The smart contract also protects the consumer of a user's data. If a consumer
rents access to a video clip, for example, even if the owner of the video clip
removes the rental option, the renter maintains their access for the duration of
the rental period.

## How does this differ from `DataProtector Core`?

With `DataProtector Core` you must grant each consumer individual access to your
protected data. This has several prerequisites:

- The data owner must know the consumer's Ethereum address
- The data owner must sign a transaction at the moment you grant the access
- The data owner must define the number of times the consumer can access the
data up front

With `DataProtector Sharing` a user can easily distribute their protected data
to a wider audience. The user authorizes distribution channels up front and
consumers of the data trigger smart contracts on their own, requiring no
additional activity from the data owner. This has several key benefits

- The data owner doesn't need to know the consumer's Ethereum address
- The data owner doesn't need to sign a transaction at the moment of
distribution, only the consumer of the data signs their transaction
- The data owner doesn't manage access, the Data Sharing smart contract
automatically enforces the distribution and monetization choices
**Data Sharing – Collection Methods**

A **collection** is a way to group protected data for distribution through the Data Sharing module. The Data Sharing smart contract operates on data within these collections. Data must be organized into a collection before selecting a distribution method, and data owners can manage multiple collections simultaneously.

---

### **Distribution Options**

Depending on how you want to share your data, you can choose from these options:

---

### **1. Not Distributed**
**Definition:** Only *you* (the data owner) can view the data.

**Example:**
You’re developing a new research report. It’s not ready to share yet, so you keep it private in your collection until it’s complete.

---

### **2. Free**
**Definition:** You let others access the data for free, possibly for a limited time.

**How It Works:**
- Similar to renting but with **no payment required**.
- Can be time-limited, like a promotional giveaway.

**Example:**
You’re launching a new app and want to promote it. You offer a free dataset for 7 days to attract new users. After 7 days, access expires unless you extend it.

---

### **3. For Rent**
**Definition:** Others can pay to access your data for a limited time.

**How It Works:**
- **One-time payment** for a fixed rental period.
- **Guaranteed access** during the rental period, even if the owner de-lists the data.
- **Renewal** requires a new payment based on the latest terms.

**Example:**
You have a database of market trends. A company pays $100 to access it for 30 days. Even if you change the price or remove the data, they retain access until the 30 days are up.

---

### **4. Included in Subscription**
**Definition:** Data can be bundled into subscription plans where users pay regularly for continuous access.

**How It Works:**
- **Recurring payments** (monthly, annually, etc.).
- **Bundled access** to all data in the subscription.
- Owners can **add new data** anytime, but cannot **remove existing data** if there are active subscribers.

**Example:**
You run a subscription service where members pay $50/month for premium reports. As long as they keep paying, they get access to all the reports. You can add new reports anytime, but you can’t remove existing ones if people are subscribed.

---

### **5. Both For Rent and Included in Subscription**
**Definition:** Data can be available for both rental and subscription simultaneously.

**How It Works:**
- Users can choose to **rent** data temporarily or **subscribe** for ongoing access.

**Example:**
You have an advanced analytics report:
- Company A rents it for $200 for one month.
- Company B subscribes to your service for $50/month and gets the same report along with other data.

---

### **6. For Sale**
**Definition:** Data is sold outright for a one-time payment, with **permanent access**.

**How It Works:**
- Data ownership transfers to the buyer.
- No time restrictions after purchase.

**Example:**
You create a unique digital artwork (like an NFT). You sell it for $500. Once purchased, the buyer owns it permanently.

---

### **Key Differences Between Rent and Subscription**

| **Aspect** | **Rent** | **Subscription** |
|-------------------|-------------------------------------------------------|--------------------------------------------------------|
| **Access Type** | Temporary access for a fixed period. | Ongoing access as long as payments are made. |
| **Payment Model** | One-time payment per rental. | Recurring payments (e.g., monthly). |
| **Duration** | Fixed; access ends when the rental term expires. | Continuous; access until the subscription is canceled. |
| **Flexibility** | Users must renew manually. | Auto-renewal for uninterrupted access. |
| **Content Changes** | Data remains unchanged during rental. | New data can be added, but existing data cannot be removed if active subscribers exist. |

---