POC Engineering Spec v1.0
VOLTS Minting Engine — Memory Palace Throne Room
Scoring Engine → Attestation API → VOLTS Mint Flow · 6-Week Sprint · Formal Deliverable
Biomarker CaptureTaxonomy ScoringZK AttestationVOLTS FormulaFastAPISolidityzkSync Era
EEG Capture (BrainBit)
→Feature Extraction
→Taxonomy Scoring (ML)
→Human Adjudication
→Attestation + Signing
→IPFS Artifact Hash
→Off-Chain Ledger
→Testnet Mint (gated)
volts_formula.py — Taxonomy level → VOLTS computation
# VOLTS minting formula
# Based on Interface Taxonomy multiplier table
TAXONOMY_MULTIPLIERS = {
0: 1.0, # Recall — basic reproduction
1: 1.5, # Understand — contextual grasp
2: 3.0, # Apply — novel execution
3: 7.5, # Analyze — pattern recognition
4: 18.0, # Evaluate — expert judgment
5: 47.0, # Synthesize — domain innovation
6: 127.0, # Create — paradigm contribution
7: 420.0, # Transform — civilization-level shift
}
BASE_VOLTS = 1000 # per scoring session
def compute_volts(taxonomy_level: int, transformation_score: float,
biomarker_bonus: float, session_quality: float) -> int:
multiplier = TAXONOMY_MULTIPLIERS[taxonomy_level]
raw_volts = BASE_VOLTS * multiplier
adjusted = raw_volts * transformation_score # 0–1.0 precision
bio_adjusted = adjusted * (1 + biomarker_bonus) # ERP quality bonus
final = bio_adjusted * session_quality # session validity
return round(final)1×
L0
Recall
1.5×
L1
Understand
3×
L2
Apply
7.5×
L3
Analyze
18×
L4
Evaluate
47×
L5
Synthesize
127×
L6
Create
420×
L7
Transform
scoring_features.py — ERP biomarkers + session metadata → taxonomy level
# Feature engineering from ERP/BCI + session metadata
def extract_features(eeg_epoch, session_meta):
return {
# ERP biomarkers
"p300_amplitude_uv": compute_p300(eeg_epoch), # 0–30 µV
"n1_latency_ms": compute_n1_latency(eeg_epoch), # 80–150 ms
"alpha_synchrony": compute_alpha_sync(eeg_epoch), # 0–1.0
"theta_frontal_power": compute_theta(eeg_epoch), # 0–1.0
"reaction_time_ms": session_meta["reaction_ms"],
# Session metadata
"revision_count": session_meta["revisions"],
"collaboration_nodes": session_meta["collaborators"],
"creation_duration_h": session_meta["duration_ms"] / 3_600_000,
"artifact_complexity": session_meta["artifact_complexity_score"],
# Derived
"novelty_index": compute_novelty(session_meta["artifact_hash"]),
}
# Map features → taxonomy level (0–7)
# Model: sklearn GradientBoostingClassifier
# Training: n=50 expert-labelled sessions (human adjudication)
# Evaluation target: Cohen's kappa > 0.7, ROC-AUC > 0.85attestation.py — Signed JSON attestation + mint envelope
# Attestation generation — signed JSON envelope
import json, hmac, hashlib, time
def create_attestation(scoring_result: dict, creator_id: str, artifact_ipfs: str) -> dict:
payload = {
"event_id": scoring_result["event_id"],
"creator_id": creator_id,
"taxonomy_level": scoring_result["taxonomy_level"],
"transformation": scoring_result["transformation_score"],
"volts_final": scoring_result["volts_final"],
"ipfs_cid": artifact_ipfs,
"model_version": "taxonomy-v2.1.0",
"timestamp": int(time.time()),
"audit_hash": scoring_result["audit_hash"],
}
# Sign with server key (HSM in production)
sig = hmac.new(SERVER_KEY, json.dumps(payload).encode(), hashlib.sha256).hexdigest()
return {
"payload": payload,
"signature": sig,
"zk_proof": None, # populated post ZK-circuit integration
"mint_envelope": {
"contract": SOVEREIGN_CONTRACT_ADDR,
"chain_id": 324, # zkSync Era
"calldata": build_mint_calldata(payload, sig),
}
}main.py — /score · /attest · /mint-request · /ledger
# FastAPI — Scoring + Attestation Service
# /score, /attest, /mint-request, /ledger
from fastapi import FastAPI, Depends, HTTPException
from pydantic import BaseModel
app = FastAPI(title="VOLTS Scoring Engine", version="1.0.0")
class ScoreRequest(BaseModel):
session_id: str
eeg_data_url: str # signed URL to EEG epoch (S3/IPFS)
artifact_hash: str # SHA-256 of produced artifact
creator_id: str
session_meta: dict
class AttestRequest(BaseModel):
score_id: str
creator_wallet: str
artifact_ipfs: str
zk_proof: bool = False
@app.post("/score")
async def score_session(req: ScoreRequest):
eeg = await fetch_eeg(req.eeg_data_url)
features = extract_features(eeg, req.session_meta)
result = taxonomy_model.predict(features)
volts = compute_volts(result.level, result.transform_score,
result.biomarker_bonus, result.session_quality)
record = await db.scores.insert({**result, "volts": volts})
return {"score_id": record.id, **result, "volts_final": volts}
@app.post("/attest")
async def create_attestation(req: AttestRequest):
score = await db.scores.get(req.score_id)
attestation = sign_attestation(score, req.creator_wallet, req.artifact_ipfs)
if req.zk_proof:
attestation["zk_proof"] = await generate_zk_proof(attestation)
record = await db.attestations.insert(attestation)
return {"attestation_id": record.id, **attestation}
@app.post("/mint-request")
async def submit_mint(attestation_id: str, creator_wallet: str):
attest = await db.attestations.get(attestation_id)
# Submit to smart contract via relayer (meta-tx for gasless UX)
tx = await relayer.submit(attest["mint_envelope"])
return {"tx_hash": tx.hash, "status": "submitted", "chain_id": 324}
@app.get("/ledger/{creator_id}")
async def get_ledger(creator_id: str):
sessions = await db.scores.filter(creator_id=creator_id)
total_volts = sum(s["volts_final"] for s in sessions)
return {"creator_id": creator_id, "sessions": sessions,
"total_volts": total_volts, "tier": compute_tier(total_volts)}VOLTSMintGateway.sol — ERC-1155 + gated VOLTS minting (zkSync Era)
// SPDX-License-Identifier: MIT
// VOLTSMintGateway.sol — Gated minting via server attestation
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
contract VOLTSMintGateway is ERC1155, Ownable {
using ECDSA for bytes32;
address public signerAddress; // Server signing key
bool public mintPaused = true; // Gated by default (POC safety)
mapping(bytes32 => bool) public usedAttestations;
uint256 public constant VOLTS_TOKEN_ID = 1;
event VOLTSMinted(address indexed creator, uint256 amount,
uint8 taxonomyLevel, bytes32 attestationHash);
constructor(address _signer) ERC1155("") {
signerAddress = _signer;
}
function mintVOLTS(
address to,
uint256 amount,
uint8 taxonomyLevel,
bytes32 attestationHash,
bytes calldata signature
) external {
require(!mintPaused, "Mint paused — awaiting DAO vote");
require(!usedAttestations[attestationHash], "Attestation already used");
// Verify server signature
bytes32 digest = keccak256(abi.encodePacked(
to, amount, taxonomyLevel, attestationHash
)).toEthSignedMessageHash();
require(digest.recover(signature) == signerAddress, "Invalid attestation");
usedAttestations[attestationHash] = true;
_mint(to, VOLTS_TOKEN_ID, amount, "");
emit VOLTSMinted(to, amount, taxonomyLevel, attestationHash);
}
function unpauseMint() external onlyOwner { mintPaused = false; }
function pauseMint() external onlyOwner { mintPaused = true; }
function setSigner(address s) external onlyOwner { signerAddress = s; }
}sprint_plan.md — Week-by-week deliverables
VOLTS POC — 6-Week Sprint Plan ━━ WEEK 1: Data Foundation ━━ □ Define ERP feature set (P300, N1, alpha synchrony, theta) □ Set up EEG data collection pipeline (BrainBit SDK integration) □ Create session metadata schema + consent templates □ Stand up Postgres schema: sessions, scores, attestations, ledger □ Deliverable: n=5 pilot sessions captured + consent collected ━━ WEEK 2: Scoring Engine v0 ━━ □ Implement feature extraction (scipy signal processing) □ Train baseline taxonomy classifier (sklearn, n=20 labelled) □ Human adjudication layer: 2 expert raters, Cohen's kappa baseline □ Evaluation report: ROC-AUC, accuracy, confusion matrix □ Deliverable: Reproducible scoring model + evaluation notebook ━━ WEEK 3: Attestation API ━━ □ FastAPI service: /score, /attest endpoints □ Server-side signing (HMAC-SHA256, HSM roadmap planned) □ Audit hash generation (SHA-256 of feature vector + model version) □ IPFS upload for artifact hashes (Pinata or nft.storage) □ Deliverable: Working API, 20 signed attestations for pilot sessions ━━ WEEK 4: Operator Dashboard ━━ □ Session feed: taxonomy level + VOLTS computed + attestation status □ Creator ledger: total VOLTS, tier badge, history □ Admin view: human adjudication queue, model performance □ Deliverable: Live dashboard connected to scoring API ━━ WEEK 5: Testnet Smart Contract ━━ □ Deploy VOLTSMintGateway.sol to zkSync Era testnet □ Gasless meta-transaction relayer (OpenGSN or Biconomy) □ End-to-end: session → score → attest → mint (testnet) □ Mint paused by multisig (safety for POC) □ Deliverable: Demonstrable mint flow on testnet ━━ WEEK 6: POC Report + Investor Package ━━ □ Short whitepaper appendix: measurement methodology □ Reproducibility report: cross-session validation □ Security audit plan + budget estimate □ Investor demo recording (30 minutes) □ Deliverable: Full POC package — demo, report, API docs, contract
W1Data collection plan + n=20 sessions captured
W2Baseline scoring model + evaluation report (ROC, kappa)
W3Attestation API + 20 signed attestations
W4Operator dashboard (taxonomy + VOLTS + ledger)
W5Testnet smart contract — gated VOLTS mint flow
W6POC whitepaper + investor demo package