Skip to content

Response drift: myriad — data[].voided not accessed by normalizer #2191

Description

@realfishsam

Exchange

myriad

Severity

MEDIUM

What Our Normalizer Expects

normalizer.ts:59 maps raw.state through mapMarketState but does not check raw.voided. The MyriadRawMarket TypeScript interface does not declare a voided field.

What The Live API Returns

The live API (GET https://api-v2.myriadprotocol.com/markets) returns:

data[].voided: boolean

This field is distinct from state — a market can have state: "resolved" and voided: true simultaneously, indicating a void resolution rather than a normal settlement.

Impact

  • Voided markets are normalized as settled/resolved rather than voided
  • Consumers may incorrectly calculate P&L for voided markets (which should return collateral rather than paying winners)
  • The normalizer's mapMarketState mapping cannot distinguish a void from a normal resolution without voided

Suggested Fix

  1. Add voided?: boolean to the MyriadRawMarket interface
  2. In normalizer.ts, check raw.voided before (or alongside) mapping raw.state — if voided is true, map to a "voided" status rather than "resolved"

Found by automated response shape drift audit

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions