The contract
How escrow works
One deal, one client, one worker, up to twenty funded milestones and four ways a milestone can end.
One deal, two wallets#
A deal joins one client and one worker. The client opens it and funds every milestone in the same transaction, in ETH or in USDG; more milestones can be added and funded later, up to 20. The deal also stores a review window (between 1 and 30 days) and a terms hash: the keccak-256 of the job post both sides read, so the agreement can be checked against the public post at any time.
Four ways a milestone ends#
| Ending | Who | When | Money goes to |
|---|---|---|---|
| Approved | client | any time while open | worker |
| Released after review | anyone | review window passed after a submission | worker |
| Refunded after deadline | anyone | deadline passed with no submission | client |
| Handed back | worker | any time while open | client |
Credits, then withdraw#
Endings never send money directly. They credit the receiver inside the contract, and the receiver calls withdraw(asset). That way a wallet that cannot receive, or a USDG holder the issuer has blocked, only ever blocks its own withdrawal, never anyone else's.