> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yattacorp.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Metaprotocol

> What NEXUS is — a unified execution layer starting on Zcash

## What is a Metaprotocol?

A **metaprotocol** is a set of rules layered on top of an existing blockchain, without modifying that blockchain itself.

Zcash is like a road. NEXUS is a new set of traffic rules on that road — the road doesn't change, but vehicles can now do more. NEXUS reads Zcash transactions, runs smart contracts, and writes a state summary back to Zcash. The chain itself is untouched.

NEXUS launches on Zcash first. Bitcoin and Dogecoin join the same execution layer as the protocol expands.

***

## Metaprotocol vs L2 — What's the Difference?

Both add features to a base blockchain. The key difference is **where state lives** and **how trust works**.

|                                | Metaprotocol (NEXUS)             | Traditional L2                 |
| ------------------------------ | -------------------------------- | ------------------------------ |
| **Has its own chain?**         | No — uses existing chains        | Yes — separate chain           |
| **Where state is anchored**    | Zcash (and later BTC/DOGE) L1    | L1 (via bridge contract)       |
| **Sequencer/operator needed?** | Yes, but challengeable by anyone | Usually yes, often centralized |
| **Bridge security**            | Not needed — vaults live on L1   | Bridge contract (trust risk)   |
| **Finality**                   | L1 finality                      | L2 finality + L1 settlement    |

**The practical benefit:** There is no bridge to hack. Your ZEC sits in a Zcash vault secured by Zcash's own consensus. No third party holds your keys.

***

## How NEXUS Works Step by Step

Starting on Zcash:

```
1. You send ZEC to your NEXUS vault address (a real Zcash t-addr)
                    ↓
2. NEXUS's Zcash scanner detects your deposit after 10 confirmations
                    ↓
3. NEXUS credits you with vZEC (virtual ZEC) on the NEXUS layer
                    ↓
4. You interact with WASM smart contracts using vZEC
                    ↓
5. NEXUS runs the contracts in its WebAssembly virtual machine
                    ↓
6. Periodically, NEXUS generates a Groth16 ZK proof and posts
   a state root to Zcash L1 as a Sapling shielded note
                    ↓
7. Anyone with the public Full Viewing Key can verify the state root
   matches the full transaction history
```

When Bitcoin and Dogecoin join, the same flow applies with those chains' vault and commitment mechanisms.

***

## Why Zcash First?

Zcash is uniquely suited to be the launch chain because:

1. **Native ZK proof verification**: Zcash nodes already verify Groth16 proofs for shielded transactions. NEXUS piggybacks on this — state commitments are Sapling notes, verified by the chain itself. No external verifier, no trust assumption.

2. **512-byte Sapling memos**: State commits are posted as Sapling shielded notes with 512-byte encrypted memos — far more data than Bitcoin's 80-byte OP\_RETURN limit. This enables rich state metadata per epoch.

3. **Nullifier-chained commits**: Sapling nullifiers cryptographically prevent state notes from being replayed. Each epoch references the nullifier of the previous note, forming a verifiable chain from genesis.

4. **Privacy-first infrastructure**: Zcash's cryptographic tooling (Groth16, Sapling) makes NEXUS's stealth addresses and encrypted mempool a natural fit.

No other UTXO chain can do native on-chain ZK verification. That's why Zcash is first.

***

## Security Model

NEXUS uses two independent security layers on Zcash:

### Layer 1: Groth16 ZK Proofs

Every state update comes with a Groth16 zero-knowledge proof — a mathematical guarantee that all transactions were processed correctly. Zcash nodes verify this natively. If the proof is invalid, Zcash rejects it outright.

### Layer 2: Economic Bonds + Fraud Proofs

Operators post a ZEC bond before committing state. If they post incorrect state, anyone can challenge:

```
Operator posts state + bond on Zcash L1
            ↓
Challenger disputes (also posts bond)
            ↓
Bisection game narrows to the single bad computation step
            ↓
Bad step verified on-chain via Groth16
            ↓
Fraudulent operator loses bond to challenger
```

Both layers must fail simultaneously for any attack to succeed.

***

## Your Funds Are Always Safe

Every NEXUS vault has an **escape hatch** — a backup spending path that only you can use after a waiting period:

```
If NEXUS stops responding:
  → wait ~2 weeks
  → broadcast pre-signed exit transaction
  → ZEC returns to your Zcash wallet
  → No permission from anyone required
```

| Chain    | Escape Timelock | Time      |
| -------- | --------------- | --------- |
| Zcash    | 16,128 blocks   | \~2 weeks |
| Bitcoin  | 2,016 blocks    | \~2 weeks |
| Dogecoin | 20,160 blocks   | \~2 weeks |

The waiting period exists to give the protocol time to detect and respond to any incorrect state before funds leave — the same principle used by Lightning Network payment channels.

***

## Unified Execution Layer Vision

NEXUS is not just a Zcash product — it is a unified execution layer for proof-of-work chains. The same WASM VM, the same contract language, the same developer tools run across all three chains.

```
Today (V1):                Future (V2):
┌────────┐                 ┌────────┐  ┌─────────┐  ┌─────────┐
│ Zcash  │                 │ Zcash  │  │ Bitcoin │  │Dogecoin │
│  ✅    │                 │  ✅    │  │   ✅    │  │   ✅    │
└────────┘                 └────────┘  └─────────┘  └─────────┘
    │                            \         |         /
 NEXUS                            \        |        /
 Execution                         NEXUS Unified
 Layer                             Execution Layer
                                   + Intent Exchange
```

When Bitcoin and Dogecoin join, V2 introduces **intent exchange** — swap ZEC for BTC for DOGE directly, with solvers competing to give you the best rate. No exchange account, no manual deposit/withdraw cycle.
