Solidity || Sui Move Security Researcher || Formal Verification || πŸ§‘β€πŸ’» SR at @QuillAudits_AI || My opinions are personal

Joined October 2021
54 Photos and videos
Pro King πŸ‘‘ retweeted

3
6
51
3,698
HyperCore auditing checklist 🧡 markPx() vs oraclePx() vs spotPx() β€” don’t mix them up These are three distinct price sources: markPx: used for PnL, margin, and liquidations (risk engine price) oraclePx: external/index price used in funding as input to mark price spotPx: spot market last traded price (spot-only) Key point: they are not interchangeable, and using the wrong one in risk or collateral logic leads to incorrect results. // ❌ Wrong uint64 px = spotPx(perpIndex); // βœ… Correct uint64 mark = markPx(perpIndex); // perp risk / liquidation uint64 oracle = oraclePx(perpIndex); // funding index reference uint64 spot = spotPx(spotIndex); // spot markets only ⚠️ Common mistake: assuming markPx == oraclePx they can diverge during volatility because mark is derived from oracle market state.
1
13
365
Pro King πŸ‘‘ retweeted
If you want to understand Hyperliquid (HyperCore HyperEVM), this video by @0xjuaan is πŸ”₯ Also, his hyper-evm-lib makes things much easier to work with. Really enjoyed diving into it. youtube.com/watch?v=ZESEkAKi…
3
2
41
2,634
Thanks @MitchellAmador and @Ehsan1579 for such a great video. Honestly, I really enjoyed watching this , a lot of valuable insights throughout πŸ‘
3
177
HyperCore auditing checklist 🧡 tokenInfo().evmExtraWeiDecimals β€” Can be NEGATIVE evmExtraWeiDecimals is an int8, not a uint. A negative value (e.g. -2) means the EVM amount has fewer decimals than the spot amount. Incorrectly assuming it is always positive can cause conversion logic to break by powers of 10, leading to incorrect accounting, pricing, or settlement calculations. // ❌ Wrong β€” breaks if value is negative uint64 evmAmt = spotAmt * (10 ** ti.evmExtraWeiDecimals); // βœ… Correct int8 extra = ti.evmExtraWeiDecimals; if (extra >= 0) { evmAmt = spotAmt * uint64(10 ** uint8(extra)); } else { evmAmt = spotAmt / uint64(10 ** uint8(-extra)); }
1
14
641
Pro King πŸ‘‘ retweeted

1
2
16
581
Eid Mubarak 😊
2
7
159
l1BlockNumber() β€” HyperCore block progression β‰  EVM block.number 🧡 Do not use: - block.number to reason about HyperCore state freshness. - l1BlockNumber() for EVM ordering assumptions. πŸ‘‡
1
1
5
232
// ❌ Wrong β€” EVM block, not Core block require(block.number > lastChecked); // βœ… Correct β€” HyperCore progression require( L1ReadLib.l1BlockNumber() > lastL1Checked );
1
93
If you find these HyperCore auditing checklists helpful, a retweet would be appreciated 🀝 HyperCore auditing checklist 🧡 position().szi β€” Negative value means SHORT position: szi is an int64, not a uint64. A negative value represents a short position. Casting it directly to uint64 can silently wrap into a massive positive value and completely break accounting or risk logic. // ❌ Wrong β€” wraps if the position is short uint64 size = uint64(pos.szi); // βœ… Correct bool isShort = pos.szi < 0; uint64 size = uint64(pos.szi < 0 ? -pos.szi : pos.szi); // remaining logic
2
1
18
629
I want to start sharing small Hyperliquid based protocols auditing checklists from time to time. Especially things that can easily be missed while auditing Hyperliquid-based protocols. Below are two important checks πŸ‘‡ HyperCore auditing checklist 🧡 1. spotBalance() β€” total is NOT free balance: total includes tokens currently locked in open orders. Using it as spendable(bridgeable) balance can overestimate user funds. // ❌ Wrong uint64 free = bal. total; // βœ… Correct uint64 free = bal. total - bal.hold;
1
4
34
1,265
2. userVaultEquity() β€” Equity can still be locked UserVaultEquity includes lockedUntilTimestamp. If equity is still locked, withdrawals are silently rejected by HyperCore without reverting the EVM tx. // ❌ Wrong uint64 eq = equity.equity; // βœ… Correct require( block.timestamp * 1000 > equity.lockedUntilTimestamp, "equity locked" ); uint64 eq = equity.equity;
6
242
Also worth mentioning β€” an excellent article by @chase_manning_ that breaks everything down very clearly. Highly recommended. x.com/chase_manning_/status/…

If you want to understand Hyperliquid (HyperCore HyperEVM), this video by @0xjuaan is πŸ”₯ Also, his hyper-evm-lib makes things much easier to work with. Really enjoyed diving into it. youtube.com/watch?v=ZESEkAKi…
1
200
In audits, verifying fixes is critical work. It carries real responsibility β€” sometimes even more than finding the original bug.
2
147
No response from the protocol team till now🧐
Made the most of the weekend alongside my work, I discovered a bug in a protocol with ~$38M TVL that’s integrated by several other protocols. Since they don't have bug bounty program on Immunefi or elsewhere, I submitted the report via email. Let’s see what happens.
315
Made the most of the weekend alongside my work, I discovered a bug in a protocol with ~$38M TVL that’s integrated by several other protocols. Since they don't have bug bounty program on Immunefi or elsewhere, I submitted the report via email. Let’s see what happens.
3
32
1,767