xGov Beta Architecture
xGov Beta Architecture
This document describes the architecture of the xGov process (Beta).
Specifically, the architecture aims to solve the following main requirement:
The xGov process is a trustless voting system to manage grant proposals funding and polls for the Algorand ecosystem.
The design takes a step towards this end goal, which is a fully decentralized application relying uniquely on a front-end and the Algorand Virtual Machine (AVM).
The current design minimizes the trust model and the off-chain footprint to a few operations, carried out by a back-end controlled by the Algorand Foundation, which could be pushed on the AVM in future iterations.
It is worth noting that the residual trusted off-chain operations are fully accountable on the Algorand public Ledger.
The old xGov process (Alpha) has shown some weaknesses concerning the incentive alignment, the gamification risks of the voting system, and low-quality proposals.
Moreover, the old grant proposal submission and funding mechanism were based on a per-quarter schedule, making the whole process slow and inflexible.
Therefore, a more robust process with a continuous stream of grant proposals, votes, and funding is desirable.
Finally, given the shift of the Algorand protocol towards consensus incentivization, the xGov (Beta) voting power will be based on active consensus participation instead of ALGO locking periods (Alpha).
The xGov Architecture consists of the following components:
| COMPONENT | IMPLEMENTATION |
|---|---|
| xGov Portal | Front-End |
| xGov Registry | Algorand Application (Factory) |
| xGov Treasury | Algorand Application Account |
| xGov Manager | Algorand Address |
| xGov Committee Manager | Algorand Address |
| xGov Daemon | Algorand Address, Back-End + DB |
| xGov Council | Algorand Address |
| xGov Payor | Algorand Address |
| xGov Subscriber | Algorand Address |
| xGov | Algorand Address + Box |
| Managed Subscriber | Algorand Address |
| xGov (Un)Subscription Request | Box |
| xGov Committee | JSON (ARC-86) |
| Proposer | Algorand Address + Box |
| KYC Provider | Algorand Address |
| Proposal | Algorand Application (Child) |
| Proposal Metadata | Box |
| Proposal Escrow | Algorand Application Account |
| Proposal Voters | Boxes |
The on-chain components are used for:
- On/off-boarding xGovs;
- Whitelisting Proposers (KYC required);
- Creating and submitting Proposals;
- Binding xGov Committees to Proposals;
- Voting on Proposals;
- Managing the xGov Treasury and funding approved Proposals.
The off-chain components are used for:
- Selecting xGov Committees periodically and verifiably, according to ARC-86;
- Intermediate Proposers’ KYC;
- Intermediate on/off-boarding of xGovs that cannot execute a self-subscription or self-unsubscription.
The keywords “ MUST”, “ MUST NOT”, “ REQUIRED”, “ SHALL”, “ SHALL NOT”, “ SHOULD”, “ SHOULD NOT”, “ RECOMMENDED”, “ MAY”, and “ OPTIONAL” in this document, are to be interpreted as described in RFC 2119.
The data types (like uint64, byte[], etc.) in this document are to be interpreted as specified in ARC-4.
Note
Notes like this are non-normative
Tip
Sections like this are examples aiming to clarify the specifications.
Sections like this are either pseudo-code or data structures.
The xGov Registry is the orchestrator of the xGov process. It is used to:
- Manage the role-based access control of the process;
- Onboard and offboard xGovs;
- Onboard and enable Proposers (KYC required);
- Create Proposals;
- Bind the xGov Committees to Proposals;
- Vote on Proposals;
- Manage the xGov Treasury and funding approved Proposals.
The xGov Registry is implemented as an Application, deployed by the original xGov\Manager.
The xGov Manager is an Algorand Address controlled by the Algorand Foundation. It represents the root of trust for the xGov process.
The xGov Manager MAY rotate itself.
The xGov Manager MUST provide and MAY update the xGov Committee Manager Address.
The xGov Manager MUST provide and MAY update the xGov Daemon Address.
The xGov Manager MUST provide and MAY update the xGov Council Address.
The xGov Manager MUST provide and MAY update the xGov Payor.
The xGov Manager MUST provide and MAY update the xGov Subscriber Address.
The xGov Manager MUST provide and MAY update the KYC Provider Address.
The xGov Manager MAY pause the xGov Registry.
The xGov Manager MAY pause the creation of new Proposals.
The xGov Manager MAY update the xGov Registry anytime.
The xGov Manager MAY reconfigure the parameters of the xGov Registry.
The xGov Committee Manager is an Algorand Address controlled by the Algorand Foundation.
The xGov Committee Manager SHALL declare the xGov Committee currently in charge on the xGov Registry (see xGov Committee section).
The xGov Daemon is an Algorand Address controlled by the Algorand Foundation (back-end).
The xGov Daemon SHALL assign the xGov Committee currently in charge (voters and their voting power) to open Proposals.
The xGov Daemon SHOULD delete absentees (voters) after Proposals scrutiny.
The xGov Council is an Algorand Address representing a group of elected Councilors.
The xGov Council MUST have an odd number of Councilors.
The xGov Council MUST review approved Proposals (see Proposal review section).
The xGov Council MAY apply a veto against approved Proposals according to the terms and conditions of the xGov process.
The xGov Council majority vote is REQUIRED to apply a veto against approved proposals.
The xGov Payor is an Algorand Address controlled by the Algorand Foundation.
The xGov Payor MAY disburse the requested funds for approved and reviewed Proposals if there are enough funds in the xGov Treasury.
The xGov Payor MAY execute withdrawals of outstanding funds from the xGov\Treasury.
The xGov Subscriber is an Algorand Address controlled by the Algorand Foundation.
The xGov Subscriber MAY onboard or offboard xGovs who cannot execute a self-subscription or self-unsubscription (e.g., due to contract immutability or other restrictions).
The xGov Treasury is an Algorand Address controlled by the xGov Registry.
The xGov Architecture provides the following classes of ARC-28 events:
xGov Registry Events, emitted by the xGov Registry singleton application.
Proposal Events, emitted by the Proposal applications.
Clients can subscribe to these ARC-28 events using the AlgoKit Subscriber Library.
The xGov Architecture source code is released on the official GitHub repository.
Issues can be submitted on the GitHub issues page.
External contributions are welcome. If you would like to contribute, please read these guidelines and consider submitting a Pull Request.
⚠️ Commits must be signed!
The xGov Architecture is implemented in Algorand Python.
Any external contributions MUST:
- Be submitted as a Pull Request.
- Pass the CI/CD pipeline;
- Update the relevant documentation;
- Be approved by the xGov Architecture maintainers.