On-Chain Economics
Layer
Responsibilities
// SETTLEMENT PROCESS PSEUDOCODE
function settleWork(node, epochId, workProof):
// Step 1: Node performs off-chain work
work = node.performTask(epochId)
// Step 2: Generate cryptographic proof
proof = generateProof(work) // ZK proof, signed receipt, or Merkle proof
// Step 3: Submit to Ethereum
tx = ethereumContract.submitProof(epochId, proof, workDescriptor)
// Step 4: Contract validates
if contract.verifyProof(proof):
// Step 5: Release payment
contract.transferENX(node.address, paymentAmount)
else:
// Slash stake for invalid proof
contract.slash(node.address, stakeAmount)
// SLASHING CONDITIONS
SlashingTriggers = {
"non_performance": "Missed heartbeats, timeout",
"invalid_proof": "On-chain verification fails",
"double_signing": "Equivocation detected",
"collusion": "Statistical anomaly detection"
}Last updated
