How Irium Escrow Works

A complete, plain-English walkthrough — no blockchain knowledge required.

The Scenario

Alice is a freelance developer. Bob wants to hire her to build a website for 50 IRM. They have never worked together. Alice does not know if Bob will pay after she delivers. Bob does not know if Alice will deliver after he pays. Neither wants to go first.

Irium escrow solves this. Bob locks 50 IRM on-chain before Alice does any work. The chain enforces the agreement — no bank, no lawyer, no intermediary.

1Alice and Bob agree on terms

Before anything goes on-chain, they agree on: the amount (50 IRM), what counts as delivery (a working website at an agreed URL), and a deadline (a block height — about 1 block per 10 minutes).

They write the terms into a document file. This file is hashed and recorded on-chain so neither party can claim the terms were different later.

2Bob creates the escrow agreement

Bob generates a one-time secret and creates the agreement:

SECRET=$(openssl rand -hex 32) SECRET_HASH=$(printf '%s' "$SECRET" | xxd -r -p | sha256sum | awk '{print $1}') DOCUMENT_HASH=$(sha256sum terms.txt | awk '{print $1}') irium-wallet agreement-create-simple-settlement --agreement-id website-project-001 --creation-time $(date +%s) --party-a "id=alice,name=Alice,role=freelancer" --party-b "id=bob,name=Bob,role=client" --amount 50 --secret-hash $SECRET_HASH --refund-timeout 21500 --document-hash $DOCUMENT_HASH --release-summary "Alice delivers completed website by block 21500" --refund-summary "Bob reclaims if website not delivered by block 21500" --out website-project-001.json

Bob sends the agreement JSON to Alice. Alice inspects it and confirms the terms are correct before anything is funded.

3Bob funds the escrow — money goes on-chain

Bob locks 50 IRM into the on-chain contract:

irium-wallet agreement-fund website-project-001.json --broadcast --rpc http://localhost:38300
The 50 IRM is now locked. Bob cannot take it back before block 21500. Alice can verify the funding independently and knows the money is waiting.
4Alice does the work

Alice builds the website. When it is ready, she notifies Bob for review.

5Bob accepts and reveals the secret

If Bob is satisfied with the delivery, he sends Alice the secret. Alice uses it to claim the funds:

irium-wallet agreement-release-eligibility website-project-001.json --secret $SECRET --destination <ALICE_ADDRESS> --rpc http://localhost:38300

The 50 IRM moves from the escrow output to Alice's address. The agreement is settled.

ALL POSSIBLE OUTCOMES

SituationOutcome
Alice delivers, Bob acceptsAlice receives 50 IRM
Alice delivers, Bob withholds secretAlice submits proof — attestor can release funds
Alice does not deliverBob reclaims 50 IRM automatically after timeout
Bob never responds after timeoutBob reclaims 50 IRM automatically
Bob tries to take funds back earlyImpossible — HTLC contract prevents it

WHAT DOES IT COST?

Two on-chain transactions: one to fund, one to release or refund. Each transaction costs approximately 0.001 IRM in network fees. Total cost for a complete agreement: roughly 0.002 IRM.

Full Walkthrough with CLI Commands Developer Integration Guide Questions — Telegram