Skip to content

Data quality: Negative time_to_release values in escrows #19

@crtahlin

Description

@crtahlin

Problem

Some escrow records contain negative values for timing metrics:

{
  "id": 39,
  "time_to_release": -14078,
  "time_to_fund": 43,
  "state": "released"
}

Negative `time_to_release` (-14078 seconds ≈ -4 hours) is logically impossible - you can't release before funding.

Observed in

Multiple released escrows have negative timing values. This suggests either:

  1. Clock skew between systems
  2. Calculation bug in the indexer
  3. Events processed out of order
  4. Timestamps recorded incorrectly

Impact

  • Minor: Metrics/analytics would be incorrect
  • Could indicate deeper indexer issues
  • Erodes trust in platform data accuracy

Expected Behavior

All timing metrics should be:

  • Non-negative (≥ 0)
  • Logically consistent (fund → commit → release → claim order)

Suggested Fix

  1. Investigate root cause - Check indexer logic for timing calculations
  2. Add validation - Reject/flag negative values on write
  3. Clean up data - Set invalid values to null or recalculate from timestamps

Acceptance Criteria

  • Root cause identified
  • New escrows have valid timing metrics
  • Existing invalid data cleaned up or flagged

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3-lowLow: Polish and hardeningbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions