Skip to content

Commit

Permalink
Add docs and specs
Browse files Browse the repository at this point in the history
  • Loading branch information
amaury1093 committed Nov 16, 2022
1 parent 0d123fc commit fcaaee5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
13 changes: 13 additions & 0 deletions x/group/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@ A threshold decision policy defines a threshold of yes votes (based on a tally
of voter weights) that must be achieved in order for a proposal to pass. For
this decision policy, abstain and veto are simply treated as no's.

This decision policy also has a VotingPeriod window and a MinExecutionPeriod
window. The former defines the duration after proposal submission where members
are allowed to vote, after which tallying is performed. The latter specifies
the minimum duration after proposal submission where the proposal can be
executed. If set to 0, then the proposal is allowed to be executed immediately
on submission (using the `TRY_EXEC` option). Obviously, MinExecutionPeriod
cannot be greater than VotingPeriod+MaxExecutionPeriod (where MaxExecution is
the app-defined duration that specifies the window after voting ended where a
proposal can be executed).

#### Percentage decision policy

A percentage decision policy is similar to a threshold decision policy, except
Expand All @@ -117,6 +127,9 @@ It's more suited for groups where the group members' weights can be updated, as
the percentage threshold stays the same, and doesn't depend on how those member
weights get updated.

Same as the Threshold decision policy, the percentage decision policy has the
two VotingPeriod and MinExecutionPeriod parameters.

### Proposal

Any member(s) of a group can submit a proposal for a group policy account to decide upon.
Expand Down
3 changes: 2 additions & 1 deletion x/group/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ type DecisionPolicy interface {
// votes are accepted.
GetVotingPeriod() time.Duration
// GetMinExecutionPeriod returns the minimum duration after submission
// where we can execution a proposal.
// where we can execution a proposal. It can be set to 0 or to a value
// lesser than VotingPeriod to allow TRY_EXEC.
GetMinExecutionPeriod() time.Duration
// Allow defines policy-specific logic to allow a proposal to pass or not,
// based on its tally result, the group's total power and the time since
Expand Down

0 comments on commit fcaaee5

Please sign in to comment.