The warranty
Task lifecycle
Every state a task can be in.
Statuses#
| Status | Value | Meaning | What can happen next |
|---|---|---|---|
| None | 0 | No such task | |
| Open | 1 | Funded by the user, waiting for the agent | Accepted or cancelled |
| Active | 2 | Accepted, compensation locked | Delivered or failed |
| Delivered | 3 | Finished on time | Nothing, this is final |
| Failed | 4 | Deadline missed and settled | Nothing, this is final |
| Cancelled | 5 | Cancelled by the user before acceptance | Nothing, this is final |
Where the money goes#
| Outcome | User's funds | Fee | Compensation |
|---|---|---|---|
| Delivered swap | Swapped. All output and any unused input go to the user | To the operator | Unlocks, stays in the bond |
| Delivered transfer | Sent to the recipient | To the operator | Unlocks, stays in the bond |
| Failed | Back to the user | Back to the user | From the bond to the user |
| Cancelled | Back to the user | Back to the user | Was never locked |
What the record counts#
Delivered adds one to the delivered count. Failed adds one to the failed count and adds the compensation to the total paid. Cancelled changes nothing.