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

# Arc Network: USDC-Native EVM for Procurement Settlement

> Arc Network is a USDC-native EVM Layer-1 that powers Tavryn escrow, on-chain vendor settlement, and protocol fee collection on every deal.

Arc is a USDC-native EVM Layer-1 blockchain where USDC serves as the native gas currency — meaning every transaction on Arc, including Tavryn's escrow deposits and vendor payments, is paid for and settled in USDC rather than a separate gas token. Tavryn deploys its `ArcEscrow` smart contract on Arc Testnet to lock commitment funds, enforce spending policy on-chain, collect protocol success fees, and release payments to vendors only after verified delivery.

> [!NOTE]
>
> All Tavryn escrow operations and settlements currently run on **Arc Testnet**. Production mainnet support is planned for Phase 3 of Tavryn's roadmap. No real funds are at risk during this testnet phase.

## Arc Testnet Network Details

Use the following parameters to connect to Arc Testnet or verify transactions in the block explorer:

| Property | Value |
| - | - |
| **Chain ID** | `5042002` |
| **Network name** | Arc Testnet |
| **RPC URL** | `https://rpc.testnet.arc.network` |
| **Block Explorer** | `https://testnet.arcscan.app` |
| **USDC Precompile** | `0x3600000000000000000000000000000000000000` |
| **ArcEscrow Contract** | `0x78e61ae7e8EeF34Add911FA3e41F3408a819c047` |

## The ArcEscrow Smart Contract

`ArcEscrow.sol` is deployed at `0x78e61ae7e8EeF34Add911FA3e41F3408a819c047` on Arc Testnet. It governs the complete lifecycle of every vendor procurement agreement that Tavryn executes, from initial escrow creation through verified payment release.

### Role Separation

The contract enforces strict role separation so that the autonomous AI agent can never release funds unilaterally:

> [card] Agent Role
>
> Can call `createAgreementWithSavings` to register a new procurement agreement and `fundAgreement` to deposit USDC into the contract. The Agent role **cannot** release payments.

> [card] Verifier Role
>
> The only role that can call `approveMilestone` and `releasePayment` after Tavryn's Fulfillment Verification Engine confirms 4-field document matching (price, seats, term, date).

### On-Chain Policy Enforcement

The ArcEscrow contract enforces financial policy directly in EVM bytecode — independent of Tavryn's application layer:

* **Maximum per-agreement cap**: No single escrow agreement can lock more than **10,000 USDC**
* **Protocol success fee**: Up to **20%** of realized savings (capped at 2,000 basis points) is split to the protocol treasury upon verified milestone release
* **Principal refund on cancellation**: If a deal is cancelled, 100% of the principal is returned to the depositor — no fees are charged on failed agreements
* **Idempotency keys**: On-chain agreement idempotency keys prevent network replay attacks and double-funding

### Escrow Agreement Lifecycle

```text theme={null}
createAgreementWithSavings()  →  fundAgreement()  →  submitMilestone()  →  approveMilestone()  →  release()
        [Agent]                       [Agent]              [Agent]              [Verifier]          [Verifier]
```

On cancellation or deal failure: `refund()` returns principal to the depositor.

## Viewing Your Transactions on ArcScan

Every on-chain escrow operation produces a verified transaction hash that links directly to [testnet.arcscan.app](https://testnet.arcscan.app). In Tavryn, confirmed transactions display a clickable **ArcScan** badge. Simulated or mock transactions are explicitly labelled with a `"Simulated (testnet mock)"` badge — no fake ArcScan links are ever shown.

To inspect a transaction manually:

**1. Copy the transaction hash**

Find the transaction in the Tavryn dashboard under the **Activity Timeline** or the **Audit Ledger**. Click the ArcScan badge to copy the hash.

**2. Open the block explorer**

Navigate to [https://testnet.arcscan.app](https://testnet.arcscan.app) and paste the transaction hash into the search bar.

**3. Inspect contract interactions**

Expand the **Internal Transactions** and **Logs** tabs to see the exact USDC amounts transferred, the agreement ID, and the function called on the ArcEscrow contract.

## Adding Arc Testnet to MetaMask

You do not need MetaMask to use Tavryn — your treasury wallet is managed server-side by Circle. However, if you want to manually inspect your wallet's on-chain balance or interact with the escrow contract directly, you can add Arc Testnet to MetaMask:

> [!NOTE]
>
> To add Arc Testnet to MetaMask, open **Settings → Networks → Add Network** and enter the following details:
>
> | Field | Value |
> | - | - |
> | Network Name | Arc Testnet |
> | RPC URL | `https://rpc.testnet.arc.network` |
> | Chain ID | `5042002` |
> | Currency Symbol | `USDC` |
> | Block Explorer URL | `https://testnet.arcscan.app` |
>
> Once added, import your treasury wallet address from **Settings → Arc Treasury Settlement Wallet** in Tavryn to view your balance.

## Getting Testnet USDC

Arc Testnet USDC is available for free from the Circle faucet:

1. Copy your treasury wallet address from **Settings → Arc Treasury Settlement Wallet**
2. Visit [faucet.circle.com](https://faucet.circle.com)
3. Select **Arc Testnet** as the network
4. Paste your wallet address and request funds

Funds typically arrive within a few seconds. Your Tavryn dashboard balance updates automatically on the next poll cycle.

## Environment Configuration

Add these variables to your `.env.local` to configure Arc Testnet connectivity:

```env theme={null}
NEXT_PUBLIC_ARC_RPC_URL=https://rpc.testnet.arc.network
NEXT_PUBLIC_ARC_CHAIN_ID=5042002
NEXT_PUBLIC_USDC_CONTRACT_ADDRESS=0x3600000000000000000000000000000000000000
NEXT_PUBLIC_ESCROW_CONTRACT_ADDRESS=0x78e61ae7e8EeF34Add911FA3e41F3408a819c047
NEXT_PUBLIC_ARC_FAUCET_URL=https://faucet.circle.com
NEXT_PUBLIC_ARC_EXPLORER_URL=https://testnet.arcscan.app
CIRCLE_BLOCKCHAIN=ARC-TESTNET
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.