What should a HyperEVM smart contract audit check?
A HyperEVM smart contract audit should focus on where your Solidity meets HyperCore, the Hyperliquid order book: prices read through precompiles in HyperCore units, orders and transfers sent to HyperCore, and the system addresses that move assets between the two. QuillShield audits the Solidity code of a Foundry project that targets HyperEVM, where the usual Ethereum bug classes apply as well.
What is different about auditing on HyperEVM?
The Hyperliquid docs and an OpenZeppelin audit of a HyperCore integration show where HyperEVM code goes wrong in ways Ethereum code does not.
- One chain, two layers. HyperEVM is not a separate chain. It runs under the same HyperBFT consensus as HyperCore, a contract can read HyperCore order book prices through a read precompile, and it can send orders to HyperCore through a write system contract (HyperEVM docs). The Across code that OpenZeppelin audited in late 2025 used that path for spot transfers and limit orders. HYPE pays for gas, and the chain ID is 999 (HyperEVM guide).
- HyperCore numbers are not ERC-20 numbers. OpenZeppelin audited an Across integration with HyperCore in October and November 2025 and recorded three unit and index mistakes. The code assumed spot prices had 8 decimals when the raw price is a scaled integer that depends on the
szDecimalsof the asset, it sent a limit order to the asset index instead of 10000 plus the asset index, and a sweep used a market index where the token index was required. Every conversion between HyperCore units and ERC-20 amounts belongs on the review list. - Assets move through system addresses. HYPE moves between HyperEVM and HyperCore through
0x2222222222222222222222222222222222222222, each spot asset has its own transfer address, and the HyperEVM guide warns that any other asset sent to the HYPE address is lost. OpenZeppelin adds that the mapping between an ERC-20 and its HyperCore token must be configured correctly, and that a first transfer to a HyperCore account involves an activation fee. - Two kinds of block. HyperEVM splits throughput between small blocks and big blocks that share one sequence of block numbers. Hyperliquid's dual-block docs set small blocks to 2 seconds with a 2M gas limit and big blocks to 1 minute with a 30M gas limit, and an account opts into big blocks for heavy transactions such as large deployments.
block.numberis not a clock on HyperEVM. - Timing between the layers. The Across code assumed that HyperCore state changes show up on HyperEVM by the next block, and OpenZeppelin asked for integration tests that simulate the exact behavior of calls between HyperEVM and HyperCore.
What happened in the Hyperdrive exploit?
In September 2025 Hyperdrive, a money market on Hyperliquid, lost two markets to a router that would call whatever it was told to.
| Protocol | Hyperdrive |
|---|---|
| Date | 27 September 2025 |
| Chain | HyperEVM (Hyperliquid) |
| Loss | about $782,000 in USDT0 and thBILL |
| What happened | On the night of 27 September 2025 an attacker drained the Primary USDT0 Market and the Treasury USDT Market of Hyperdrive, taking about 673,000 USDT0 and 110,244 thBILL. CertiK said the attacker repeatedly exploited an arbitrary call in the router contract. The funds were bridged out to Ethereum and BNB Chain, and Hyperdrive said it had identified and corrected the root cause and would compensate the affected accounts. Hyperdrive had not published a post-mortem when The Block and Cryptonews reported the loss. |
| Sources | The Block, Cryptonews |
A router that makes calls with a target and data the caller chooses can use every approval and position users gave it. Review each external call a router or vault makes, who picks its target and data, and what that contract is allowed to move.
Which protocol types need the most care on HyperEVM?
The Hyperliquid docs use a lending market that reads HyperCore order book prices as their example, and the Across code that OpenZeppelin reviewed settles flows from HyperEVM onto HyperCore.
- Lending markets and vaults that price collateral from HyperCore order books, where both units and manipulation matter.
- Bridges and intent protocols that deliver funds to HyperCore accounts, where system addresses, token mapping and account activation decide whether the funds arrive.
- Vaults and strategies that place orders on HyperCore from a contract, where market indexes and order parameters are easy to get wrong. The perpetual DEX audit guide covers the trading logic.
Which vulnerabilities matter most on HyperEVM?
- Oracle price manipulation. A HyperCore order book price is a market price, and a thin book can be pushed (oracle price manipulation).
- Rounding and precision errors.
szDecimals, price scaling and exchange precision all convert units, and OpenZeppelin found dust left behind by exchange precision rules (rounding and precision). - Stale oracle price. Code that acts on HyperCore state should check that the state it needs has arrived, since the Across code had to assume changes land by the next block.
- Access control. Functions that send HyperCore actions or sweep balances move real funds, and in the Across audit a zero-amount call could trigger account activation that withdrew funds from a donation box (access control).
- Arbitrary external call. CertiK traced the Hyperdrive loss to an arbitrary call in its router, which let the attacker point the router at targets of their choosing.
What should a reviewer check on HyperEVM?
- Every precompile read: the units it returns, and the scaling by
szDecimalsbefore it meets an ERC-20 amount. - Every index: token index, asset index, and the 10000 plus asset index used for spot markets.
- Every transfer to HyperCore: the system address for that asset, the token mapping and account activation.
- Dust left behind by exchange precision, and who can sweep it.
- Any assumption about when a HyperCore change shows up on HyperEVM, with a test for it.
- Time measured in seconds rather than blocks.
- Every call a router or vault makes with a target or data the caller chooses.
How do you run QuillShield on a HyperEVM project?
QuillShield audits the Solidity of a Foundry project, and on HyperEVM the risk sits where that Solidity calls into HyperCore.
- Put every contract that calls a HyperCore precompile or the write system contract in scope, with the vaults or markets that use their results.
- In the audit context, list each HyperCore asset the code touches with its token index, asset index,
szDecimalsand transfer address, so findings about units and addresses are judged against real values. - Turn each unit, index or timing finding into an integration test that simulates the HyperCore side, as OpenZeppelin recommended, because a local Foundry run has no HyperCore behind the precompiles. On a full audit each finding that holds up also carries a proof of concept result.
- Keep pull request checks on, so a new asset, order type or transfer path is reviewed against the audit.
A full audit starts at $49, and the quote you get stays valid for 7 days (pricing). New accounts get $50 in credit, good for up to half of an order.
QuillShield does not replace a manual audit. Request a manual audit from QuillAudits for code that moves funds into HyperCore, talk to an auditor, or run a full audit.
FAQ
How does a HyperEVM contract read HyperCore prices?
Through a read precompile that returns HyperCore order book data, according to the Hyperliquid docs. OpenZeppelin notes that the raw spot price is a scaled integer, so scale it by the szDecimals of the asset before comparing it with an ERC-20 amount.
What happens if I send a token to the HYPE system address?
The Hyperliquid guide says the HYPE address 0x2222222222222222222222222222222222222222 works only for HYPE and that other assets sent there are lost. Each spot asset has its own transfer address.
Does HyperEVM have a fixed block time?
No, it runs fast small blocks and slow big blocks, so contracts should measure time with timestamps rather than block numbers.
Can QuillShield test calls to HyperCore?
QuillShield audits the Solidity, and full audits come with proofs of concept. Behavior on the HyperCore side needs integration tests that simulate it, which OpenZeppelin also recommended.
Sources
- Dual-block architecture, Hyperliquid docs checked 3 December 2026
- HyperEVM, Hyperliquid docs checked 3 December 2026
- How to use the HyperEVM, Hyperliquid docs checked 3 December 2026
- Sponsored periphery audit (Across integration with HyperCore), OpenZeppelin checked 3 December 2026
- Hyperliquid-based Hyperdrive loses $782,000 after smart contract exploit, The Block checked 3 December 2026
- Hyperliquid's HyperDrive DeFi loses $773K, funds bridged to BNB Chain and Ethereum, Cryptonews checked 3 December 2026