> For the complete documentation index, see [llms.txt](https://argon-4.gitbook.io/argon-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://argon-4.gitbook.io/argon-docs/using-enclave/escrow.md).

# Escrow

Arbitrated escrow on Kaspa: a buyer, a seller, and an arbiter you choose, with funds held by a covenant and every step visible on the explorer.

Enclave's escrow holds a payment in a **Kaspa covenant** until an arbiter the two parties chose releases it to the seller or refunds it to the buyer. No company holds the money. Enclave is never the arbiter, and neither is anyone connected to it.

Both views: **Desk → Deals**. Mainnet and testnet-10.

## Two deal types

|                         | **Arbitrated deal**                                                          | **Arbitrated deal with collateral**                                   |
| ----------------------- | ---------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| Parties                 | Buyer, seller, arbiter                                                       | Buyer, seller, arbiter                                                |
| Legs                    | Offer → Payment                                                              | Offer → Payment, plus the seller's Collateral                         |
| Who decides             | The arbiter: **release** to the seller or **refund** to the buyer            | Same; the arbiter's release also returns the collateral to the seller |
| If nobody acts          | After the **return window** (1–90 days) the buyer may **unwind** the payment | Same; the seller may unwind their collateral after the window         |
| Before the seller joins | The buyer may **reclaim** the offer at any time                              | Same                                                                  |

Everything else (milestones, cooperative release without an arbiter, collectible delivery, hash-locked or cross-chain deals) is deliberately not offered. Each would need its own proven program first.

{% hint style="warning" %}
**After the window opens, the buyer's unwind and the arbiter's decision race.** Kaspa covenants express "at least this old", so a timeout does not switch the arbiter off. Whichever valid transaction Kaspa accepts first stands. The review says this in plain words on every relevant step; a deal that concludes inside its window never meets it.
{% endhint %}

## The life of a deal

{% stepper %}
{% step %}

### The buyer opens the deal

**Open an escrow.** Choose the type and enter the **payment** amount, the **seller**, the **arbiter**, the **return window** in days, and, for type 2, the **seller collateral**. The buyer and seller are identified by their **Deal Desk addresses** (see [Deal Desk](/argon-docs/using-enclave/deal-desk.md)); the arbiter is an independent Kaspa key, never Enclave. Review in SureSign and fund the offer. This is the only step that carries the **Enclave fee** (about US$0.20 in KAS).
{% endstep %}

{% step %}

### The seller receives the deal

The deal is handed over as a packet: the buyer sends the **deal card** from the Deal Room, or the seller imports the packet text through **Desk → Deals → Import a deal** (or scans the QR on the printed paperwork). SureSign re-derives every lock from the deal's constructor before showing anything; a packet that does not reproduce its own locks is refused. The seller's room opens with the deal at *Offer funded*.
{% endstep %}

{% step %}

### The seller joins

**Join** moves the offer into the payment covenant, which names the arbiter and the return window. For a collateral deal the seller also **funds the collateral** leg. Until the seller joins, the buyer can **reclaim**.
{% endstep %}

{% step %}

### The arbiter decides

When the goods or service have changed hands, the arbiter opens their own room and chooses **Release** (payment to the seller) or **Refund** (payment to the buyer). The arbiter needs Enclave with the key the deal names; the packet gives them the deal, and their room shows only the two moves that are theirs.
{% endstep %}

{% step %}

### Settlement

Proceeds are paid to the receiving party's Deal Desk key, so they arrive in that party's **Desk** rather than the main balance; **Move to wallet** brings them across. The deal moves from **Active** to **Settled**.
{% endstep %}
{% endstepper %}

## Who can do what

Enclave works out your role by comparing the deal's constructor with your own keys; nothing in the packet is trusted about who you are. Your room shows only the moves your role can make at the deal's current stage, judged by SureSign against the covenant's actual state on the network:

| Role    | Moves                                                                  |
| ------- | ---------------------------------------------------------------------- |
| Buyer   | Reclaim (before join) · Unwind (after the window)                      |
| Seller  | Join · Fund collateral (type 2) · Unwind collateral (after the window) |
| Arbiter | Release · Refund · Release collateral (type 2)                         |

Every move is taken from the deal's **room** in the Deal Desk, never from the Escrow page itself. The Escrow page is the register: active and settled deals, parties, legs, live KAS in escrow, and the timeline (*Offer funded*, *Seller joined*, the resolution), each with **Open deal room**, **Details**, and the paperwork.

## On the explorer

Each deal is born with a **covenant identity** (KIP-20) that the join carries forward and the payout retires. Enclave names the deal from it, in the words the public directory [kascov.io](https://kascov.io) uses, and links to it. Any party, or anyone they show the link to, can follow the deal on chain without trusting Enclave or the other parties.

## Costs

* **Enclave fee**: once, on the buyer's create. Never on join, release, refund, reclaim, or unwind, and never per party.
* **Network fees**: each covenant step pays Kaspa's minimum relay fee, which SureSign tops up from one of the acting party's ordinary Notes (the program itself releases only 1,000 sompi). About 0.002 KAS per step at the current floor.
* **Deal Desk messaging**: a handshake with a new counterparty places about 0.2 KAS with them and costs about 0.05 KAS in network fees; a sealed message costs a fraction of a cent. See [Deal Desk](/argon-docs/using-enclave/deal-desk.md#what-it-costs).

## Paperwork

**Paperwork** produces the deal's document: purpose, the recipient's steps, what the packet contains (locks, constructor, network) and what it never contains (no keys), the verbatim packet, and a QR code. **Copy packet**, **Save sheet**, and **Print** are available in both views. The same bytes travel as the deal card inside the room.
