# On-Chain Escrow

When a buyer purchases a pre-sale listing, their USDC is locked in a smart contract — not sent directly to the vendor. Funds are only released once the platform confirms delivery, protecting both sides of the transaction.

## How It Works

1. **Buyer pays** — at checkout, the buyer approves a USDC spend and the funds are deposited into the Blocksmiths escrow contract. The order is marked **HELD**.
2. **Vendor delivers** — the vendor uploads the final product and updates the listing to its final type (e.g. One-Time Purchase or License Key).
3. **Admin releases** — a Blocksmiths admin reviews the delivery and releases the funds to the vendor. The order is marked **DELIVERED** and the buyer gains access.

If the vendor does not deliver, the admin can **refund** the buyer directly from the escrow contract. No manual USDC transfers — everything settles on-chain.

## Supported Chains

Escrow is available on all chains Blocksmiths supports for USDC payments:

| Chain    | Contract type        |
| -------- | -------------------- |
| Base     | Solidity (EVM)       |
| Ethereum | Solidity (EVM)       |
| Polygon  | Solidity (EVM)       |
| Solana   | Anchor program (PDA) |

## Escrow States

| State       | Meaning                                             |
| ----------- | --------------------------------------------------- |
| `HELD`      | Funds locked in the contract, awaiting admin action |
| `RELEASED`  | Funds sent to the vendor — order delivered          |
| `REFUNDED`  | Funds returned to the buyer                         |
| `CANCELLED` | Order cancelled, funds returned to the buyer        |

## For Buyers

* Your USDC never touches the vendor's wallet until delivery is confirmed.
* If the pre-sale is not delivered as described, open a dispute and the admin can refund you directly from the contract.
* You can track your order status from your order page.

## For Vendors

* Escrow only applies to pre-sale orders. All other product types (One-Time Purchase, Subscription, License Key, Source Code Drop) settle immediately.
* Once you deliver and the admin releases escrow, funds arrive in your wallet on-chain — no withdrawal step needed.
* Deliver on time and as described to avoid refunds.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.blocksmiths.tech/vendors/idea-pre-sale/escrow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
