Expand description
Defines a unified abstraction layer for managing role-based logic within a runtime system.
It provides trait-based contracts that describe the lifecycle, funding, and economic behaviors of entities that assume specific roles, such as:
- Validators and collators
- Governance council members
- Oracle operators or data feeders
- Curators, auditors, or relayers
§Overview
Each trait in this module represents a composable building block for defining how a role behaves in a decentralized system. These abstractions are designed to be generic, interoperable, and extensible across multiple pallets or runtime modules.
§Currently Included Traits
RoleManager- Core lifecycle and collateral management for role-bearing entities.FundRoles- ExtendsRoleManagerwith backing and funding capabilities.CompensateRoles- ExtendsRoleManagerwith reward and penalty mechanics.RoleProbation- ExtendsRoleManagerwith probation and permanence privileges.
§Future Extensions
These traits will compose together to form a role framework enabling complex behaviors (like staking, governance, delegation, conflict resolutions, etc) to be implemented consistently across different runtime modules.
§Design Philosophy
- Composability: Each role trait defines minimal, orthogonal functionality that can be combined with others to form rich behavior.
- Abstraction over implementation: These traits are interfaces, not storage-bound logic. Concrete modules implement them.
- Interoperability: Enables higher-level systems (e.g. governance, incentives, or auditing) to operate generically across role types.
- Auditability: Built-in temporal tracking (timestamps, holds, etc.) ensures transparent lifecycle and accounting for each role.
This approach allows shared governance, staking, and incentive systems to operate on generic roles without being tightly coupled to any single pallet or implementation.
Traits§
- Compensate
Roles - Extends
RoleManagerto introduce reward and penalty mechanics for role-based systems. - Fund
Roles - Extends
RoleManagerto introduce funding and backing mechanics for role-based systems. - Role
Activity - A lightweight abstraction for determining whether a role-bearing
Candidateis currently idle or actively performing duties. - Role
Manager - A universal abstraction for managing roles within a runtime context.
- Role
Probation - Extends
RoleManagerto introduce probation and permanent status mechanics for role-based systems.