Mathematically formalized party opinion through blockchain voting
Zarya is a distributed software system designed to formalize, manage, and analyze political party opinions using DAO (Decentralized Autonomous Organization) technology and statistical analysis. It provides a transparent and democratic framework for decision-making.
The system implements a mathematically rigorous approach to collective decision-making, where party opinion is formalized as a pair of matrices containing continuous and categorical random variables. All changes to these matrices are governed by blockchain-based voting that mirrors the party's charter structure.
Key Features:
- 🗳️ DAO-based Governance - Blockchain voting aligned with party structure
- 🧮 Mathematical Formalization - Opinion represented as statistical matrices
- 📊 Statistical Analysis - Automated aggregation and predictive modeling
- 📝 Auto-generation - Human-readable documents from formalized data
- 🔮 Forecasting - Predict changes in party position
This monorepo contains three main subprojects:
Solidity-based smart contracts built with Foundry, implementing the DAO governance system.
Technology Stack:
- Solidity ^0.8.28
- Foundry (Forge)
- OpenZeppelin Contracts v5.4.0
Core Components:
Zarya.sol- Main contract coordinating the systemMatricies.sol- Storage for opinion matrices (continuous & categorical)Votings.sol- Voting mechanisms and lifecycle managementPartyOrgans.sol- Party structure and membership registryRegions.sol- Geographic organizational units
Documentation:
- Smart Contracts README
- Whitepaper (Russian)
Nuxt.js-based frontend providing user interaction with the DAO.
Technology Stack:
- Nuxt 3
- Vue 3
- Wagmi/Viem (Web3 integration)
- TanStack Query
- i18n (multilingual support)
Features:
- Voting interface with progress tracking
- Party opinion listing and visualization
- Wallet connection (Web3)
- Responsive design with SCSS
Key Components:
- Voting modal and cards
- Categorical distribution charts
- Continuous statistics displays
- Status badges and progress indicators
Spring Boot-based API layer providing additional services and integrations.
Technology Stack:
- Java 25
- Spring Boot 3.5.7
- Spring Security
- Thymeleaf
- Maven
Purpose:
- GraphQL client integration
- Backend services and business logic
- Security and authentication layer
- For Contracts: Foundry, Solidity compiler
- For Frontend: Node.js 18+, bun
- For API: JDK 25, Maven
cd zarya-contracts
forge install
forge build
forge testcd zarya-frontend
bun install
bun run devcd zarya-api
./mvnw spring-boot:runThe system represents party opinion as 𝓜 = (𝓧, 𝓨), where:
- 𝓧 - Matrix of continuous random variables (quantitative measures)
- 𝓨 - Matrix of categorical random variables (categorical assessments)
Each cell in these matrices can only be modified through:
- Proposal - A party member proposes a new value
- Voting - The appropriate organ votes according to party charter
- Aggregation - Accepted values are added to the sample and statistics recalculated
The smart contracts enforce that only the correct party organ (Congress, Council, Regional Office, etc.) can vote on each specific topic based on matrix row encoding.
- Membership Voting - Adding/removing party members
- Categorical Value Voting - Discrete choice decisions
- Continuous Value Voting - Quantitative assessments
- Theme Voting - Adding new topics to matrices
- Statement Voting - Defining column semantics
The three layers work together:
- Contracts store immutable voting results and matrix data on blockchain
- Frontend provides UI for members to propose and vote
- API offers additional services, analytics, and external integrations
This project is licensed under CC0 1.0 Universal - see individual subproject licenses for details.
- Presentation (Russian)
- Whitepaper (Russian) - Detailed theoretical foundation
Built for transparent, democratic, and mathematically sound party governance.