# On-Chain Economics

Enigma uses Ethereum as a settlement and enforcement layer for payments, incentives, staking, and penalties. ENX compensates verifiable work performed off chain, with task completion attested via cryptographic proofs or verifiable signals that Ethereum contracts validate before releasing transaction. Ethereum enforces outcomes, not process: it does not coordinate execution or route traffic, but applies deterministic economic consequences while execution remains off chain to preserve privacy and scalability.

| Layer        | Responsibilities                                                                                                         |
| ------------ | ------------------------------------------------------------------------------------------------------------------------ |
| **Enigma**   | <p>Route traffic<br>Store encrypted data<br>Move workloads<br>Coordinate timing<br>Generate proofs of work performed</p> |
| **Ethereum** | <p>Verify submitted proofs<br>Release payments<br>Provide randomness for timing</p>                                      |

```
// 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"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.engma.io/overview/on-chain-economics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
