Architecture
Understanding how ProjectZero Prompt Mining works end-to-end.
System Overview
ProjectZero Prompt Mining is a privacy-first, blockchain-verified system that enables LLM platforms to reward users for their prompts without compromising data privacy. The architecture consists of three main layers working in harmony.
Your Infrastructure
LLM platform with prompt mining boilerplate
Prompts stay private on your servers
PZERO Gateway
Authorization & quota management
Validates API keys, generates signatures
Nexera Blockchain
ERC-7208 smart contracts
Stores hashes, issues rewards
Core Privacy Guarantee
Your full prompts never leave your infrastructure. Only cryptographic hashes (32 bytes) are transmitted to the PZERO Gateway and stored on-chain. This ensures complete data privacy while maintaining verifiable proof of prompt ownership.
Complete System Flow
User submits prompt to your LLM service
Example: "Explain quantum computing in simple terms"
Location: Your InfrastructureFull prompt stays private on your serverBoilerplate hashes prompt locally using keccak256
One-way cryptographic hash ensures privacy
const hash = keccak256(toUtf8Bytes(promptText))→ 0x1a2b3c4d...Request authorization from PZERO Gateway
POST to /v1/authorize/mint with hash (not full prompt)
Headers: PZERO_API_KEYBody: {promptHash, author, activityPoints}Gateway validates request and generates signature
Checks API key, quota limits, and signs with PZERO private key
✓ API key valid✓ Quota available (1K Free / 100K Pro)→ Returns signature + nonceBoilerplate submits blockchain transaction
Calls PromptMiner.mint() with hash and PZERO signature
Transaction options:• User-signed (wallet required)• Backend-signed (gasless for users)• Meta-transaction (delegated)Smart contract mints prompt and issues rewards
Verifies signature, stores hash in PromptDO, mints Activity Points
✓ Prompt hash stored on-chain (ERC-7208)✓ User receives Activity Points (ERC-20)Transaction completeWhy This Matters
- •Users get rewarded for their contributions to training data without giving up privacy
- •Your prompts stay private - PZERO and the blockchain never see full text
- •Blockchain proof creates verifiable, tamper-proof record of prompt ownership
- •Gasless transactions mean users don't need crypto wallets or ETH to participate
Smart Contract Architecture
The system uses four main smart contracts implementing the ERC-7208 Data Objects standard.
PromptMiner
Core minting contract. Validates PZERO signatures, mints prompts, issues rewards.
function mint(
bytes32 promptHash,
address author,
uint256 activityPoints,
uint256 nonce,
bytes signature
) external {
// Verify PZERO signature
require(verifySigner(signature), "Invalid signature");
// Mint prompt as Data Object
promptDO.mint(promptHash, author);
// Issue Activity Points reward
activityPoints.mint(author, activityPoints);
}ActivityPoints (ERC-20)
Reward token contract. Minted to users when prompts are validated.
// Standard ERC-20 token with minting restricted to PromptMiner
contract ActivityPoints is ERC20 {
function mint(address to, uint256 amount) external onlyMinter {
_mint(to, amount);
}
}PromptDO (Data Object)
ERC-7208 Data Object contract storing prompt hashes and metadata.
// Implements ERC-7208 Data Object
contract PromptDO is DataObject {
mapping(bytes32 => PromptData) public prompts;
struct PromptData {
address author;
uint256 timestamp;
uint256 reward;
}
function write(bytes32 hash, address author) external {
prompts[hash] = PromptData(author, block.timestamp, reward);
}
}DataIndex (ERC-7208)
Registry contract managing allowed data managers and discovery.
// ERC-7208 index for prompt discovery
contract DataIndex {
mapping(address => bool) public allowedManagers;
function registerDataObject(address dataObject) external onlyAllowed {
// Register PromptDO for discovery
}
}Privacy Architecture
The system is designed with privacy as a core principle. Prompts never leave customer infrastructure.
Data Flow Diagram
What Goes Where
Your Infrastructure
- ✓ Full prompt text
- ✓ User context
- ✓ LLM responses
- ✓ Application data
On-Chain / Gateway
- ✓ Prompt hash (32 bytes)
- ✓ Author address
- ✓ Reward amount
- ✓ Timestamp
Deployment Architecture
The boilerplate can be deployed alongside your existing LLM service.
┌─────────────────────────────────────────────────────┐
│ Your Infrastructure (Private Cloud / AWS / GCP) │
│ │
│ ┌──────────────┐ ┌──────────────────────┐ │
│ │ │ │ Prompt Mining │ │
│ │ LLM Service │◄────────┤ Boilerplate │ │
│ │ (ChatGPT) │ │ (Node.js API) │ │
│ │ │ │ │ │
│ └──────────────┘ └─────────┬────────────┘ │
│ │ │
│ Prompt text stays here ────────────┘ │
└─────────────────────────────────────────────────────┘
│
Hash only │
▼
┌───────────────────────────────────────────┐
│ PZERO Gateway │
│ pm-gateway.projectzero.io │
│ • API key validation │
│ • Quota management │
│ • Signature generation │
└───────────────┬───────────────────────────┘
│
│ Signed transaction
▼
┌───────────────────────────────────────────┐
│ Nexera Blockchain │
│ • PromptMiner contract │
│ • ActivityPoints (ERC-20) │
│ • PromptDO (Data Object) │
│ • DataIndex (Registry) │
└───────────────────────────────────────────┘Recommended Deployment
- Deploy boilerplate as microservice in your VPC
- Use environment-specific RPC URLs (testnet for dev, mainnet for prod)
- Separate API keys for development and production
- Monitor gas usage and set up auto-refill for backend wallet
- Implement health checks and alerting
Technology Stack
Blockchain
- • Nexera (EVM-compatible)
- • Solidity 0.8.x
- • ERC-7208 Standard
- • ERC-20 Tokens
Backend
- • Node.js 18+
- • TypeScript
- • ethers.js v6
- • Express/Fastify
Frontend
- • React 18+
- • Next.js (optional)
- • ethers.js (wallet)
- • MetaMask/WalletConnect