Commit Graph

2 Commits

Author SHA1 Message Date
Tutus Development 5678ae0e46 Complete Collocatio native contract for PIO/EIO/CIO investments
Implement comprehensive investment infrastructure with three tiers:
- PIO (Public Investment Opportunity): Universal citizen access
- EIO (Employee Investment Opportunity): Workplace democracy
- CIO (Contractor Investment Opportunity): Gig economy empowerment

New Features:

Violation System:
- recordViolation: Record violations with evidence and penalties
- resolveViolation: Resolve violations with committee authority
- getViolation: Query violation records
- Auto-ban after MaxViolationsBeforeBan threshold

Employment Verification (EIO eligibility):
- verifyEmployment: Register employee-employer relationships
- revokeEmployment: End employment verification
- getEmploymentStatus: Query employment records
- EIO eligibility requires active employment

Contractor Verification (CIO eligibility):
- verifyContractor: Register contractor-platform relationships
- revokeContractor: End contractor verification
- getContractorStatus: Query contractor records
- CIO eligibility requires active contractor status

Returns Distribution:
- distributeReturns: Proportional returns to all investors
- cancelOpportunity: Refund investors on cancellation

Education Integration:
- completeInvestmentEducation: Mark investor education complete
- Scire certification tracking for eligibility

Query Methods:
- getInvestmentsByOpportunity: List investments per opportunity
- getInvestmentsByInvestor: List investments per investor
- getOpportunitiesByType: Filter by PIO/EIO/CIO
- getOpportunitiesByStatus: Filter by lifecycle status

Lifecycle Automation (PostPersist):
- Auto-close opportunities past investment deadline
- Auto-fail opportunities below minimum participants
- Runs every 100 blocks for performance

State Serialization:
- Add ToStackItem/FromStackItem for EmploymentVerification
- Add ToStackItem/FromStackItem for ContractorVerification
- Add ToStackItem/FromStackItem for InvestmentViolation

Tests:
- 14 test cases for config, counters, queries, error handling

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 04:18:23 +00:00
Tutus Development b5c87b5cf8 Add Collocatio native contract for democratic investment
Implement the Collocatio (Latin for "placement/arrangement") contract
providing a three-tier investment framework for citizens:

- PIO (Public Investment Opportunity): Universal citizen access to
  infrastructure investments - any citizen can invest small amounts
  in public projects like roads, schools, hospitals

- EIO (Employee Investment Opportunity): Workplace democracy for
  verified employees - invest in their employer's projects with
  preferential terms and voting rights

- CIO (Contractor Investment Opportunity): Gig economy empowerment -
  verified contractors can invest in platforms they work with

Core Features:
- Investment opportunities with configurable parameters
- Eligibility system integrated with Vita (soul-bound identity)
- Cross-contract integration with VTS, Tribute, and Eligere
- Democratic oversight through Eligere voting
- Wealth concentration limits via Tribute integration
- Education verification through Scire integration

Contract Methods:
- createOpportunity: Create PIO/EIO/CIO with terms
- activateOpportunity: Enable investment period
- invest: Make investment with eligibility checks
- withdraw: Exit with maturity/penalty rules
- setEligibility: RoleInvestmentManager (ID 28) sets eligibility flags
- isEligible: Check investor eligibility for opportunity types

Contract ID: -25

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 10:33:24 +00:00