Skip to content
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .env.localnet.template
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ TEST_XGOV_DAEMON=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ
# XGOV_CFG_MAX_REQUESTED_AMOUNT=25_000_000_000,100_000_000_000,200_000_000_000 # 25K (S), 100K (M), 250K (L) ALGO in microALGO
# XGOV_CFG_DISCUSSION_DURATION=1_814_400,1_814_400,1_814_400,2_419_200 # 3 (S), 3 (M), 3 (L), 4 (XL) weeks in seconds
# XGOV_CFG_VOTING_DURATION=604_800,604_800,1_209_600,2_419_200 # 1 (S), 1 (M), 2 (L), 4 (XL) weeks in seconds
# XGOV_CFG_QUORUM=3_000,5_000,7_000 # 30 (S), 50 (M), 70 (L) % in bps
# XGOV_CFG_WEIGHTED_QUORUM=5_000,6_000,7_000 # 50 (S), 60 (M), 70 (L) % in bps
# XGOV_CFG_QUORUM=3_000,0,7_000 # 30 (S), 0 (M), 70 (L) % in bps
# XGOV_CFG_WEIGHTED_QUORUM=5_000,0,7_000 # 50 (S), 0 (M), 70 (L) % in bps
## Lenient
XGOV_CFG_XGOV_FEE=1_000_000 # 1 ALGO in microALGO
XGOV_CFG_PROPOSER_FEE=1_000_000 # 1 ALGO in microALGO
Expand All @@ -31,5 +31,5 @@ XGOV_CFG_MIN_REQUESTED_AMOUNT=1_000_000 # 1 ALGO in microALGO
XGOV_CFG_MAX_REQUESTED_AMOUNT=10_000_000,20_000_000,30_000_000 # 10 (S), 20 (M), 30 (L) ALGO in microALGO
XGOV_CFG_DISCUSSION_DURATION=60,60,60,60 # 1 (S), 1 (M), 1 (L), 1 (XL) minutes in seconds
XGOV_CFG_VOTING_DURATION=3_600,3_600,3_600,3_600 # 1 (S), 1 (M), 1 (L), 1 (XL) hours in seconds
XGOV_CFG_QUORUM=500,1_000,2_000 # 5 (S), 10 (M), 20 (L) % in bps
XGOV_CFG_WEIGHTED_QUORUM=500,1_000,2_000 # 5 (S), 10 (M), 20 (L) % in bps
XGOV_CFG_QUORUM=500,0,2_000 # 5 (S), 0 (M), 20 (L) % in bps
XGOV_CFG_WEIGHTED_QUORUM=500,0,2_000 # 5 (S), 0 (M), 20 (L) % in bps
4 changes: 2 additions & 2 deletions .github/workflows/xgov-beta-sc-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,5 @@ jobs:
XGOV_CFG_MAX_REQUESTED_AMOUNT: ${{ vars.MAX_REQUESTED_AMOUNT || '10_000_000,20_000_000,30_000_000' }} # defaults: 10 (S), 20 (M), 30 (L) ALGO in microALGO
XGOV_CFG_DISCUSSION_DURATION: ${{ vars.DISCUSSION_DURATION || '60,60,60,60' }} # defaults: 1 (S), 1 (M), 1 (L), 1 (XL) minute in seconds
XGOV_CFG_VOTING_DURATION: ${{ vars.VOTING_DURATION || '3_600,3_600,3_600,3_600' }} # defaults: 1 (S), 1 (M), 1 (L), 1 (XL) hours in seconds
XGOV_CFG_QUORUM: ${{ vars.QUORUM || '500,1_000,2_000' }} # defaults: 5 (S), 10 (M), 20 (L) % in bps
XGOV_CFG_WEIGHTED_QUORUM: ${{ vars.WEIGHTED_QUORUM || '500,1_000,2_000' }} # defaults: 5 (S), 10 (M), 20 (L) % in bps
XGOV_CFG_QUORUM: ${{ vars.QUORUM || '500,0,2_000' }} # defaults: 5 (S), 0 (M), 20 (L) % in bps
XGOV_CFG_WEIGHTED_QUORUM: ${{ vars.WEIGHTED_QUORUM || '500,0,2_000' }} # defaults: 5 (S), 0 (M), 20 (L) % in bps
10 changes: 4 additions & 6 deletions docs/implementation/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
| Voting duration Small | \\( 1 \\) | Week | \\( 604{,}800 \\) | seconds |
| Voting duration Medium | \\( 1 \\) | Week | \\( 604{,}800 \\) | seconds |
| Voting duration Large | \\( 2 \\) | Week | \\( 1{,}209{,}600 \\) | seconds |
| Quorum Small | \\( 30 \\) | % | \\( 3{,}000 \\) | bps |
| Quorum Medium | \\( 50 \\) | % | \\( 5{,}000 \\) | bps |
| Quorum Large | \\( 70 \\) | % | \\( 7{,}000 \\) | bps |
| Weighted Quorum Small | \\( 50 \\) | % | \\( 5,000 \\) | bps |
| Weighted Quorum Medium | \\( 60 \\) | % | \\( 6,000 \\) | bps |
| Weighted Quorum Large | \\( 70 \\) | % | \\( 7,000 \\) | bps |
| Quorum Min | \\( 30 \\) | % | \\( 3{,}000 \\) | bps |
| Quorum Max | \\( 70 \\) | % | \\( 7{,}000 \\) | bps |
| Weighted Quorum Min | \\( 50 \\) | % | \\( 5{,}000 \\) | bps |
| Weighted Quorum Max | \\( 70 \\) | % | \\( 7{,}000 \\) | bps |
8 changes: 4 additions & 4 deletions docs/specs/proposal-vote.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ Vote **SHALL NOT** be modified.

A Submitted Proposal is Approved _if and only if_ all the following conditions hold:

- A category-dependent _democratic quorum_ of all xGov Committee (one xGov, one vote)
is reached. _“Null”_ votes **affect** this quorum.
- A _democratic quorum_ of all xGov Committee (one xGov, one vote) is reached. _“Null”_
votes **affect** this quorum.

- A category-dependent _weighted quorum_ of all xGov Committee voting power is reached.
_“Null”_ votes **affect** this quorum.
- A _weighted quorum_ of all xGov Committee voting power is reached. _“Null”_ votes
**affect** this quorum.

- The _relative majority_ of _“Approve”_ over _“Reject”_ votes is reached. _“Null”_
votes **do not affect** the relative majority.
Expand Down
31 changes: 26 additions & 5 deletions docs/specs/proposal.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,38 @@ The Proposals have two different _funding types_:

Proposals have different _funding sizes_ based on the requested funding amount.

The _funding size_ defines the timing of the Proposal lifecycle and the voting quorums.
The Proposal’s _requested amount_ (\\( A \\)) **MUST** be bounded as follows:

The Proposal’s requested amount (\\( A \\)) **MUST** be bounded as follows:
| | Small | Medium | Large |
|:-------------------------------|:----------------------------------:|:-----------------------------------:|:-----------------------------------:|
| Requested Amount | \\( A_\min ≤ A < A_{S,\max} \\) | \\( A_{S,\max} ≤ A < A_{M,\max} \\) | \\( A_{M,\max} ≤ A ≤ A_{L,\max} \\) |

The _funding size_ defines the timing of the Proposal lifecycle.

| | Small | Medium | Large |
|:-------------------------------|:-------------------------------:|:-----------------------------------:|:-----------------------------------:|
| Requested Amount | \\( A_\min ≤ A < A_{S,\max} \\) | \\( A_{S,\max} ≤ A < A_{M,\max} \\) | \\( A_{M,\max} ≤ A < A_{L,\max} \\) |
| Discussion time | \\( D_S \\) | \\( D_M \\) | \\( D_L \\) |
| Voting time (after discussion) | \\( V_S \\) | \\( V_M \\) | \\( V_L \\) |
| Democratic Quorum | \\( Q_{d,S} \\) | \\( Q_{d,M} \\) | \\( Q_{d,L} \\) |
| Weighted Quorum | \\( Q_{w,S} \\) | \\( Q_{w,M} \\) | \\( Q_{w,L} \\) |

The _requested amount_ defines voting quorums of the Proposal as follows:

- \\( Q(A) \\, Democratic Quorum (1 xGov, 1 Vote)

$$
Q(A) = Q_\min + \frac{\Delta Q}{\Delta A} \times (A - A_\min)
$$

- \\( Q_w(A) \\, Weighted Quorum

$$
Q_w(A) = Q_{w,\min} + \frac{\Delta Q_w}{\Delta A} \times (A - A_\min)
$$

Where:

- \\( \Delta Q = Q_\max - Q_\min \\)
- \\( \Delta Q_w = Q_{w,\max} - Q_{w,\min} \\)
- \\( \Delta A = A_{L,\max} - A_\min \\)

{{#include ../_include/styles.md:note}}
> Refer to the [Proposal implementation configuration](../implementation/configuration.md)
Expand Down
6,101 changes: 2,934 additions & 3,167 deletions smart_contracts/artifacts/proposal/Proposal.approval.puya.map

Large diffs are not rendered by default.

Loading
Loading