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:
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
- Add
voided?: boolean to the MyriadRawMarket interface
- 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
Exchange
myriad
Severity
MEDIUM
What Our Normalizer Expects
normalizer.ts:59mapsraw.statethroughmapMarketStatebut does not checkraw.voided. TheMyriadRawMarketTypeScript interface does not declare avoidedfield.What The Live API Returns
The live API (
GET https://api-v2.myriadprotocol.com/markets) returns:This field is distinct from
state— a market can havestate: "resolved"andvoided: truesimultaneously, indicating a void resolution rather than a normal settlement.Impact
mapMarketStatemapping cannot distinguish a void from a normal resolution withoutvoidedSuggested Fix
voided?: booleanto theMyriadRawMarketinterfacenormalizer.ts, checkraw.voidedbefore (or alongside) mappingraw.state— ifvoidedistrue, map to a"voided"status rather than"resolved"Found by automated response shape drift audit