## Keyboard shortcuts

Press `←` or `→` to navigate between chapters

Press `S` or `/` to search in the book

Press `?` to show this help

Press `Esc` to hide this help

- Auto
- Light
- Dark

# xGov Beta Architecture

A Proposal is a funding request from the xGov Treasury, which is approved or rejected by the xGov Committee vote and reviewed by the xGov Council.

A Proposal consists of:

- Proposal Application, with **REQUIRED** data;
- Proposal metadata.

The Proposal Application is created and funded by the xGov Registry App (see [Creation section](https://docs.xgov.algorand.co/specs/proposal-creation)) through the Open Proposal Fee.

The Proposal life cycle has four phases:

1. [Creation](https://docs.xgov.algorand.co/specs/proposal-creation);
2. [Discussion](https://docs.xgov.algorand.co/specs/proposal-submission#discussion) & [Submission](https://docs.xgov.algorand.co/specs/proposal-submission#submission);
3. [Vote](https://docs.xgov.algorand.co/specs/proposal-vote) & [Review](https://docs.xgov.algorand.co/specs/proposal-vote#review);
4. [Finalization](https://docs.xgov.algorand.co/specs/proposal-finalization).

The Proposals have two different _funding types_:

1. **Retroactive**  
   - Claim: _“I have done X, which has benefited the Algorand ecosystem because of Y metrics, I would like to receive Z as compensation for the work”_.  
   - Positive outcome: funding is immediately disbursed if the Proposal is approved by the xGov Committee vote, and the xGov Council does not apply a veto according to the terms and conditions.

2. **Proactive** (NOT AVAILABLE YET)  
   - Claim: _“I want to do X, it has the potential Y for the Algorand ecosystem, I would like to receive Z staggered behind these milestones”_.  
   - Positive outcome: funding will be disbursed if the Proposal is approved by the xGov Committee vote, after milestone reviews from the xGov Council, and if the xGov Council does not apply a veto according to terms and conditions.

The Proposal’s _requested amount_ (AA) **MUST** be bounded as follows:

|  | Small | Medium | Large |
| --- | --- | --- | --- |
| Requested Amount | Amin≤A<AS,maxAmin≤A<AS,max | AS,max≤A<AM,maxAS,max≤A<AM,max | AM,max≤A≤AL,maxAM,max≤A≤AL,max |

Proposals have different _funding sizes_ based on the _requested amount_ of funds.

The _funding size_ defines the timing of the Proposal lifecycle.

|  | Small | Medium | Large |
| --- | --- | --- | --- |
| Discussion time | DSDS | DMDM | DLDL |
| Voting time (after discussion) | VSVS | VMVM | VLVL |

> Note  
> Refer to the [Proposal implementation configuration](https://docs.xgov.algorand.co/implementation/configuration) for the Proposal lifecycle timing values.

Proposals have two _quorum thresholds_ based on the _requested amount_ of funds.

The _quorum thresholds_ define the minimum number of (regular and weighted) votes required to approve a Proposal:

- T(A)T(A), Democratic Quorum Threshold (`1` xGov, `1` Vote);
- Tw(A)Tw(A), Weighted Quorum Threshold (`1` xGov, `w` Votes).

Given the xGov Committee assigned to the Proposal, with its members and voting power (see the [xGov Committee definition](https://docs.xgov.algorand.co/specs/xgov-committee)), the quorum thresholds are defined as follows:

- T(A)=Members(Comm)×Q(A)T(A)=Members(Comm)×Q(A), with  
  Q(A)=Qmin+ΔQΔA×(A−Amin)Q(A)=Qmin+ΔQΔA×(A−Amin)

- Tw(A)=Votes(Comm)×Qw(A)Tw(A)=Votes(Comm)×Qw(A), with  
  Qw(A)=Qw,min+ΔQwΔA×(A−Amin)Qw(A)=Qw,min+ΔQwΔA×(A−Amin)

Where:

- Qmin=Q(Amin)Qmin=Q(Amin)  
- Qmax=Q(AL,max)Qmax=Q(AL,max)  
- Qw,min=Qw(Amin)Qw,min=Qw(Amin)  
- Qw,max=Qw(AL,max)Qw,max=Qw(AL,max)  
- ΔQ=Qmax−QminΔQ=Qmax−Qmin  
- ΔQw=Qw,max−Qw,minΔQw=Qw,max−Qw,min  
- ΔA=AL,max−AminΔA=AL,max−Amin

> Note  
> Refer to the [Proposal implementation configuration](https://docs.xgov.algorand.co/implementation/configuration) for the minimum and maximum quorum values.

The Proposal Metadata byte length **MUST NOT** exceed 30 kB.

The Proposal Metadata is stored in a Box on the Proposal Application, called _Metadata_ Box.

The Proposal Metadata Box ID is equal to `metadata`.

The Proposal Metadata Box body has no ABI schema (raw bytes).

A Proposal **SHALL** be in one of the following enumerated statuses:

| Status | Enum | Description |
| --- | --- | --- |
| `EMPTY` | `0` | The xGov Registry creates an empty proposal, the Proposer **SHOULD** open a draft (or it **SHOULD** be finalized for staleness) |
| `DRAFT` | `10` | The Proposer **MAY** submit (with updated metadata) or drop the draft (or it **SHOULD** be finalized for staleness) |
| `SUBMITTED` | `20` | The xGov Daemon **SHALL** assign the xGov Committee to the submitted proposal, which is then opened to vote |
| `VOTING` | `25` | The xGov Committee **MAY** vote the proposal until the voting session expires |
| `APPROVED` | `30` | The outcome of the vote scrutiny (quorum and majority) approved the proposal, the absentees **SHALL** be deleted, the xGov Council **SHALL** review it |
| `REJECTED` | `40` | The outcome of the vote scrutiny (quorum and majority) rejected the proposal, the absentees **SHALL** be deleted, it **SHOULD** be finalized |
| `REVIEWED` | `45` | The xGov Council positively reviewed the approved proposal (T&C, etc.), the locked amount **MUST** be returned to the Proposer, the xGov Payor **MAY** disburse the requested amount |
| `BLOCKED` | `60` | The xGov Council blocked the approved proposal with veto, it **SHOULD** be finalized, the locked amount **MUST** be slashed, the requested amount **MUST NOT** be paid |
| `FUNDED` | `50` | The xGov Payor paid the requested amount, it **SHOULD** be finalized |
| `FINALIZED` | `bool` | The proposal life cycle is terminated and **MAY** be deleted |

> Note  
> The `FINALIZED` boolean flag is not an enumerated state, since it can be superposed to several states (i.e., `EMPTY`, `DRAFT`, `REJECTED`, `BLOCKED`, and `FUNDED`).  
> Example: a Proposal can be `FUNDED` and `FINALIZED`.
