blockchain.lucas.zip

Subject: escrow for freelance work

Money and commerce. Funds that the platform cannot run away with. · Updated 6 September 2026

A client wants a piece of work done by a freelancer they have never met. Neither trusts the other with the money first. Today, a platform stands in the middle: it holds the payment, takes a cut, and decides disputes, and it can freeze accounts, change its fees, side with whoever it prefers, or disappear with the balance. Build the version where the middle is a contract.

Why this needs a chain

The funds for a job are locked in the contract at the moment the job is accepted. From then on they can move in exactly three ways: to the freelancer when the client confirms delivery, back to the client when the job is cancelled under the rules, or split by an arbiter in a dispute. The deployer of the contract cannot touch them. The platform, if there is one, cannot touch them. A court order cannot make the contract do anything it was not written to do. Both parties can read the rules before they commit a single wei.

What is still trusted: the arbiter, in disputes only. Your roles table should make that boundary precise, what an arbiter can and cannot do with money that is not in dispute.

Actors

RoleDoes
ClientPosts a job with a locked budget, confirms delivery, opens disputes
FreelancerAccepts a job, submits delivery, opens disputes
ArbiterResolves disputes by splitting the locked amount
AnyoneTriggers timeouts once a deadline has passed
Token issuer, if payment is an ERC-20For a fiat-backed stablecoin, can freeze any address, the escrow’s included. Not a role you chose; one your trust table must have
DeployerDeploys, and then, ideally, has no further power. If it keeps any, say which and why

Core features

The features that make this subject this subject. A delivery without them is a different, smaller project.

The escrow's states, and who may move a job between them.

The escrow's states, and who may move a job between them.

Extensions

Traps

What the demo should show

Two browser profiles, client and freelancer, on Base Sepolia. The client posts a job and the locked balance appears on the explorer. The freelancer accepts and delivers. Then one of the two paths, live: the happy release, with the freelancer’s balance changing; or a dispute, with a third profile as arbiter splitting the funds. Then a failure: the client tries to release a job that has not been delivered, and the transaction reverts with a readable reason in the UI. Finally, the timeout path, which you will have pre-staged with a job whose deadline has already passed, because the jury will not wait a day.