{
  "format": "tondi-educational-model/1",
  "kind": "local-state-model",
  "executesVm": false,
  "submitsTransactions": false,
  "specification": {
    "task": "DEMO-01",
    "amount": 10,
    "interval": 60,
    "maxRuns": 4,
    "attemptFee": 1,
    "initialCredits": 40,
    "initialBudget": 2,
    "topUp": 2,
    "maxBudget": 8,
    "retryDelay": 15,
    "retryLimit": 2
  },
  "initial": {
    "task": "DEMO-01",
    "time": 0,
    "nextDue": 60,
    "runs": 0,
    "attempts": 0,
    "budget": 2,
    "funding": 2,
    "fees": 0,
    "refunded": 0,
    "treasury": 40,
    "recipient": 0,
    "status": "ready",
    "outcome": "initial",
    "retries": 0,
    "retryDue": null,
    "suspensionReason": null
  },
  "steps": [
    {
      "action": "run",
      "before": {
        "task": "DEMO-01",
        "time": 0,
        "nextDue": 60,
        "runs": 0,
        "attempts": 0,
        "budget": 2,
        "funding": 2,
        "fees": 0,
        "refunded": 0,
        "treasury": 40,
        "recipient": 0,
        "status": "ready",
        "outcome": "initial",
        "retries": 0,
        "retryDue": null,
        "suspensionReason": null
      },
      "after": {
        "task": "DEMO-01",
        "time": 60,
        "nextDue": 120,
        "runs": 1,
        "attempts": 1,
        "budget": 1,
        "funding": 2,
        "fees": 1,
        "refunded": 0,
        "treasury": 30,
        "recipient": 10,
        "status": "ready",
        "outcome": "settled",
        "retries": 0,
        "retryDue": null,
        "suspensionReason": null
      }
    },
    {
      "action": "reject",
      "before": {
        "task": "DEMO-01",
        "time": 60,
        "nextDue": 120,
        "runs": 1,
        "attempts": 1,
        "budget": 1,
        "funding": 2,
        "fees": 1,
        "refunded": 0,
        "treasury": 30,
        "recipient": 10,
        "status": "ready",
        "outcome": "settled",
        "retries": 0,
        "retryDue": null,
        "suspensionReason": null
      },
      "after": {
        "task": "DEMO-01",
        "time": 120,
        "nextDue": 120,
        "runs": 1,
        "attempts": 2,
        "budget": 0,
        "funding": 2,
        "fees": 2,
        "refunded": 0,
        "treasury": 30,
        "recipient": 10,
        "status": "suspended",
        "outcome": "rejected",
        "retries": 1,
        "retryDue": 135,
        "suspensionReason": "budget"
      }
    },
    {
      "action": "topUp",
      "before": {
        "task": "DEMO-01",
        "time": 120,
        "nextDue": 120,
        "runs": 1,
        "attempts": 2,
        "budget": 0,
        "funding": 2,
        "fees": 2,
        "refunded": 0,
        "treasury": 30,
        "recipient": 10,
        "status": "suspended",
        "outcome": "rejected",
        "retries": 1,
        "retryDue": 135,
        "suspensionReason": "budget"
      },
      "after": {
        "task": "DEMO-01",
        "time": 120,
        "nextDue": 120,
        "runs": 1,
        "attempts": 2,
        "budget": 2,
        "funding": 4,
        "fees": 2,
        "refunded": 0,
        "treasury": 30,
        "recipient": 10,
        "status": "suspended",
        "outcome": "funded",
        "retries": 1,
        "retryDue": 135,
        "suspensionReason": "budget"
      }
    },
    {
      "action": "resume",
      "before": {
        "task": "DEMO-01",
        "time": 120,
        "nextDue": 120,
        "runs": 1,
        "attempts": 2,
        "budget": 2,
        "funding": 4,
        "fees": 2,
        "refunded": 0,
        "treasury": 30,
        "recipient": 10,
        "status": "suspended",
        "outcome": "funded",
        "retries": 1,
        "retryDue": 135,
        "suspensionReason": "budget"
      },
      "after": {
        "task": "DEMO-01",
        "time": 120,
        "nextDue": 120,
        "runs": 1,
        "attempts": 2,
        "budget": 2,
        "funding": 4,
        "fees": 2,
        "refunded": 0,
        "treasury": 30,
        "recipient": 10,
        "status": "ready",
        "outcome": "resumed",
        "retries": 1,
        "retryDue": 135,
        "suspensionReason": null
      }
    },
    {
      "action": "run",
      "before": {
        "task": "DEMO-01",
        "time": 120,
        "nextDue": 120,
        "runs": 1,
        "attempts": 2,
        "budget": 2,
        "funding": 4,
        "fees": 2,
        "refunded": 0,
        "treasury": 30,
        "recipient": 10,
        "status": "ready",
        "outcome": "resumed",
        "retries": 1,
        "retryDue": 135,
        "suspensionReason": null
      },
      "after": {
        "task": "DEMO-01",
        "time": 135,
        "nextDue": 180,
        "runs": 2,
        "attempts": 3,
        "budget": 1,
        "funding": 4,
        "fees": 3,
        "refunded": 0,
        "treasury": 20,
        "recipient": 20,
        "status": "ready",
        "outcome": "settled",
        "retries": 0,
        "retryDue": null,
        "suspensionReason": null
      }
    },
    {
      "action": "run",
      "before": {
        "task": "DEMO-01",
        "time": 135,
        "nextDue": 180,
        "runs": 2,
        "attempts": 3,
        "budget": 1,
        "funding": 4,
        "fees": 3,
        "refunded": 0,
        "treasury": 20,
        "recipient": 20,
        "status": "ready",
        "outcome": "settled",
        "retries": 0,
        "retryDue": null,
        "suspensionReason": null
      },
      "after": {
        "task": "DEMO-01",
        "time": 180,
        "nextDue": 240,
        "runs": 3,
        "attempts": 4,
        "budget": 0,
        "funding": 4,
        "fees": 4,
        "refunded": 0,
        "treasury": 10,
        "recipient": 30,
        "status": "suspended",
        "outcome": "settled",
        "retries": 0,
        "retryDue": null,
        "suspensionReason": "budget"
      }
    },
    {
      "action": "topUp",
      "before": {
        "task": "DEMO-01",
        "time": 180,
        "nextDue": 240,
        "runs": 3,
        "attempts": 4,
        "budget": 0,
        "funding": 4,
        "fees": 4,
        "refunded": 0,
        "treasury": 10,
        "recipient": 30,
        "status": "suspended",
        "outcome": "settled",
        "retries": 0,
        "retryDue": null,
        "suspensionReason": "budget"
      },
      "after": {
        "task": "DEMO-01",
        "time": 180,
        "nextDue": 240,
        "runs": 3,
        "attempts": 4,
        "budget": 2,
        "funding": 6,
        "fees": 4,
        "refunded": 0,
        "treasury": 10,
        "recipient": 30,
        "status": "suspended",
        "outcome": "funded",
        "retries": 0,
        "retryDue": null,
        "suspensionReason": "budget"
      }
    },
    {
      "action": "resume",
      "before": {
        "task": "DEMO-01",
        "time": 180,
        "nextDue": 240,
        "runs": 3,
        "attempts": 4,
        "budget": 2,
        "funding": 6,
        "fees": 4,
        "refunded": 0,
        "treasury": 10,
        "recipient": 30,
        "status": "suspended",
        "outcome": "funded",
        "retries": 0,
        "retryDue": null,
        "suspensionReason": "budget"
      },
      "after": {
        "task": "DEMO-01",
        "time": 180,
        "nextDue": 240,
        "runs": 3,
        "attempts": 4,
        "budget": 2,
        "funding": 6,
        "fees": 4,
        "refunded": 0,
        "treasury": 10,
        "recipient": 30,
        "status": "ready",
        "outcome": "resumed",
        "retries": 0,
        "retryDue": null,
        "suspensionReason": null
      }
    },
    {
      "action": "run",
      "before": {
        "task": "DEMO-01",
        "time": 180,
        "nextDue": 240,
        "runs": 3,
        "attempts": 4,
        "budget": 2,
        "funding": 6,
        "fees": 4,
        "refunded": 0,
        "treasury": 10,
        "recipient": 30,
        "status": "ready",
        "outcome": "resumed",
        "retries": 0,
        "retryDue": null,
        "suspensionReason": null
      },
      "after": {
        "task": "DEMO-01",
        "time": 240,
        "nextDue": 240,
        "runs": 4,
        "attempts": 5,
        "budget": 1,
        "funding": 6,
        "fees": 5,
        "refunded": 0,
        "treasury": 0,
        "recipient": 40,
        "status": "completed",
        "outcome": "settled",
        "retries": 0,
        "retryDue": null,
        "suspensionReason": null
      }
    },
    {
      "action": "cancel",
      "before": {
        "task": "DEMO-01",
        "time": 240,
        "nextDue": 240,
        "runs": 4,
        "attempts": 5,
        "budget": 1,
        "funding": 6,
        "fees": 5,
        "refunded": 0,
        "treasury": 0,
        "recipient": 40,
        "status": "completed",
        "outcome": "settled",
        "retries": 0,
        "retryDue": null,
        "suspensionReason": null
      },
      "after": {
        "task": "DEMO-01",
        "time": 240,
        "nextDue": 240,
        "runs": 4,
        "attempts": 5,
        "budget": 0,
        "funding": 6,
        "fees": 5,
        "refunded": 1,
        "treasury": 0,
        "recipient": 40,
        "status": "cancelled",
        "outcome": "cancelled",
        "retries": 0,
        "retryDue": null,
        "suspensionReason": null
      }
    }
  ],
  "final": {
    "task": "DEMO-01",
    "time": 240,
    "nextDue": 240,
    "runs": 4,
    "attempts": 5,
    "budget": 0,
    "funding": 6,
    "fees": 5,
    "refunded": 1,
    "treasury": 0,
    "recipient": 40,
    "status": "cancelled",
    "outcome": "cancelled",
    "retries": 0,
    "retryDue": null,
    "suspensionReason": null
  }
}
