Escrow

Trustless payments with
smart contract escrow

Deploy on-chain escrow contracts with arbitration, platform fees, and dispute resolution. Buyer protection backed by DERO's blockchain — not trust.

Get Started View Contracts

The escrow lifecycle

Deploy, deposit, and resolve — watch the full escrow flow from contract creation to fund release.

Escrow — Smart Contract Flow
Buyer
Contract
Seller

Deploying escrow contract

SCID: a7b3c9d1e5...deploying

Amount: 100 DEROFee: 2%Expiry: 720 blocks

Seven states, every path covered

The escrow contract tracks every possible resolution.

0awaiting_deposit
1funded
2released
3refunded
4expired_claimed
5disputed
6arbitrated

On-Chain Security

Funds are locked in a DERO smart contract. No one can move them without meeting the contract conditions.

Arbitration

Designate a neutral arbitrator who can resolve disputes. Buyer gets a refund or seller gets paid.

Platform Fees

Automatic fee deduction on successful transactions. Configurable percentage collected by the contract owner.

Block Expiration

Escrows expire after a configurable number of blocks. Seller can claim funds after the expiration window.

Dispute Resolution

Buyers can dispute before confirming delivery. Disputes lock funds until the arbitrator resolves them.

DVM-BASIC Contracts

Open source smart contracts in DERO's native language. Auditable, immutable, transparent.

Deploy an escrow in code

The EscrowManager handles contract deployment, lifecycle polling, and event handling.

escrow-example.ts
import { EscrowManager } from "dero-pay/escrow";
import { deroToAtomic } from "dero-pay";

const manager = new EscrowManager({
  walletRpcUrl: "http://127.0.0.1:10103/json_rpc",
  daemonRpcUrl: "http://127.0.0.1:10102/json_rpc",
});

const escrow = await manager.create({
  seller: "dero1qy...seller-address",
  arbitrator: "dero1qy...arbitrator-address",
  amount: deroToAtomic("100.0"),
  feeBasisPoints: 200,
  expiryBlocks: 720,
});

console.log("SCID:", escrow.scid);
manager.on("funded", (e) => console.log("Deposited:", e.amount));
manager.on("released", (e) => console.log("Released to seller"));