Skip to content

[Bug]: Swap direction lost when tracker resolves before terminal event #439

@glorysr1209-png

Description

@glorysr1209-png

[Bug]: Swap direction lost when tracker resolves before terminal contract event

Description

SwapTracker.resolve() drops swaps from active when voting completes, but ContractEventWatcher later needs (from_chain, to_chain) when SwapCompleted / SwapTimedOut fires. Without a cache, direction lookup returns empty strings and outcome scoring mis-labels the swap.

Steps to reproduce

  1. Validator votes on a swap and resolve() runs before the terminal SwapCompleted event is replayed.
  2. Observe outcome insertion using _lookup_swap_direction.

Expected behavior

Direction remains available until the terminal event is processed.

Actual behavior

Empty direction in stored swap outcomes.

Impact

Incorrect credibility / scoring attribution for resolved swaps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions