[BUG]: Dashboard auto-matches expired orders, so the match always reverts with OrderExpired
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- blockchain, frontend
Research direction
Start in app/dashboard/page.tsx and inspect matchablePairs, which currently checks order activity and prices. Compare its expiry rule with the contract behavior described in the issue: zero means no expiry, and otherwise an order is matchable through its expiry time. Keep expired orders visible in the order lists; done means they no longer trigger an automatic match. Pull request #143 is already open for this issue.
Written by the indexing model from the issue text.
Description
Bug Description
The dashboard keeps trying to match orders that have expired.
When an order passes its expiry, the contract doesn't flip it to inactive. It stays active until the maker cancels it, but matchOrders reverts with OrderExpired() (WindmillExchange.sol, if (buy.expiry != 0 && ts > buy.expiry) revert OrderExpired();). matchablePairs in app/dashboard/page.tsx only looks at active and the prices, never at expiry, so an expired order that crosses another order counts as a match.
The dashboard then auto-executes it. Anyone with a wallet connected on /dashboard gets a matchOrders popup that can only revert, which costs them gas if they confirm. Then they get "Match transaction error: ... 0xc56873ba", and the card stays on "Auto-Match In Progress".
Suggested fix
Leave expired orders out of matchablePairs, using the contract's rule (expiry == 0 means never, otherwise matchable while now <= expiry). They should stay in the order lists, so the maker still has the Cancel button to get their funds back.
Steps to Reproduce
- Create a buy order with an expiry a minute out, and a crossing sell order from another account
- Wait for the buy to expire (don't open the dashboard before then, or it gets matched first)
- Open
/dashboardwith a third account connected - "Crossing Match Opportunity Detected (1)" shows up, the wallet asks to sign
matchOrders, and it fails withOrderExpired
Logs and Screenshots
Sepolia fork (anvil), main @ 5548ba9. Order 1 is a buy that expired, order 2 is a crossing sell:
before expiry: eth_estimateGas matchOrders(1, 2) OK
after expiry: getOrder(1).active = true
eth_estimateGas matchOrders(1, 2) reverts 0xc56873ba (OrderExpired())
dashboard: Crossing Match Opportunity Detected (1)
wallet popup: matchOrders -> reverts 0xc56873ba
Match transaction error: execution reverted: custom error 0xc56873ba
Auto-Match In Progress (stays)
Environment Details
- main @ 5548ba9
- Sepolia fork via anvil, injected test wallet
Impact
Medium - Feature works but has issues
Code of Conduct
- I have joined the Discord server and will post updates there
- I have searched existing issues to avoid duplicates
- Dominant language
- TypeScript
- Stars
- 7
- Forks
- 21
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 9
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from StabilityNexus/Windmill-EVM-WebUI
-
[BUG]: Dashboard hides partially filled orders (OrderMatched treated as terminal), removing their Cancel buttonPossibly taken @CapThunder19 claimed this 4 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
StabilityNexus/Windmill-EVM-WebUI#139 ·
Maintainers usually reply within 1 day
-
[BUG]: Order prices are not normalized for token decimals, causing 10^12 mis-settlement on WETH/USDCPossibly taken @Muneerali199 claimed this 7 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 50/100
StabilityNexus/Windmill-EVM-WebUI#140 · 1 comment ·
Maintainers usually reply within 1 day
-
[BUG]: Prevent RPC query range errors in fetchEvents by adding deployedBlock and chunked block rangesPossibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 55/100
StabilityNexus/Windmill-EVM-WebUI#132 · 11 comments ·
Maintainers usually reply within 1 day
-
[BUG]: /api/keeper "match" signs transactions with the server keeper key using a client-supplied rpcUrl and contractAddress, with no authMay be free again @krutthiikaaa claimed this 13 days ago, and no pull request is open. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 38/100
StabilityNexus/Windmill-EVM-WebUI#127 · 2 comments ·
Maintainers usually reply within 1 day
-
[BUG]: Network switch button in mobile view not have dropdown onclickPossibly taken @singhtrivendra claimed this 70 days ago. Openbug
StabilityNexus/Windmill-EVM-WebUI#103 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
All issues in StabilityNexus/Windmill-EVM-WebUI
Similar issues
-
[BUG]: Shared links drop the configured basePath on GitHub PagesPossibly taken @anshulchikhale30-p claimed this today. Openbug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
StabilityNexus/IdentityTokens-EVM-Frontend#182 · 1 comment ·
Maintainers usually reply within 1 day
-
Add: GTrekkerOpencheck:passed streams:add
Difficulty 1/5 Under an hour Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Koenkk/zigbee-herdsman-converters#13900 ·
Maintainers usually reply within 1 day
-
area: ui Bug Payload OSS
Difficulty 1/5 Under an hour Newbie friendliness 88/100
payloadcms/payload#19839 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day