Architecture Overview
Contents
- System Flow
- Data Flow (At a Glance)
- Core Modules
- Core Responsibilities
- Access Control
- Role Matrix (High Level)
- Supporting Systems
- State Model
- Upgradeability
- Storage Boundaries
- Trust Boundaries
- Data Dependencies
- User Journey (At A Glance)
- Diagram (ASCII)
System Flow
- Users submit ideas in
IdeaRegistryUpgradeable - Voting rounds are started in
VotingSystemUpgradeable - Votes stake governance tokens through
FundingPoolUpgradeable - Winners are determined, reputation and progression are updated
GrantManagerUpgradeablefinalizes payouts and updates idea status
Data Flow (At a Glance)
- Idea metadata is stored only in
IdeaRegistryUpgradeable - Voting rounds and vote accounting are stored in
VotingSystemUpgradeable - Deposits and pool balances are stored in
FundingPoolUpgradeable - Grant payouts are executed by
GrantManagerUpgradeable
Core Modules
IdeaRegistryUpgradeableVotingSystemUpgradeableFundingPoolUpgradeableGrantManagerUpgradeableGovernanceTokenUpgradeable
Core Responsibilities
IdeaRegistryUpgradeableis the single source of truth for ideas and status transitionsVotingSystemUpgradeablemanages round lifecycle, staking rules, and winnersFundingPoolUpgradeablecollects stake and distributes grant fundsGrantManagerUpgradeablevalidates eligibility and triggers distributionGovernanceTokenUpgradeableis the staking asset and reward token
Access Control
RolesRegistryUpgradeableis the central role authorityRolesAwareUpgradeableenforces role checks in all core modules
Role Matrix (High Level)
VOTING_ROLE= voting system contractGRANT_ROLE+DISTRIBUTOR_ROLE= grant managerIREGISTRY_ROLE= idea registryREPUTATION_MANAGER_ROLE= voting system + idea registryAUTO_GRANT_ROLE= voter progression
Supporting Systems
ReputationSystemUpgradeabletracks author reputationVoterProgressionUpgradeablegrants CURATOR/REVIEWER roles
State Model
- Idea status transitions defined in
IdeaStatus - Errors defined in
Errorsfor consistent reverts
Upgradeability
- All core modules are deployed behind Transparent proxies
- Each proxy has its own
ProxyAdmin(OZ v5 pattern) - Upgrade operations are managed per proxy
Storage Boundaries
- No contract holds another contract's state directly
- Cross-contract reads are done via interfaces
- Role checks prevent unauthorized state changes
Trust Boundaries
- Admin roles can pause and change parameters
- System roles are granted only to contracts, not EOAs
- User roles are granted by progression logic
Data Dependencies
- Voting depends on IdeaRegistry and FundingPool
- GrantManager depends on VotingSystem and FundingPool
- IdeaRegistry depends on ReputationSystem and VoterProgression
User Journey (At A Glance)
- Create idea
- Enter voting round
- Vote with stake
- Winner selected
- Grant claimed and distributed
Diagram (ASCII)
User
|
v
IdeaRegistryUpgradeable
| (status updates)
v
VotingSystemUpgradeable <---- ReputationSystemUpgradeable
| (stake/votes) VoterProgressionUpgradeable
v
FundingPoolUpgradeable
|
v
GrantManagerUpgradeable -----> IdeaRegistryUpgradeable (funded status)