How Escrow Works

This guide walks you through the lifecycle of a Tscrow deal, from the first message to the final withdrawal.

1

Deal Creation (Off-Chain)

Everything starts in Telegram.

  • Negotiation: Buyer and Seller agree on terms (e.g., "I will pay 100 USDT for your $100 PayPal - Cash - Bank - Or for a service/goods").

  • Creation: One user creates the deal using the bot.

  • Joining: The other user (seller) "Joins" the deal.

2

Vault Deployment & Deposit

Once both parties join:

  • Deployment: The Bot (acting as Relayer) calls the VaultFactory to deploy your unique Tscrow Vault.

  • Verification: The bot gives you (Seller) the Vault Address. You can verify on a block explorer that this vault is initialized with the correct Buyer, Seller, and Amount.

3

The Exchange

  • Locked: Funds are now locked in the Vault. The Depositor cannot take them back without the Recipient's permission (or Admin intervention unless there is a dispute between two parties).

  • Delivery: The merchant delivers the goods/service (the agreed upon) via Telegram DM.

  • Verification: The crypto depositor checks the goods.

4

Completion (Happy Path)

If everything is good:

  • Release: The Depositor clicks "Release" in the bot.

  • On-Chain: The bot calls adminRelease() on the smart contract (or the Depositor calls release() directly via Etherscan/Web3).

  • Result: The contract state updates to Released. Funds are now allocated to the Recipient.

5

Cancellation (Refund Path)

Why "Cancellation" vs "Refund"?

We use Cancellation to describe the intent (the deal is off), while Refund describes the action (money moving back).

  • Cancellation: Can happen before money is sent (no refund needed, just a status update).

  • Refund: Only happens after money is locked in the vault.

What Happens in a Dispute?

When you click "Open Dispute", the deal enters a frozen state:

  • Status Locked: The bot updates the deal status to "🔴 Disputed" - off and on-chain

  • Admin Review: The Admin receives an alert and reviews the chat evidence (e.g., screenshots, video proof).

  • Final Outcome:

    • If Buyer wins: Admin triggers "Release" (Funds → Buyer).

    • If Seller wins: Admin triggers "Refund" (Funds → Seller).

Technical Note: On-chain, the smart contract state is set to 4 (Disputed). Neither party can withdraw funds (even from web3) until the admin triggers resolveDispute(true/false).

Summary of Flows

Action
Actor
Outcome

Deposit

Depositor

Funds Locked in Vault

Release

Depositor

Funds go to Recipient

Refund

Recipient

Funds return to Depositor

Dispute

Any Party

Funds Frozen until Admin resolves

Last updated