# Intro to Data Unions

## 🧱 Fundamentals

<details>

<summary>What is a data union?</summary>

A Data Union is an **organization with an application** where individuals participate in the creation of valuable data. Members generate data through the data unions' application which crowdsources data. \
\
That **data is offered as a product on a marketplace** for potential buyers. The money from data sales is used to reward its members for providing valuable data.&#x20;

</details>

<details>

<summary>Why build a data union?</summary>

With a data union you **enable your users to be included in earning value from their data**.&#x20;

By building a Data Union, your users are **incentivized to use your app** as they are **rewarded with tokens for sharing their data through your app**.

Building a **data union is a great way to collect datasets that may otherwise be difficult to source**. Some examples include **real-time health data, web user data, pollution monitoring, smart city data** and more.

</details>

<details>

<summary>Existing data unions</summary>

Here are three **real-life examples** of what a Data Union could look like:\
\
💻  **Swash** - a browser extension that monetizes browsing data.\
\
🚙  **DIMO** - an IoT device and app for smart cars that monetizes vehicle data.\
\
🏦  **Unbanx** - a mobile app that monetizes banking data.\
\
**Read more** [**here**](#existing-data-unions)

</details>

## The Data Union Framework

The Data Union framework **powers applications that incentivize people** to participate in the crowdsourcing of valuable data. It **enables people to** **earn with their data.**

**Smart contracts and decentralized networks** are used to transfer tokens and data. It is the infrastructure that powers data unions.

The framework is a token distributer and a member manager.

### **Framework Infrastructure**

{% hint style="success" %}

#### [**Data Union Smart Contract**](https://github.com/dataunions/data-unions/blob/main/packages/contracts/contracts/unichain/DataUnionTemplate.sol)

for the **distribution of data sales** between **members**, the **Data Union admin,** and the **Data Union DAO**.&#x20;

The **smart contract** handles:

* data price/data sells
* admin fee (royalties from sold data to the contract owner, i.e. Data Union admin)
* distributing and withdrawing earnings
* member management
* ownership
  {% endhint %}

{% hint style="success" %}
**Your Data Union Application/Device**

This is **your client application/device** **that provides the data**. Ideally, it's an application with a **continuous flow of data coming from the client**. For example, a temperature measurement, browsing data, or user behavior.&#x20;

Check out some existing data unions for more examples [here](https://docs.dataunions.org/resources/existing-data-unions).
{% endhint %}

{% hint style="success" %}

#### **EVM Chain (token transfer)** <a href="#supported-sidechains" id="supported-sidechains"></a>

an EVM compatible **sidechain of your choice for the transfer of money** (i.e. tokens). The transfer of tokens is visualized with the **red arrow** in the illustration below.

We currently support **Polygon** and **Gnosis Chain**.
{% endhint %}

{% hint style="success" %}

#### Streamr Network (data transfer) OPTIONAL

a peer-to-peer network for the **transfer of real-time data**.

All the client data gets published to a data stream that flows through the Streamr network. We visualized the data stream with the **black arrow** in the illustration below.&#x20;

The official documentation of Streamr can be found [here](https://streamr.network/docs/welcome).
{% endhint %}

<figure><img src="https://4026678538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlFT4aCdsM4ZVBSo6Uqjx%2Fuploads%2FrKj2KYaJ14nekWwNPUEH%2FGitbook%20figure.png?alt=media&#x26;token=14b60c5b-8b75-4214-8190-cc139653b9d3" alt=""><figcaption><p>An overview of the Data Union framework infrastructure</p></figcaption></figure>

### **Workflow of the Data Union framework infrastructure with Streamr**

1. User joins a Data Union
2. User grants permission and consent to the data union to have their data monetized&#x20;
3. Data is created and crowd-sourced through the Data Unions' application
4. Data flows through Streamr Network into the marketplace
5. Data is bundled as a product for sale on data marketplaces&#x20;
6. Data is bought by a buyer&#x20;
7. Revenue from data sales flows through the smart contracts via the EVM-chain of your choice and is split between the members, the data union admin and the DU DAO (1%).

{% hint style="info" %}
**The more active members**/data providers in a Data Union **the more valuable** it becomes to potential data buyers/data subscribers.
{% endhint %}

{% hint style="info" %}
A Data Union **earns a percentage of the data sale** for maintaining and growing the organization and its members. That percentage can be set anywhere **from 0% to 100%** (although it is usually around 30%). The Data Union DAO **(DU DAO) receives a 1%** **protocol tax** from data sales for providing the Framework and for growing the Data Union ecosystem.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dataunions.org/getting-started/intro-to-data-unions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
