# Decentralized Escrow

Buy and sell Bitcoin securely using USDT — with smart contract escrow, broker facilitation, and zero counterparty risk.

IBVM Escrow is a production-grade, non-custodial escrow platform that enables peer-to-peer cryptocurrency exchange between Bitcoin and USDT without relying on any central authority. Built on BNB Smart Chain with deep integration into the IBVM ecosystem, it uses audited smart contracts to hold, release, and protect funds — so neither party can walk away without fulfilling their obligations.

Whether you're a trader exchanging BTC for USDT, a broker managing a book of client deals, or an institution handling high-value cross-border transactions — IBVM Escrow handles it all from a unified dashboard. No intermediaries, no custody, no surprises.

***

### Key Features

#### Trustless Smart Contract Escrow

Every transaction is governed entirely by an audited on-chain escrow contract. USDT is locked inside the contract at the start of the deal and can only be released or refunded via cryptographically-signed authorization. The platform holds no funds, controls no keys, and has no power to override the contract rules.

#### Bitcoin + USDT Cross-Chain Settlement

IBVM Escrow bridges two separate networks in a single deal flow. The buyer locks USDT on BNB Smart Chain; the seller delivers Bitcoin on the Bitcoin network. Once both sides fulfill their obligation, the escrowed USDT is released to the seller — no wrapped assets, no bridges, no synthetic instruments.

#### Broker Facilitation System

Brokers are first-class participants. A licensed broker can register clients, create orders on their behalf, set per-deal commission rates for both the buyer side and the seller side, and manage an active deal book from a dedicated dashboard. Broker fees are enforced at the contract level — not calculated off-chain — so commissions are always settled accurately and automatically.

#### Real-Time BTC Price Conversion

An on-chain price oracle converts BTC amounts to USDT equivalents in real time at the moment of order creation. The platform displays exactly how much USDT the buyer must lock, including platform fees and broker commissions, before any wallet interaction occurs. No hidden math, no post-signing surprises.

#### Insurance-Backed Security

Escrow contracts are backed by an additional insurance layer that provides dispute coverage for qualifying transactions. The insurance mechanism gives both parties confidence that even in edge cases — connectivity failures, chain congestion, contested outcomes — there is a resolution path available.

#### Non-Custodial by Design

Your private keys never leave your wallet. All transactions are signed and broadcast directly through your own injected wallet provider or WalletConnect session. The platform never stores keys, seeds, passwords, or custody over any assets.

#### Transparent Fee Structure

The exact fee breakdown — platform fee, buyer broker commission, seller broker commission — is calculated and displayed before you sign anything. All fees are enforced on-chain at contract execution time. There are no off-chain deductions, no fee estimates that differ from reality, and no hidden costs.

#### Multi-Wallet Support

Connect any major EVM wallet for USDT interactions and any major Bitcoin wallet for BTC tracking. MetaMask, Coinbase Wallet, Unisat, Phantom, and any Reown AppKit-compatible wallet are fully supported. Hardware wallets are also supported through AppKit.

#### Live Transaction Dashboard

Every deal — pending, active, completed, or disputed — is tracked in real time on a single dashboard. Brokers see their full order book; traders see their deal history with status updates, transaction hashes, and explorer links. BTC price charts and deal analytics are surfaced inline.

#### In-App Messaging

A built-in messaging layer lets buyers, sellers, and brokers communicate within the platform without switching to external channels — keeping deal coordination and dispute communication auditable and in context.

***

### How It Works

#### 1. Connect Your Wallets

Connect an EVM wallet (MetaMask, Coinbase, or any AppKit-compatible wallet) to handle USDT on BNB Smart Chain. Optionally connect a Bitcoin wallet (Unisat or Phantom) for BTC transaction tracking. Both wallets operate independently — the platform manages the coordination between them.

#### 2. Browse or Create an Order

Buyers browse the order marketplace to find an available deal that matches their needs. Brokers create orders on behalf of clients, specifying the BTC amount, the USDT equivalent (calculated from the oracle), the buyer and seller wallet addresses, and the commission percentages for each side.

#### 3. Review the Full Fee Breakdown

Before any wallet action, the platform displays the complete cost breakdown:

* Base USDT amount (BTC value at current oracle price)
* Platform fee (percentage of transaction value)
* Buyer broker fee (percentage deducted from buyer's USDT)
* Seller broker fee (percentage added to seller's USDT receipt)
* Final USDT amount the buyer must lock

#### 4. Approve and Lock USDT

The buyer executes two sequential wallet transactions:

1. **Approve** — Authorize the escrow contract to spend the required USDT from the buyer's wallet.
2. **Lock** — Call `lockUSDT()` on the escrow contract, which transfers USDT + all fees into the contract's custody and emits a `TransactionCreated` event on-chain.

The deal is now live and the transaction status changes to pending.

#### 5. Send Bitcoin

With USDT safely locked in escrow, the buyer sends the agreed BTC amount to the seller's Bitcoin address. The escrow contract holds USDT until this off-chain step is confirmed — giving the seller confidence that funds exist before releasing Bitcoin.

#### 6. Seller Confirms Bitcoin Receipt

Once the seller verifies that the BTC has arrived in their Bitcoin wallet, they confirm receipt through the dashboard. This triggers the authorization signing process on the backend.

#### 7. Claim or Refund

* **Claim (normal flow):** The buyer initiates the `claimToken()` transaction, providing a cryptographic signature (v, r, s) issued by the platform's authorized signer. The escrow contract verifies the signature and releases USDT directly to the seller's wallet. A `TokenClaimed` event is emitted on-chain.
* **Refund (dispute or cancellation):** If the deal cannot be completed, the seller can initiate `withdrawToken()` with a valid signature to return the locked USDT to the buyer. A `TokenWithdrawn` event is emitted on-chain.

In both paths, the outcome is final, on-chain, and verifiable via BSCScan.

***

### User Roles

| Role   | Capabilities                                                                         |
| ------ | ------------------------------------------------------------------------------------ |
| Buyer  | Browse orders, lock USDT, send BTC, initiate claim                                   |
| Seller | Confirm BTC receipt, receive released USDT                                           |
| Broker | Register clients, create orders, set commissions, manage deal book, earn broker fees |

***

### Fee Structure

| Fee Type                 | Charged To | Mechanism                                             |
| ------------------------ | ---------- | ----------------------------------------------------- |
| Platform fee             | Buyer      | On-chain, percentage of transaction value via `fee()` |
| Buyer broker commission  | Buyer      | On-chain, deducted from locked USDT                   |
| Seller broker commission | Seller     | On-chain, added to USDT release amount                |

All fees are calculated in real time and displayed before any wallet interaction. Fee rates are stored in the smart contract and are publicly readable. There are no off-chain or hidden deductions.

***

### Membership Tiers

High-value participants can qualify for elevated deal tiers with access to larger transaction limits and priority support.

| Tier             | Qualifying Deal Value         |
| ---------------- | ----------------------------- |
| Millionaire Club | $1,000,000 USD equivalent     |
| Billionaire Club | $1,000,000,000 USD equivalent |

***

### Supported Networks

| Network                 | Chain ID | Explorer               |
| ----------------------- | -------- | ---------------------- |
| BNB Smart Chain Mainnet | 56       | bscscan.com            |
| BNB Smart Chain Testnet | 97       | testnet.bscscan.com    |
| Bitcoin Mainnet         | —        | mempool.space          |
| Bitcoin Testnet         | —        | mempool.space/testnet4 |

***

### Supported Wallets

#### EVM Wallets (USDT on BSC)

| Wallet           | Connection Method               |
| ---------------- | ------------------------------- |
| MetaMask         | Injected provider               |
| Coinbase Wallet  | Injected provider               |
| Any EVM wallet   | Reown AppKit / WalletConnect v2 |
| Hardware wallets | Reown AppKit                    |

#### Bitcoin Wallets (BTC tracking)

| Wallet                | Connection Method            |
| --------------------- | ---------------------------- |
| Unisat                | Injected provider            |
| Phantom               | Reown Bitcoin Adapter        |
| Any compatible wallet | Reown AppKit Bitcoin Adapter |

***

### Smart Contracts

#### CrossChainEscrow

The primary escrow contract deployed on BNB Smart Chain. Handles USDT locking, fee collection, cryptographic signature verification, and token release or refund.

| Function                  | Description                                                  |
| ------------------------- | ------------------------------------------------------------ |
| `lockUSDT()`              | Lock USDT + fees in escrow and register the transaction      |
| `claimToken()`            | Release escrowed USDT to seller after signature verification |
| `withdrawToken()`         | Return escrowed USDT to buyer after signature verification   |
| `fee()`                   | Read the current platform fee rate                           |
| `getUserTransactionIds()` | Retrieve all transaction IDs associated with an address      |
| `transactions()`          | Fetch full details of a specific transaction                 |

#### USDT (ERC-20)

Standard ERC-20 USDT token contract on BSC. The buyer must call `approve()` to authorize the escrow contract before locking funds.

#### Price Oracle (CrossChainClaim)

On-chain oracle that exposes `getAmountInDollars()` to convert a given BTC amount into its real-time USDT equivalent. Used at order creation time to calculate the exact USDT lock amount.

***

### Get Started

Access IBVM Escrow and connect your wallets to begin a deal. Testnet users can use BSC Testnet BNB for gas and testnet USDT to explore the full deal flow risk-free — with no real assets at stake.

Brokers can register their account, onboard clients, and begin creating orders immediately after wallet connection — no approval process required.

**Launch IBVM Escrow →**


---

# 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://ibvm.gitbook.io/ibvm-doc/decentralized-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.
