LogoLogo
  • 🚀getting started
    • Intro to Data Unions
    • Build a Data Union
      • 1️Installation And Deployment
      • 2️Integration
    • Build a Data Union with Streamr
      • 1️Create A Data Stream
      • 2️Deploy A Data Union With Streamr Core
      • 3️Integrate Data Union & Stream
      • 4️Publish to Streamr Marketplace
    • Glossary of Terms
  • 📚Main Concepts
    • Roles and Responsibilities
      • 🧑‍💻Admin
      • 🤵JoinPart Agents
      • 🙋Member
      • 🧑‍🔧Protocol Beneficiary
    • Join Server
    • Contract Functions
    • Manage Wallets And Earnings
    • Data Union Observation
    • Add Your Own Token
    • Custom Modules
  • 🧐Resources
    • Existing Data Unions
    • Framework Governance
    • Data Unions UX Best Practices
  • ❓Questions?
    • Ask us on Discord
Powered by GitBook
On this page
  • Admin Fee
  • Transfer Ownership
  • Data Union Metadata
  • Member Stipend
  • Adding Modules

Was this helpful?

  1. Main Concepts
  2. Roles and Responsibilities

Admin

PreviousRoles and ResponsibilitiesNextJoinPart Agents

Last updated 2 years ago

Was this helpful?

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 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

📚
🧑‍💻
Ownable.sol contract
Contract Functions