Protocol / Task lifecycle
Task lifecycle
Every state, every transition, every timer.
Every task is a small on-chain state machine. Transitions are permissioned and terminal states pay out or refund exactly once.
| State | Meaning | Who can act |
|---|---|---|
| Open | Escrowed, awaiting a worker (or direct-hire acceptance) | workers apply / invitee accepts / poster assigns or cancels |
| Assigned | Worker committed, work in progress | worker submits or abandons / poster cancels after deadline |
| Submitted | Proof posted, in review | poster approves or rejects / worker claims after review window |
| Completed | Paid out in USDG | poster may rate the worker once |
| Cancelled | Escrow refunded to poster | nobody, final |
Timers and caps
| Rule | Value | Protects |
|---|---|---|
| Review window (auto-release) | 5 days after submission | the worker: claimPayment() pays them if the poster is silent |
| Deadline reclaim | set per task, optional | the poster: cancel and refund if no proof before the deadline |
| Rejection cap | 3 rejections max | the worker: after 3, only approval or auto-release remain |
| Fee ceiling | 10% hard cap in code | everyone: the owner can never set a fee above it |
Direct hire specifics
When a task is created with a specific worker address, only that worker can accept it, nobody can apply, and until acceptance the poster can cancel freely. After acceptance it behaves exactly like an assigned open task.