NuloPay
NuloPay is a system where advertisers fund tasks and users are paid for completing verifiable actions. Payouts are executed only after verification and are settled on-chain.
Concept
Tasks are defined by a type and payload. Users claim tasks, submit evidence, and verifiers decide whether the evidence is valid. Payment is gated and only occurs after verification.
Architecture
This is a unified Next.js application with API routes handling all backend logic:
- API routes for task assignment and proof submission.
- Verification endpoints for evidence checks and approval decisions.
- Payout routes for invoice creation and on-chain transfers.
User -> /api/tasks/claim -> /api/proofs
|
v
/api/verifications -> /api/payouts/requests
| |
+--402 invoice--+
| receipt |
+-> on-chain USDC transferExecution model (HTTP 402)
The payout endpoint returns HTTP 402 when a verifier requests execution. The verifier pays the invoice on-chain, then retries with the receipt attached. The payout service validates the receipt and proceeds.
Payout flow
- Verifier approves a proof.
- Verifier requests payout.
- Payout endpoint returns 402 invoice.
- Verifier pays invoice on-chain.
- Verifier retries with receipt.
- Payout endpoint validates and transfers funds.
Task model
Tasks have a task_type string and a JSON payload. Evidence is submitted as JSON and can include one or more links or fields. The system supports generic types such as manual_link_check and can be extended.
Limits and abuse prevention
Controls are applied before payout:
- Per-wallet daily payout cap.
- Per-wallet submissions per hour.
- Duplicate evidence detection by hash.
- Risk score threshold blocks verification.
API surface
- POST /api/campaigns
- POST /api/tasks/claim
- POST /api/proofs
- POST /api/verifications
- POST /api/admin/proofs/:id/approve
- POST /api/admin/proofs/:id/reject
- GET /api/admin/proofs
- GET /api/users/:id/dashboard
- POST /api/payouts/requests
- GET /api/health