# Terra Escrow: non-custodial smart-contract escrow

> Terra Escrow is non-custodial crypto escrow: a smart contract escrow for USDT and USDC with milestones and a named arbiter. Testnet beta first. Early access.

Source: https://escrow.terrawallet.us/

**Status:** Terra Escrow is in early access. Testnet beta first. An independent smart-contract audit before mainnet funds.

## Crypto escrow where a smart contract holds the money

Terra Escrow is a smart contract escrow for USDT and USDC. The buyer's payment locks in a contract, never with Terra, and leaves only to the buyer or the seller, by rules both sides agreed before a single coin moved.

Testnet beta first. An independent smart-contract audit before mainnet funds.

## How smart contract escrow releases funds

Every deal gets its own contract, holding the exact amount in a stablecoin. Only these triggers can move it, and the contract enforces each one.

- **Buyer confirmation**: The buyer releases the whole deal, or one milestone, to the seller.
- **Timeout rules set at creation**: Auto-release after the inspection window if no dispute is open. A refund if the seller never accepts. A fallback if a dispute is never decided, so funds can't be stuck forever.
- **The named arbiter's decision**: Only during a dispute, the arbiter named at creation decides how the disputed amount splits between buyer and seller. The arbiter sets amounts, never addresses.
- **Seller refund**: The seller can return funds to the buyer at any time. It only ever helps the buyer.

_An arbiter can only send a deal's funds to that deal's buyer or seller. Not to themselves, not to Terra, not to anyone else._

## Everything a fair deal needs

- **Milestones**: Split a deal into milestones, each with its own amount, deadline and release.
- **Buyer, seller, optional arbiter**: The arbiter can be Terra's arbitration service, your marketplace, or a named third party. An agent can coordinate but never move funds.
- **Evidence and disputes**: Either side can open a dispute within the window set at creation. Both add statements and files, which are virus-scanned, stored privately and hashed into the timeline.
- **Deal timelines**: Every event in one timeline: on-chain events with transaction links, plus messages, evidence and deadline reminders.
- **Stablecoin-first**: USDT and USDC from a per-network allowlist, matched by contract address, never by symbol. The contract checks the funded amount exactly.
- **Signed webhooks**: `escrow.funded`, `escrow.released`, `escrow.refunded`, `escrow.disputed` and `escrow.resolved`, sent only after on-chain confirmation.

## Designed so no one can run off with the money

- **Terra never holds funds**: No Terra wallet, no Terra key. A breach of Terra's servers can't move escrowed money.
- **One deal, one contract**: Each deal is its own contract, cloned from one fixed implementation, so a problem in one deal can't touch another's balance.
- **Not upgradeable**: No upgrade key, no self-destruct, no owner switch that can move, freeze or seize deal funds. The only admin power is pausing NEW deals.
- **Terms bound on chain**: The deal stores a hash of its terms, so every party can prove they're reading the same deal as the hosted page.
- **You sign, Terra prepares**: Every action that moves funds is signed in the party's own wallet: Terra Wallet, or any WalletConnect or browser wallet.
- **Chain truth**: A deal's status changes only on confirmed contract events. No callback or page action can change it.

- Testnet beta first. An independent smart-contract audit before mainnet funds.
- Unit, fuzz, invariant and formal tests of the core rules: funds out never exceed funds in, payouts only to the buyer or seller, every deal can always finish.
- A legal review of the arbiter role and dispute process before launch.
- Mainnet starts with per-deal amount limits.
- Stablecoin issuers can freeze addresses or pause their contracts. Every deal page says so.

## EVM first, then Tron and Solana

Contracts launch on Ethereum, BNB Smart Chain, Polygon, Base and Arbitrum. Tron and Solana follow, each with its own audit.

## An escrow API and SDK for platforms

Create deals from your backend, send users to hosted deal pages, and follow every deal from the Deals section of your dashboard.

- `/api/v1/escrow` routes with `escrow:read` and `escrow:write` scopes.
- An `@terrawallet/escrow` client (the name may change).
- Hosted deal pages on escrow.terrawallet.us for buyers, sellers and arbiters.
- Filters, exports, webhook settings and escrow keys in the dashboard.

Create a deal (Preview API, subject to change):

```ts
// Preview API, subject to change. Package names may change.
import { TerraEscrow } from "@terrawallet/escrow";

const escrow = new TerraEscrow(process.env.TERRA_SECRET_KEY); // escrow:write scope

const deal = await escrow.deals.create({
  network: "base",
  token: "USDC",
  buyer: "0x7a1...d3f2",
  seller: "0x3fb...a811",
  arbiter: "0xc04...5e7b",            // optional, named at creation
  milestones: [
    { title: "Concepts", amount: "800.00", inspectionDays: 3 },
    { title: "Final files", amount: "1600.00", inspectionDays: 3 },
  ],
  fallback: "refund_buyer",           // if a dispute is never decided
});

// deal.url: the hosted deal page on escrow.terrawallet.us
// Webhooks: escrow.funded, escrow.released, escrow.refunded,
//           escrow.disputed, escrow.resolved (all signed)
```

## Frequently asked questions

### Does Terra hold the escrowed funds?

No. Funds lock in the deal's own smart contract. Terra has no wallet and no key that can move them.

### Who can release the money?

The buyer by confirming, a timeout rule fixed when the deal was created, or the named arbiter during a dispute. The seller can also refund the buyer at any time.

### Can the arbiter take the money?

No. The arbiter only decides how the disputed amount splits between the deal's buyer and seller. It sets amounts, never addresses.

### Is the escrow contract audited?

Not yet. Terra Escrow starts as a testnet beta, and an independent smart-contract audit comes before any mainnet funds.

### Which tokens and networks are supported?

USDT and USDC, matched by contract address. Contracts launch on Ethereum, BNB Smart Chain, Polygon, Base and Arbitrum, then Tron and Solana, each with its own audit.

### Can I use USDT escrow for my marketplace?

Yes, that is what the escrow API is for: create deals from your backend, send users to hosted deal pages, and follow every deal in your dashboard.

### When can I use Terra Escrow?

It is in early access. Request access to join the testnet beta.
