# 5. Cost Reduction & SLA Prioritization

**Summary:** we cut verification cost and latency by triaging work before PoV, routing windows by SLA class, and removing rework. PoV rules do not change: quorum, equality, and One-Claim are enforced at the Gate. What changes is which items reviewers see first and how much manual time each item needs.

### What we optimize

We want **lower cost per verified claim**, faster T2C (time-to-cash), and fewer attestor minutes per window, without weakening PoV. The levers are simple: send “easy” windows straight through, quarantine only what needs eyes, and give high-value items a faster lane.

### SLA classes

Each window gets an SLA tag at ingestion:

* **Standard** — target t\_verify ≤ 24h. Default for most energy and carbon.
* **Priority** — target t\_verify ≤ 2h. Triggered by queue size, buyer deadlines, or enterprise plans.
* **Critical** — target t\_verify ≤ 30m. Used for large settled\_edusd or milestone tranches.

The tag is `sla_class`; the target is `sla_target_min`. These are inputs to routing—PoV still decides admissibility.

### How items are routed (clear playbook)

1. Compute a simple priority score from `sla_class, settled_edusd` (or expected), quarantine\_reason, and flagged state.
2. If the window is “easy” (bounds ok, no overlap, normal rate-of-change), mark PASS and push to attestor batch for the right SLA.
3. If suspicious but not wrong, mark QUARANTINED with a precise code (for example SPIKE\_RATE), and route to a human queue.
4. If clearly wrong, REJECT with a specific code (for example OVERLAPPING\_WINDOW).

{% hint style="info" %}
**Important**: routing changes order and reviewer effort, not PoV invariants.
{% endhint %}

### Dedup and reuse

We never ask reviewers to check the same thing twice.

* **Reuse the exact evidenceHash:** if a duplicate payload arrives, short-circuit to the prior decision.
* **Cache method outputs** keyed by `method_hash` and `inputs_hash` for nearby windows (for example, same day and device class).
* **Decode EAS attestations** once per batch; pass handles between queue workers instead of re-parsing.

### Simple priority function (TypeScript)

```typescript
type SLA = "standard" | "priority" | "critical";

export function priorityScore(params: {
  sla_class: SLA; expected_settlement_edusd: number;
  quarantine_reason?: string; flagged?: boolean;
}) {
  let score = 0;
  // SLA base
  score += params.sla_class === "critical" ? 1000
       :  params.sla_class === "priority" ? 500 : 100;
  // Money matters
  score += Math.log10(Math.max(1, params.expected_settlement_edusd)) * 50;
  // Clean items first
  if (!params.quarantine_reason && !params.flagged) score += 100;
  // Quarantined still move, but behind clean items
  if (params.quarantine_reason) score -= 50;
  if (params.flagged) score -= 200;
  return score;
}
```

The queue pops highest score first; workers sized per SLA class hit their `sla_target_min`.

### Who pays for fast lanes<br>

Protocol fees are still in EDM at settlement (with 50% burn). SLA services (review time) are a separate EDUSD service fee paid to attestors or the program—transparent, metered, and off the PoV path. Never discount the burn; if you rebate, touch the treasury half only.

### House rules that reduce cost without risk

Explain them plainly so reviewers and auditors trust the process.

* **Quarantine ratio** — keep `quarantined / total ≤ 10%` by improving rules, not by forcing PASS.
* **Reviewer budget** — cap manual minutes per window; if exhausted, escalate to Priority queue or request more evidence.
* **Batch similar items** — same `device_id, adjacent start_ts, same method_hash` → one reviewer pass, many windows.
* **Early stop** — if any hard failure (overlap, non-canonical), stop the pipeline and respond immediately with the exact error code.

### KPI scoreboard (you’ll publish these)

* **SLA attainment** — % of windows verified within `sla_target_min` by class
* **Cost per verified MWh** — total reviewer minutes ÷ verified MWh
* **Quarantine yield** — % quarantined that turn into REJECT (the higher, the better the rules)
* **T2C** — median `settlement_ts − end_ts`
* **Rework rate** — % of items reopened after decision (target near zero)

### Guardrails that never change

* **Gate still rules:** the PoV Gate enforces quorum, equality, and One-Claim.
* **No auto-swap:** if a user lacks EDM at settlement, the call reverts even if EDUSD is present.
* **Proof mints** are gas-only on Base; fees apply only at settlement.

### Conformance

Add `sla_class` and `sla_target_min` to the queue record; compute a transparent priority\_score; short-circuit exact duplicates by `evidenceHash`; batch by `method_hash` where possible; publish SLA and KPI dashboards; never bypass the PoV Gate or One-Claim exclusivity.

<img src="https://4141632533-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvCX7EzuE9nwtTuIaxXGQ%2Fuploads%2FpuuTBgQyHRA62iGQxZ0Z%2Ffile.excalidraw.svg?alt=media&#x26;token=d03e6d61-5f59-444c-9a01-4459204e3ccb" alt="" class="gitbook-drawing">

{% hint style="success" %}
**Bottom line:** prioritize what matters, quarantine what’s suspicious, and stop what’s wrong—while keeping PoV intact. That’s how you lower cost, hit SLAs, and keep trust.
{% endhint %}
