Skip to content

EPIC: Pool Creation Feature Implementation #35

@rafamiziara

Description

@rafamiziara

Epic: Pool Creation Feature Implementation

Overview

This epic encompasses the complete implementation of pool creation functionality for SuperPool, from smart contract development to user interface, enabling users to create and manage lending pools with comprehensive validation and monitoring.

Scope

Implementation of end-to-end pool creation feature including:

  • Smart contract modifications for simplified MVP flow
  • Backend services for immediate and scheduled event indexing
  • Mobile app with MobX stores, React hooks, and comprehensive UI
  • Transaction monitoring and pending state management
  • Event synchronization and blockchain state indexing

Child Issues

Phase 1: Smart Contract Infrastructure (Issues 22-27) ✅ COMPLETED

Priority: Core contracts and deployment pipeline

Phase 2: Backend Services (Issues 28-30) ✅ COMPLETED

Priority: Contract integration and event monitoring

Phase 3: Contract Modifications for MVP (Issue 68)

Priority: Simplify pool creation for MVP

Phase 4: Backend Pool Indexing (Issues 69-72)

Priority: Event indexing infrastructure

Phase 5: Mobile State Management (Issues 73-74)

Priority: Core MobX stores

Phase 6: Mobile Business Logic (Issues 75-76)

Priority: React hooks for pool operations

Phase 7: Mobile User Interface (Issues 77-80)

Priority: Complete user-facing flow

Phase 8: Configuration & Testing (Issues 81-82)

Priority: Infrastructure and quality assurance

Technical Architecture

  • Smart Contracts: PoolFactory + LendingPool with upgradeable proxy pattern ✅ COMPLETED
  • Multi-sig: Safe wallet integration for admin control ✅ COMPLETED
  • Backend: Firebase Cloud Functions with immediate + scheduled indexing
  • Frontend: React Native with MobX stores, Wagmi hooks, and NativeWind styling
  • State Management: Reactive MobX stores with AsyncStorage persistence
  • Deployment: Automated deployment to Polygon Amoy testnet ✅ COMPLETED

Development Sequence

  1. Smart Contract Phase (Issues 22-27): Deploy contract infrastructure ✅ COMPLETED
  2. Backend Phase (Issues 28-30): Build contract integration services ✅ COMPLETED
  3. MVP Preparation (Issue 68): Simplify contract for MVP
  4. Backend Indexing (Issues 69-72): Implement event indexing
  5. Mobile Stores (Issues 73-74): Build reactive state management
  6. Mobile Hooks (Issues 75-76): Create business logic layer
  7. Mobile UI (Issues 77-80): Complete user interface
  8. Testing & Config (Issues 81-82): Finalize and validate

Progress Update

Epic Progress: 9/24 issues completed (37.5%)

Smart Contract Phase: 6/6 complete (100%) ✅ COMPLETED

  • ✅ All contracts developed, deployed, and verified on Polygon Amoy
  • ✅ Multi-sig Safe ownership transfer completed
  • ✅ Comprehensive security testing implemented

Backend Phase: 3/3 complete (100%) ✅ COMPLETED

  • ✅ Pool creation Cloud Function implemented
  • ✅ Safe integration service completed
  • ✅ Event listeners for pool creation active

MVP Preparation: 0/1 complete (0%)

  • Ready to start contract simplification

Backend Indexing: 0/4 complete (0%)

  • Depends on contract modifications

Mobile Implementation: 0/8 complete (0%)

  • Ready to start with MobX foundation

Configuration & Testing: 0/2 complete (0%)

  • Will be done throughout implementation

Acceptance Criteria

  • ✅ Smart contracts deployed and verified on Polygon Amoy
  • ✅ PoolFactory ownership transferred to multi-sig Safe
  • ✅ Backend handles pool creation through Safe transactions
  • Contract simplified for MVP (auto-assign poolOwner)
  • Backend indexes pools immediately after creation
  • Scheduled indexing catches missed pools
  • Mobile app stores manage pool and transaction state
  • UI allows users to create pools with full validation
  • Pending transactions persist across app restarts
  • End-to-end pool creation workflow functional
  • Test coverage above 95% with comprehensive edge cases

Definition of Done

  • All child issues completed and closed
  • ✅ Smart contracts deployed and ownership transferred to Safe
  • ✅ Project structure organized for professional development
  • ✅ Backend services completed for pool creation
  • Contract modifications deployed and tested
  • Event indexing (immediate + scheduled) functional
  • Mobile app with complete pool creation flow
  • Pool creation tested end-to-end on Amoy testnet
  • Comprehensive validation on both client and server
  • Documentation updated for pool creation workflow
  • Integration tests pass for complete flow

Dependencies

  • Multi-sig Safe contracts (deployed) ✅
  • Firebase Cloud Functions infrastructure ✅
  • Polygon Amoy testnet access ✅
  • Wallet authentication system (from previous epic EPIC: Implement User Onboarding & Wallet Connection #17) ✅
  • MobX state management foundation ✅
  • Reown AppKit + Wagmi integration ✅

Related Issues

Metadata

Metadata

Assignees

Labels

comp: backendIssues for the Firebase Cloud Functions in packages/backendcomp: contractsIssues related to the smart contracts in packages/contractscomp: frontendIssues for the mobile app UI/UX in packages/mobile-apptype: featureNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions