Skip to content

Observability: emit explicit participant loss outcome events during settlement #168

Description

@josephchimebuka

Summary

Complement payout/refund events with explicit loss outcome events for losing participants.

Why this matters

Analytics and user notifications need loss signals without inferring from absence of payout events.

Where to work

  • contracts/src/contract.rs (settlement loops)
  • contracts/src/tests/resolution.rs
  • docs/EVENT_SCHEMA.md

What to implement

  1. Emit outcome_loss (or equivalent) per losing user.
  2. Include round id, mode, stake, and side/prediction metadata.
  3. Add event assertions in both modes.

Acceptance Criteria

  • Winners, losers, and refunds all have explicit event types.
  • Event counts match participant outcomes.
  • Schema docs updated.

Final result

Indexers no longer need heuristic loss detection.

Difficulty

intermediate

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions