-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
Description
Overview
This issue implements the backend logic for the PoI verification process, supporting both:
- Internal verifier review system (admin-controlled)
- Future community verifiers who staked DCU via smart contracts
It will handle verifier roles, API endpoints, and verification metadata storage.
🎯 Objectives
- Add PoI verification statuses (Pending, Verified, Rejected)
- Admin API for internal verifiers to update statuses and leave feedback
- Prepare logic to fetch verifier eligibility from smart contract
- Record verification actions and make them visible on frontend
🧩 Functional Requirements
1. Models
- Extend
PoIschema:status:"pending" | "verified" | "rejected"verifiedBy: wallet or user IDverificationComment: optional stringverifiedAt: timestamp
2. APIs
-
GET /api/poi/:id/status- Returns verification status, comments, verifier, timestamp
-
PATCH /api/poi/:id/verify- Body:
{ status, comment } - Auth: Only for users with
role: 'verifier' - Logs
verifiedByandverifiedAt
- Body:
-
GET /api/verifier/:wallet- Returns:
isVerifier: true | falsestake: number
- (Pulls from smart contract via Web3 or subgraph)
- Returns:
3. Admin Panel (Optional MVP)
- Web-based admin dashboard or protected route to manage PoI reviews
- Internal-only for now; future update will expose this via DApp
🔐 Dependencies
contracts: VerifierStaking + Registrydapp: Verifier UI + staking interface
🧪 Future Logic (v2.3+)
- Verifier voting with quorum (multi-sig style approvals)
- Slashing reputation for false/malicious verification
- Auto-payout to verifiers upon successful submissions