Skip to main content

User types

The governance system comprises four main user roles, each with specific rights and responsibilities.

Viewer (not registered user)

Description:
Viewers can access governance information without needing to register or authenticate.

Rights:

  • View active and past proposals.
  • Observe voting results and proposal outcomes.
  • Explore the governance structure and system documentation.

Restrictions:

  • Viewers cannot vote or create proposals.
  • They have no influence on governance decisions.

Citizen

Description:
Citizens are registered users who meet the system requirements as verified by the can_register function (e.g., CHR token balance). Upon registration, a governance account and an FT4 account are created automatically.

Rights:

  • Create and submit proposals.
  • Vote on proposals if eligible.
  • Participate in governance discussions.

Restrictions:

  • Citizens must adhere to cooldown periods between proposal submissions.
  • They must meet registration criteria.
  • Citizens cannot approve or veto proposals unless they are assigned the roles of counselor or admin.

Counselor (moderator)

Description:
Counselors are citizens promoted by an admin or via a proposal command (e.g., make_counselor). They serve as moderators and validators.

Rights:

  • All the rights of citizens, plus:
    • Approve proposals during validation.
    • Veto proposals within the designated veto period.
    • Participate in higher-level governance decisions.

Restrictions:

  • Counselors must adhere to a cooldown period for veto actions.
  • They cannot override system configurations or execute commands without admin approval.

Admin

Description:
Admins are the highest authority within the governance system, usually comprising developers or owners of the governance dapp.

Rights:

  • Full control over governance settings, including:
    • Configuring voting rules and cooldown periods.
    • Managing proposal creation and validation parameters.
    • Approving or vetoing proposals directly.
    • Forcing the conclusion of voting or veto periods.
    • Executing commands from approved proposals.
    • Assigning or revoking counselor roles.

Restrictions:

  • While there are no technical limitations, actions should conform to governance principles to maintain trust.

Adding a new user type

User types can be added using the create_user_type function:

citizens.create_citizen_type("PROVIDER");

Updating an existing user type

As an admin, you can also update an existing user type by calling the update_citizen_type operation, or you can override the can_update_citizen_type function to change the access control of this operation.

operation update_citizen_type(account_id: byte_array, new_type: text) {
val signer = citizens.ft4_auth.authenticate();
val citizen_type = citizens.citizen_types @ { .name == new_type };
citizens.can_update_citizen_type(signer, account_id, citizen_type);
citizens.update_citizen_type(account_id, citizen_type);
}