Skip to main content

Predicta Technical TODO πŸ› οΈ

A granular checklist of remaining engineering tasks and technical debt.

πŸ” Security & Infrastructure

  • Privy JWT Verification: Implement server-side session validation using privy-node SDK or JWKS public keys for all protected routes.
  • Farcaster Auth: Full cryptographic signature verification for Frame-based POST requests in api/frame/route.ts.
  • Secret Management: Migrate SIMULATION_SECRET and PRIVY_APP_SECRET to Firebase Secrets for Cloud Functions.
  • CORS Hardening: Strict origin validation for the pimlicoProxy Cloud Function.

πŸͺͺ Identity & Persona

  • Real Wallet Scanning: Replace stubs with real-time on-chain footprint analysis via Alchemy/Etherscan to seed adaptive risk profiles.
  • Preon NFT Metadata: Dynamic SVG generation for Preon identities that updates purely based on on-chain stats.
  • Achievement Oracle: Verify achievement eligibility on-chain vs relying on Firestore state.

πŸ“Š Market Data & Oracle

  • Real Volume Data: Replace stubs in marketService.ts with real-time 24h volume from Polymarket.
  • Cortex Rejection Logging: Implement specific error codes for why a trade was rejected (E1 fail, E3 fail, etc.) and expose via API.
  • Resolution Refactor: Move resolutionService.ts to use Next.js Server Actions for better performance.

πŸ‘―β€β™‚οΈ Mimic Mode (Social)

  • Farcaster Following: Connect mimic_relay.py to real-time Farcaster hubs to detect new β€œFollows” and trigger vault setup.
  • Relay Latency: Optimize mimic execution loop to < 30 seconds from Leader trade detection.

βš–οΈ Governance & PRED

  • PRED Staking: Implement the staking contract for PRED tokens to unlock higher tier archetypes.
  • Governance Portal: Simple UI for voting on Cortex risk-gate thresholds (E5/E6 levels).

πŸ§ͺ Persona Simulation (QA)

  • Multi-step Flows: Implement simulation tests for faction joins and copy-trading follower onboarding.
  • Observer Analysis: Automate the export of β€œObserver” summaries to a centralized dashboard for regression tracking.
  • Network Stress: Simulating β€œGas Spike” conditions to test paymaster fallback logic between CDP and Pimlico.

πŸ§ͺ Documentation & Testing

  • Unit Tests: Coverage for mimic_relay.py and unified-auth.tsx.
  • Integration Tests: End-to-end flow for PreonVault -> PredictaCoreV2 via Privy MPC signer.
  • API Docs: Document the Cortex API endpoints using Swagger.