Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions scientific-bounty-risk-controls/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Scientific Bounty Risk Controls

Self-contained contribution for SCIBASE issue #18, focused on anti-collusion, duplicate-submission detection, reviewer/sponsor conflict checks, and payout hold decisions for a scientific bounty marketplace.

This module helps a bounty operator answer:

- Are two solver teams submitting the same artifact or near-duplicate method package?
- Are assigned reviewers or arbitrators conflicted with solver teams or the sponsor?
- Do timing and anonymized network signals suggest coordination that should be spot-checked?
- Which submissions are release-ready, which need manual review, and which should be held for arbitration before prize payout or IP handoff?

It is deterministic, dependency-free, credential-free, and uses synthetic sample data only.

## Run

```bash
cd scientific-bounty-risk-controls
npm run check
npm test
npm run demo
```

Demo recording: `docs/bounty-risk-demo.mp4`

## What It Includes

- `src/bounty-risk-controls.js` - duplicate-submission checks, reviewer/sponsor conflict checks, timing/network signals, payout decisions, arbitration queue, and audit digest logic.
- `sample-data.json` - synthetic challenge, solver teams, submissions, artifacts, reviewers, and review assignments.
- `test.js` - Node assertion tests for text similarity, shared artifact hashes, timing/network signals, conflicted reviewers, payout holds, audit digest changes, and validation errors.
- `demo.js` - CLI demo that prints a reviewer-ready risk packet.
- `docs/requirement-map.md` - direct mapping to issue #18 requirements.

## Design Notes

This is intentionally not another broad bounty-system or marketplace mock. It focuses on the trust layer that should run before scientific prize payout:

- Shared artifact hashes produce high-severity duplicate findings.
- Similar methods and deliverable manifests produce manual-review signals.
- Reviewer and arbitrator assignments are checked against institutions, prior collaborations, sponsor employment, and sponsor financial relationships.
- Anonymized network reuse and short submission bursts are treated as review signals, not automatic fraud findings.
- Payout decisions preserve solver fairness by separating `release-ready`, `manual-review`, and `hold-for-arbitration` states.
- The audit digest lets future backend work persist and compare risk packets without storing private raw evidence in public logs.
45 changes: 45 additions & 0 deletions scientific-bounty-risk-controls/demo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
"use strict";

const fs = require("node:fs");
const path = require("node:path");
const { analyzeScientificBountyRisk } = require("./src/bounty-risk-controls");

const samplePath = path.join(__dirname, "sample-data.json");
const sample = JSON.parse(fs.readFileSync(samplePath, "utf8"));
const report = analyzeScientificBountyRisk(sample);

const demoSummary = {
challengeId: report.challengeId,
sponsorId: report.sponsorId,
summary: report.summary,
duplicateFindings: report.duplicateFindings.map((finding) => ({
code: finding.code,
severity: finding.severity,
submissionIds: finding.submissionIds,
weightedSimilarity: finding.weightedSimilarity,
sharedArtifactHashes: finding.sharedArtifactHashes,
})),
conflictFindings: report.conflictFindings.map((finding) => ({
code: finding.code,
severity: finding.severity,
submissionId: finding.submissionId,
reviewerId: finding.reviewerId,
summary: finding.summary,
})),
timingFindings: report.timingFindings.map((finding) => ({
code: finding.code,
severity: finding.severity,
submissionIds: finding.submissionIds,
teamIds: finding.teamIds,
})),
payoutDecisions: report.payoutDecisions,
arbitrationQueue: report.arbitrationQueue.map((decision) => ({
submissionId: decision.submissionId,
teamId: decision.teamId,
payoutStatus: decision.payoutStatus,
riskScore: decision.riskScore,
})),
auditDigest: report.auditDigest,
};

console.log(JSON.stringify(demoSummary, null, 2));
Binary file not shown.
24 changes: 24 additions & 0 deletions scientific-bounty-risk-controls/docs/requirement-map.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Requirement Map for SCIBASE Issue #18

Issue #18 asks for a Scientific Bounty System with challenge posting, secure submissions, arbitration, reward distribution, payout routing, IP controls, and trust on both sides of the marketplace.

This contribution implements a focused risk-control slice that can sit between submission evaluation and payout.

| Issue requirement | Implemented here |
| --- | --- |
| Challenge posting portal with evaluation criteria | `sample-data.json` models a challenge with sponsor, prize pool, payout policy, and IP policy metadata. |
| Submission engine with standardized deliverables | Submissions include titles, abstracts, methods, deliverable manifests, timestamps, anonymized network IDs, and artifact hashes. |
| Submission package validation | `compareSubmissions` checks shared artifact hashes and near-duplicate method/deliverable text before payout. |
| Arbitration and third-party review | `evaluateAssignments` checks reviewer and arbitrator conflicts before their review can drive payout decisions. |
| Reward distribution and payout routing | `payoutDecisionForSubmission` returns `release-ready`, `manual-review`, or `hold-for-arbitration` decisions with reasons. |
| IP management options | The sample challenge carries `ipPolicy`, and payout holds prevent unsafe release before conflicts or duplicates are resolved. |
| Trust on both sides | Findings separate high-severity conflicts from softer timing/network signals so sponsors, solvers, and reviewers get auditable decisions. |
| Reviewer-ready evidence | `analyzeScientificBountyRisk` emits duplicate findings, conflict findings, timing findings, payout decisions, arbitration queue, content fingerprints, and an audit digest. |
| Local verification | `npm run check`, `npm test`, and `npm run demo` run without credentials, services, or external dependencies. |

## Non-goals

- No real identity, payment, or wallet data is processed.
- No live sponsor, reviewer, or solver accounts are required.
- No external fraud-scoring service or ML model is added.
- No private IP or undisclosed research data is committed.
13 changes: 13 additions & 0 deletions scientific-bounty-risk-controls/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "scientific-bounty-risk-controls",
"version": "1.0.0",
"description": "Dependency-free anti-collusion and payout hold controls for SCIBASE scientific bounty submissions.",
"main": "src/bounty-risk-controls.js",
"scripts": {
"check": "node --check src/bounty-risk-controls.js && node --check demo.js && node --check test.js",
"demo": "node demo.js",
"test": "node test.js"
},
"license": "MIT",
"private": true
}
203 changes: 203 additions & 0 deletions scientific-bounty-risk-controls/sample-data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
{
"generatedAt": "2026-05-15T07:45:00.000Z",
"challenge": {
"id": "challenge-biomarker-2026",
"title": "Identify reproducible inflammatory biomarkers from single-cell RNA-seq",
"sponsorId": "sponsor-neuro-lab",
"prizePoolUsd": 100000,
"payoutPolicy": "milestone-and-final-award",
"ipPolicy": "solver-retains-until-paid"
},
"teams": [
{
"id": "team-atlas",
"name": "Atlas Immunology",
"members": [
{
"id": "solver-chen",
"name": "Mina Chen",
"institution": "Northbridge University"
},
{
"id": "solver-owens",
"name": "Tariq Owens",
"institution": "Northbridge University"
}
]
},
{
"id": "team-lattice",
"name": "Lattice Bio",
"members": [
{
"id": "solver-varga",
"name": "Elena Varga",
"institution": "River City Institute"
}
]
},
{
"id": "team-mirror",
"name": "Mirror Methods",
"members": [
{
"id": "solver-ramos",
"name": "Iris Ramos",
"institution": "Northbridge University"
}
]
},
{
"id": "team-cascade",
"name": "Cascade Genomics",
"members": [
{
"id": "solver-patel",
"name": "Dev Patel",
"institution": "West Harbor Lab"
}
]
}
],
"submissions": [
{
"id": "sub-atlas",
"teamId": "team-atlas",
"title": "Microglia inflammatory biomarker atlas with reproducible notebooks",
"abstract": "A single-cell RNA-seq workflow identifies microglia markers with confidence intervals and reproducible notebook evidence.",
"methodsSummary": "Normalize single-cell RNA sequencing counts, cluster microglia populations, test inflammatory marker enrichment, and validate biomarkers against held-out cohorts.",
"deliverableManifest": "Notebook pipeline, biomarker table, confidence interval report, reproducibility container, and summary manuscript.",
"submittedAt": "2026-05-15T07:02:00.000Z",
"anonymizedNetworkId": "anon-net-17",
"artifacts": [
{
"name": "analysis.ipynb",
"hash": "sha256:atlas-notebook-001"
},
{
"name": "biomarkers.csv",
"hash": "sha256:atlas-biomarkers-001"
}
]
},
{
"id": "sub-lattice",
"teamId": "team-lattice",
"title": "Independent cytokine response model for biomarker nomination",
"abstract": "A graph-guided model ranks cytokine response markers and validates findings against public tissue atlases.",
"methodsSummary": "Build a graph model over cytokine pathways, rank candidate biomarkers, test specificity across tissue atlases, and report uncertainty for each marker.",
"deliverableManifest": "Graph model code, ranked biomarker JSON, validation summary, uncertainty report, and reproducibility notes.",
"submittedAt": "2026-05-15T07:08:00.000Z",
"anonymizedNetworkId": "anon-net-41",
"artifacts": [
{
"name": "model.js",
"hash": "sha256:lattice-model-201"
},
{
"name": "ranked-biomarkers.json",
"hash": "sha256:lattice-ranked-201"
}
]
},
{
"id": "sub-mirror",
"teamId": "team-mirror",
"title": "Microglia inflammatory biomarker atlas with reproducible notebooks",
"abstract": "A reproducible single-cell workflow identifies inflammatory microglia markers with confidence intervals and validation cohorts.",
"methodsSummary": "Normalize single-cell RNA sequencing counts, cluster microglia populations, test inflammatory marker enrichment, and validate biomarkers against held-out cohorts.",
"deliverableManifest": "Notebook pipeline, biomarker table, confidence interval report, reproducibility container, and summary manuscript.",
"submittedAt": "2026-05-15T07:10:00.000Z",
"anonymizedNetworkId": "anon-net-17",
"artifacts": [
{
"name": "analysis-copy.ipynb",
"hash": "sha256:atlas-notebook-001"
},
{
"name": "biomarkers.csv",
"hash": "sha256:mirror-biomarkers-002"
}
]
},
{
"id": "sub-cascade",
"teamId": "team-cascade",
"title": "Longitudinal biomarker stability screen for inflammatory disease",
"abstract": "A longitudinal validation workflow checks whether nominated markers remain stable across disease stages and instruments.",
"methodsSummary": "Estimate biomarker stability across longitudinal cohorts, compare instrument batches, and build a reproducibility score for each marker.",
"deliverableManifest": "Stability scoring script, batch comparison report, reproducibility scorecard, and reviewer evidence packet.",
"submittedAt": "2026-05-15T07:16:00.000Z",
"anonymizedNetworkId": "anon-net-17",
"artifacts": [
{
"name": "stability.js",
"hash": "sha256:cascade-stability-503"
}
]
}
],
"reviewers": [
{
"id": "reviewer-hale",
"name": "Dr. Nora Hale",
"institutions": [
"Northbridge University"
],
"priorCollaboratorIds": [
"solver-chen"
],
"financialSponsorIds": [],
"sponsorEmployee": false
},
{
"id": "reviewer-singh",
"name": "Dr. Asha Singh",
"institutions": [
"Independent Review Cooperative"
],
"priorCollaboratorIds": [],
"financialSponsorIds": [],
"sponsorEmployee": false
},
{
"id": "reviewer-miles",
"name": "Dr. Owen Miles",
"institutions": [
"Sponsor Research Group"
],
"priorCollaboratorIds": [],
"financialSponsorIds": [
"sponsor-neuro-lab"
],
"sponsorEmployee": true,
"employerId": "sponsor-neuro-lab"
}
],
"assignments": [
{
"id": "assign-1",
"submissionId": "sub-atlas",
"reviewerId": "reviewer-hale",
"role": "scientific-reviewer"
},
{
"id": "assign-2",
"submissionId": "sub-lattice",
"reviewerId": "reviewer-singh",
"role": "scientific-reviewer"
},
{
"id": "assign-3",
"submissionId": "sub-mirror",
"reviewerId": "reviewer-miles",
"role": "arbitrator"
},
{
"id": "assign-4",
"submissionId": "sub-cascade",
"reviewerId": "reviewer-singh",
"role": "scientific-reviewer"
}
]
}
Loading