Monadex · Smart Contract Security AssessmentMonadex Client Hub

Monadex V1

Two-week security assessment of the Monadex V1 contracts on Monad: a Uniswap V2-style DEX with a Pyth-oracle-backed raffle that mints tickets on swap activity. The 1,021 nSLOC review across the Router, Raffle, Pool and supporting libraries identified 16 issues including 2 Critical (broken raffle registration and a confidence-value bug zeroing out ticket mints) and 2 High (decimal-precision errors and a missing Pyth price update before reads), plus 6 Medium and 6 Low quality issues.

MonadSoliditySmart Contract Code Review2024-09-18Zealynx methodology
Total findings
16
0 fixed · 16 acknowledged
Critical
02
High
02
Medium
06
Low + Info
06
02

Scope

6 files · 1,021 SLOC
Platform
Monad · Solidity
Methodology
File
MonadexV1Router
MonadexV1RafflePriceCalculator
MonadexV1Entropy
MonadexV1Library
MonadexV1Types
MonadexV1Pool
03

Findings

click any row for the full write-up
04

Key Findings

  • Nearly impossible for any user to register to the raffle. The register() function in MonadexV1Raffle checks ticketsToBurn < balance and reverts in either branch, so registration always fails and the entire raffle becomes non-functional regardless of the user's balance.
  • Incorrect confidence calculation in ticket minting. calculateTicketsToMint in MonadexV1Library uses _pythPrice.price instead of _pythPrice.conf for the confidence value, causing the (price - confidence) arithmetic to produce zero or negative ticket amounts and reverting every purchase with MonadexV1Raffle__ZeroTickets.
  • Multiple decimal precision issues in ticket calculation. calculateTicketsToMint hardcodes 18 decimals for all tokens and mishandles the Pyth payload's expo field, so users with non-18-decimal tokens receive orders of magnitude more or fewer tickets than intended, destabilising the raffle's economy.
  • Missing Pyth price update leads to users being unable to receive tickets. _getTicketsToMint calls getPriceNoOlderThan() without first calling updatePriceFeeds(), so the contract reads stale or missing data and the post-swap ticket flow always reverts. The mitigation propagates an updateData parameter through the swap interface and updates feeds before each read.
05

Team & approval

Lead Auditor
Sergio
@Seecoalba
Auditor
Bloqarl
@TheBlockChainer
Auditor
Cholakov
@cholakovv
Auditor
00xWizard
@00xWizard
06

Disclaimer

This audit is not an endorsement and does not constitute investment advice. Zealynx reviewed the codebase at the commits listed in section 02 over the engagement window. Findings are limited to issues identified within that scope and do not preclude the existence of other vulnerabilities. Subsequent code changes are not covered by this report unless the engagement is explicitly extended.

Download PDF (24p)
ZEALYNX SECURITY · published 2024-09-18
16 findings · Solidity

oog
zealynx

Smart Contract Security Digest

Monthly exploit breakdowns, audit checklists, and DeFi security research — straight to your inbox

© 2026 Zealynx