OSx

The Contracts Behind the Protocol

The Aragon OSx protocol is the foundation layer of the new Aragon stack. It allows users to create, manage, and customize DAOs in a way that is lean, adaptable, and secure.

The Aragon OSx protocol provides three primitives for users to build their organization:

  • DAO contract: the main body and identity of your organization containing the core functionality. It holds your assets, executes actions, and manages permissions.

  • Permissions: define relationships between plugins, DAOs, and other addresses.

  • Plugins: provide custom functionality for your organization and are managed in on-chain plugin repositories. They can be plugged in and out into your DAO without writing or deploying any contract code yourself.

Through permissions and plugins, DAO builders are able to build and customize their DAO to suit their needs.

Developers can implement their own plugin by inheriting from one of our plugin base classes, writing a plugin setup and publishing it in an on-chain plugin repository.

To facilitate this, Aragon OSx runs a set of framework contracts:

  • DAO Factory and registry contract: create and curate DAOs.

  • Plugin repo factory and registry contract: create and version plugin repositories.

  • Plugin Setup Processor contract: sets up plugins from a plugin repository in a DAO (installation, update, uninstallation).

The Aragon OSx DAO Framework

The Aragon OSx protocol is a DAO framework structured as follows:

aragon os framework overview.drawio

Overview of the Aragon OSx protocol with its structural components and their responsibilities: the governance layer constituted by the framework DAO, the code layer including the framework and core contracts, which depends on external libraries and services

Code Layer

The foundation of the Aragon OSx protocol is the code layer constituted by the framework and core related contracts. The Core contracts provide the core primitives intended to be used by users and implemented by developers of the DAO framework. The Framework contracts provide the infrastructure to easily create and manage your DAOs and plugins easy. Both are built on top of external dependencies, most notably the OpenZeppelin and the Ethereum Name Service (ENS) contracts.

The core and framework contracts are free to use, and no additional fees are charged.

Governance Layer

To govern the framework infrastructure, an Aragon OSx Framework DAO is deployed constituting the governance layer of the Aragon OSx protocol.

In the next sections, you will learn more about the individual components of the framework.

Getting Started

Users interact with the Aragon OSx protocol through the Aragon App, Aragon SDK or directly calling on the protocol contracts - as well as through any third-party projects built using our stack.

To add the contracts to your project, open a terminal in the root folder of your Solidity project and run:

yarn add @aragon/osx

Then, to use the contracts within your project, import the contracts through something like:

// contracts/Box.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// Import Auth from the access-control subdirectory
import "./access-control/Auth.sol";

contract Box {
    uint256 private _value;
    Auth private _auth;

    event ValueChanged(uint256 value);

    constructor() {
        _auth = new Auth(msg.sender);
    }

    function store(uint256 value) public {
        // Require that the caller is registered as an administrator in Auth
        require(_auth.isAdministrator(msg.sender), "Unauthorized");

        _value = value;
        emit ValueChanged(value);
    }

    function retrieve() public view returns (uint256) {
        return _value;
    }
}

Customize your DAO

DAO Plugins are the best way to customize your DAO. These are modular extendable pieces of software which you can install or uninstall from your DAO as it evolves and grows. In the following sections, we’ll dive deeper into this topic. You can take a quick look in the Guide: Developing a Plugin.

Walkthrough

This documentation is divided into conceptual and practical sections as well as the reference guide.