> ## 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.

# Cross-Chain Operations

> Cross-chain swaps via intent exchange (V2)

## Overview

NEXUS V2 will provide unified liquidity across Bitcoin, Zcash, and Dogecoin via intent exchange, enabling seamless cross-chain operations.

<Warning>
  Cross-chain swaps and unified liquidity are planned for V2. V1 supports deposits, withdrawals, and smart contracts on each chain independently.
</Warning>

## V1 (Current)

| Chain     | Deposits       | Withdrawals    | Smart Contracts |
| --------- | -------------- | -------------- | --------------- |
| **Zcash** | **✅ Live**     | **✅ Live**     | **✅ Live**      |
| Bitcoin   | 🔄 Coming soon | 🔄 Coming soon | 🔄 Coming soon  |
| Dogecoin  | 🔄 Coming soon | 🔄 Coming soon | 🔄 Coming soon  |

## V2 (Planned) - Intent Exchange

| Chain    | Cross-Chain Swaps     | Unified Liquidity |
| -------- | --------------------- | ----------------- |
| Bitcoin  | 🔄 BTC/ZEC, BTC/DOGE  | 🔄                |
| Zcash    | 🔄 ZEC/BTC, ZEC/DOGE  | 🔄                |
| Dogecoin | 🔄 DOGE/BTC, DOGE/ZEC | 🔄                |

## How Intent Exchange Works (V2)

```
┌─────────────────────────────────────────────────────────────────┐
│                    V2: Intent Exchange                           │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│  1. User creates swap intent                                    │
│     "Swap 1 BTC for at least 50,000 DOGE"                       │
│                    │                                             │
│                    ▼                                             │
│  2. Intent broadcast to solver network                          │
│                    │                                             │
│                    ▼                                             │
│  3. Solvers compete to fill the intent                          │
│                    │                                             │
│                    ▼                                             │
│  4. Best solver executes cross-chain swap                       │
│                    │                                             │
│                    ▼                                             │
│  5. User receives DOGE on Dogecoin L1                           │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘
```

## V2 Cross-Chain Swap Example

```typescript theme={null}
// V2: Intent-based cross-chain swap
const intent = await client.createSwapIntent({
  fromChain: 'bitcoin',
  toChain: 'dogecoin',
  fromAmount: '100000000',  // 1 BTC in sats
  minToAmount: '50000000000000',  // 50,000 DOGE minimum
  recipient: dogeAddress,
  deadline: Math.floor(Date.now() / 1000) + 3600  // 1 hour
});

console.log('Intent ID:', intent.id);

// Wait for solver to fill the intent
const result = await client.waitForIntentFulfillment(intent.id);
console.log('Received:', result.amountOut, 'DOGE');
```

## V1 Usage (Current)

In V1, each chain operates independently:

### Deposit to Zcash (Live)

```typescript theme={null}
// Get your Zcash vault address (P2SH t-addr)
const vault = await client.getVaultAddress(); // 16,128-block timelock (~2 weeks)
console.log('Deposit ZEC to:', vault.vaultAddress);
// Send via zcash-cli sendtoaddress <VAULT_ADDRESS> 1.0
// Credited after 10 confirmations (~12.5 min)
```

### Deposit to Bitcoin (Coming Soon)

Bitcoin vaults use Taproot (P2TR) and will be available when Bitcoin joins the NEXUS execution layer.

### Deposit to Dogecoin (Coming Soon)

Dogecoin vaults use P2PKH+CLTV and will be available when Dogecoin joins the NEXUS execution layer.

## Benefits of Intent Exchange (V2)

1. **Best execution** - Solvers compete for best price
2. **No slippage** - Price locked at intent creation
3. **Trustless** - Cryptographic guarantees
4. **Cross-chain atomic** - All-or-nothing execution
5. **MEV protection** - Intents prevent front-running
