Each data union has one admin who is the owner of the data union. The admin is responsible for maintaining the Data Union, including ensuring good data quality and removing members who are not contributing data.

An admin is not automatically a member of the Data Union.

Any function of the SDK that changes the state of the contract has to get called by the admin address.

Admin Fee

The admin gets incentivized to maintain the data union by the admin fee parameter, a fraction of the incoming data union revenue. Admins have control over this fee parameter. Members agree to it by joining the data union. Previous earnings are not affected by changing the admin fee.

const tx = await dataUnion.setAdminFee(VALUE_BETWEEN_0_AND_1);

const adminFee = await dataUnion.getAdminFee();

Transfer Ownership

The data union smart contract inherits an Ownable.sol contract that handles the ownership of the data union. The account that deploys the contract is the initial owner/admin of the contract.

The role can be reassigned to someone else or even performed by the members themselves via a DAO governed wallet.

Transfer the ownership with a direct contract transaction.

1️⃣ Call transferOwnership($newAddress)

2️⃣ Call claimOwnership() while your wallet is connected with the $newAddress

How to call contract functions:

Data Union Metadata

Store information about your data union in a JSON file on-chain inside the contract. For example you can store a DAO manifesto, a name or anything else you can think of.

const tx = await dataUnion.setMetadata(
    {"name": "awesome DU", "maintainer": ["josh#4223", "marc#2324"]}

const metadata = await dataUnion.getMetadata();

Member Stipend

Automate sending tokens to new members. The parameter stipendWei determines how many tokens should get send to every new data union member.

The stipend will be paid by the contract balance in the native token (e.g. MATIC, xDAI or ETH).

Be careful with this. We highly recommend to carefully monitor who is joining the data union. An attacker could join with multiple wallets until the contract wallet is empty.

const tx = await dataUnion.setNewMemberStipend($amount_as_wei);

const memberStipend = await dataUnion.getNewMemberStipend();

Adding Modules

// coming soon

Last updated