Reproduced Exploit
Myriad CLOB — free YES tokens when cross-market `priceSum > ONE`
1. Cross-market match requires only priceSum >= ONE, not equality. 2. Maker notionals sum with round-down; taker pays max(0, fill - notionalSoFar). 3. When priceSum > ONE, makers overpay and taker notional becomes 0. 4. Taker still receives full fillAmount YES tokens.
Chain
Other
Category
untagged
Date
Mar 2026
Source
AuditVault
EVM Playground
Source-level debugger — step opcodes and Solidity in sync
The attack is replayed in an in-browser EVM preloaded with the exact dumped fork state. The execution tree shows every call; step by Solidity line or by opcode across all depths — source, Stack, Memory, Storage, Balances (native / ERC-20 / NFT), Transient storage and Return value stay in sync. Click a tree node, opcode, or source line to jump. No backend, no live RPC.
Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 65419-myriadctfexchangematchcrossmarketorders-allows-taker-to-rece. Standalone Foundry PoC and full write-up: 65419-myriadctfexchangematchcrossmarketorders-allows-taker-to-rece_exp in the
evm-hack-registrymirror.
Vulnerability classes: wrong-condition · direct-drain · locked-funds
Reproduction: self-contained Foundry PoC with only
forge-std. Full trace: output.txt. PoC: test/65419-myriadctfexchangematchcrossmarketorders-allows-taker-to-rece_exp.sol.
AuditVault taxonomy: lang/solidity · sector/dex · sector/lending · platform/cyfrin · has/github · has/poc · severity/high · impact/loss-of-funds/direct-drain · impact/loss-of-funds/locked-funds · genome: wrong-condition · direct-drain · locked-funds
Key info#
| Impact | HIGH — taker receives YES for free; surplus collateral stuck forever |
| Protocol | Myriad / Polkamarkets CLOB |
| Vulnerable code | MyriadCTFExchange.matchCrossMarketOrders |
| Bug class | priceSum >= ONE allows overpay; taker notional clamped to 0 |
| Finding | Cyfrin Myriad CLOB v2.0, 2026-03-13 · #65419 · Kiki |
| Report | Cyfrin report |
| Source | AuditVault |
| Status | Fixed in c820bcf / d4300b9 |
| Compiler | ^0.8.24 (PoC) |
TL;DR#
- Cross-market match requires only
priceSum >= ONE, not equality. - Maker notionals sum with round-down; taker pays
max(0, fill - notionalSoFar). - When
priceSum > ONE, makers overpay and taker notional becomes 0. - Taker still receives full
fillAmountYES tokens. - Surplus collateral remains on the exchange with no withdraw path.
The vulnerable code#
require(priceSum >= ONE, "price sum < 1"); // @> VULN
notional = notionalSoFar >= fillAmount ? 0 : fillAmount - notionalSoFar; // @> VULN
Fix: each buyer pays their price; route surplus to treasury/feeModule; prefer priceSum == ONE.
Root cause#
Remainder-based taker notional assumes maker notionals never exceed fill. That holds for priceSum == ONE (modulo dust) but fails when operators pass a higher sum.
Preconditions#
- Operator (or attacker with operator role) matches orders with
priceSum > ONE. - Makers have approved collateral.
Attack walkthrough#
- Build three buy orders priced 0.60 + 0.60 + 0.10 = 1.30.
- Match with
fillAmount = 100. - Makers pay 60 + 60 = 120; taker pays 0.
- All three receive 100 YES; 20 collateral stuck on exchange.
Diagrams#
Impact#
Taker steals value from overpaying makers; surplus is locked until an upgrade/recovery path.
Sources#
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 65419-myriadctfexchangematchcrossmarketorders-allows-taker-to-rece_exp (evm-hack-registry mirror).
- AuditVault finding: 65419-myriadctfexchangematchcrossmarketorders-allows-taker-to-rece.
Alerts & third-party analyses
These dashboards index community alerts tweets, post-mortems, and independent write-ups. Reach them through the protocol name above to cross-check this reproduction against other analyses.