% Generated from docs/yellowpaper/index.md by tools/render_yellowpaper_latex.py.
        % Do not edit this file by hand; regenerate it from the markdown source.
        \documentclass[11pt]{article}
        \usepackage[margin=0.85in]{geometry}
        \usepackage[T1]{fontenc}
        \usepackage[utf8]{inputenc}
        \usepackage{lmodern}
        \usepackage{microtype}
        \usepackage{booktabs}
        \usepackage{longtable}
        \usepackage{array}
        \usepackage{enumitem}
        \usepackage{xcolor}
        \usepackage{hyperref}
        \usepackage{titlesec}
        \usepackage{fancyvrb}
        \usepackage{url}
        \usepackage{textcomp}

        \definecolor{Accent}{HTML}{0F6B63}
        \definecolor{AccentTwo}{HTML}{A24F2B}

        \hypersetup{
          colorlinks=true,
          linkcolor=Accent,
          urlcolor=Accent,
          citecolor=Accent
        }

        \titleformat{\section}{\Large\bfseries\color{Accent}}{\thesection}{0.6em}{}
        \titleformat{\subsection}{\large\bfseries\color{AccentTwo}}{\thesubsection}{0.6em}{}
        \newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
        \setlength{\parskip}{0.65em}
        \setlength{\parindent}{0pt}
        \setcounter{tocdepth}{2}
        \setlength{\emergencystretch}{3em}
        \urlstyle{same}

        \title{\textbf{Hypurrliquid Yellow Paper}}
        \author{Reverse-Engineered Hyperliquid Reimplementation}
        \date{April 4, 2026}

        \begin{document}
        \maketitle
        \tableofcontents
        \newpage

        The protocol-truth reference for the Hyperliquid L1 reimplementation. Every claim here is tagged with its evidence level.

\textbf{Evidence levels}: \nolinkurl{CONFIRMED} = verified from binary RE or official docs. \nolinkurl{OBSERVED} = seen in runtime/snapshots. \nolinkurl{IMPLEMENTED} = coded in hlx. \nolinkurl{INFERRED} = deduced from behavior.

Use the White Paper for narrative architecture. Use the Hypurrliquid Paper for the full RE reference with Mermaid diagrams. Use the Action Inventory for the current action-family and sub-variant tables. Use the Truth Register when you want the compact fact ledger instead of the full chapter narrative. For the denser subsystem splits, use Hashing, Staking \& Validators, Bridge2, and Outcomes.

\medskip\hrule\medskip

\section*{0. Truth Surfaces}
\addcontentsline{toc}{section}{0. Truth Surfaces}

This paper is the technical narrative, not the only truth surface. Read it together with:

\begin{itemize}[leftmargin=1.4em]
            \item Truth Register for the compact confirmed/active fact ledger
\item Open Claims for unresolved work
\item Protocol Scope Matrix for \nolinkurl{protocol} vs \nolinkurl{testnet_impl} vs \nolinkurl{local_impl}
\item Action Inventory for action-family and sub-variant tables
            \end{itemize}

\section*{1. Block Lifecycle (46 Hook Points)}
\addcontentsline{toc}{section}{1. Block Lifecycle (46 Hook Points)}

\nolinkurl{CONFIRMED} from binary VA 0x01e748e0 and string at 0x539f8a.

\subsection*{1.1 Pipeline}
\addcontentsline{toc}{subsection}{1.1 Pipeline}

\begin{Verbatim}[fontsize=\small]
            RecoverUsers -> BeginBlock (9+5 effects) -> DeliverSignedActions (97 types)
-> ProcessFills -> EVM Block -> EndBlock -> Commit -> VoteAppHash
            \end{Verbatim}

\subsection*{1.2 BeginBlock --- 9 Named Effects}
\addcontentsline{toc}{subsection}{1.2 BeginBlock --- 9 Named Effects}

\begingroup
        \small
        \setlength{\tabcolsep}{4pt}
        \renewcommand{\arraystretch}{1.16}
        \begin{longtable}{L{0.12\linewidth}L{0.28\linewidth}L{0.24\linewidth}L{0.24\linewidth}}
        \toprule
        \# & Effect & Guard Interval & Evidence \\
        \midrule
        \endfirsthead
        \toprule
        \# & Effect & Guard Interval & Evidence \\
        \midrule
        \endhead
        1 & \nolinkurl{update_oracle} & --- & \nolinkurl{CONFIRMED} \\
2 & \nolinkurl{distribute_funding} & 8000ms & \nolinkurl{CONFIRMED} \\
3 & \nolinkurl{apply_bole_liquidations} & --- & \nolinkurl{CONFIRMED} \\
4 & \nolinkurl{update_funding_rates} & 8000ms & \nolinkurl{CONFIRMED} \\
5 & \nolinkurl{refresh_hip3_stale_mark_pxs} & from snapshot & \nolinkurl{CONFIRMED} \\
6 & \nolinkurl{prune_book_empty_user_states} & 60000ms & \nolinkurl{CONFIRMED} \\
7 & \nolinkurl{update_staking_rewards} & --- & \nolinkurl{CONFIRMED} \\
8 & \nolinkurl{update_action_delayer} & --- & \nolinkurl{CONFIRMED} \\
9 & \nolinkurl{update_aligned_quote_token} & --- & \nolinkurl{CONFIRMED} \\
        \bottomrule
        \end{longtable}
        \endgroup

\subsection*{1.3 Supplementary Effects}
\addcontentsline{toc}{subsection}{1.3 Supplementary Effects}

\begingroup
        \small
        \setlength{\tabcolsep}{4pt}
        \renewcommand{\arraystretch}{1.16}
        \begin{longtable}{L{0.46\linewidth}L{0.18\linewidth}L{0.20\linewidth}}
        \toprule
        Effect & Guard & Evidence \\
        \midrule
        \endfirsthead
        \toprule
        Effect & Guard & Evidence \\
        \midrule
        \endhead
        \nolinkurl{check_trigger_orders} & --- & \nolinkurl{IMPLEMENTED} \\
\nolinkurl{cancel_aggressive_orders_at_oi_cap} & 1000ms & \nolinkurl{CONFIRMED} \\
\nolinkurl{validator_l1_vote_tracker_prune_expired} & 60000ms & \nolinkurl{CONFIRMED} \\
\nolinkurl{reset_recent_ois} & 1000ms & \nolinkurl{CONFIRMED} \\
\nolinkurl{update_stale_mark_guards} & per-book & \nolinkurl{CONFIRMED} \\
        \bottomrule
        \end{longtable}
        \endgroup

Current local \nolinkurl{main} matches the widened 9-effect note on this ordering. What remains open on ActionDelayer is control semantics (\nolinkurl{enabled}, \nolinkurl{delayer_mode}, \nolinkurl{status_guard}, \nolinkurl{vty_trackers}), not the named drain slot.

\subsection*{1.4 EndBlock}
\addcontentsline{toc}{subsection}{1.4 EndBlock}

Mark prices updated from book mid-prices: \nolinkurl{mark_prices[asset] = book.mid_price()}.

\subsection*{1.5 VoteAppHash}
\addcontentsline{toc}{subsection}{1.5 VoteAppHash}

Every 2000 blocks. Quorum at 2/3+ stake. Final \nolinkurl{app_hash} is \nolinkurl{first_16(SHA-256(L1_combined)) || first_16(SHA-256(EVM_combined))}, where each half comes from the \nolinkurl{rmp_serde -> blake3 XOF (2048B) -> paddw u16} LtHash pipeline rather than one flat 14-category digest.

\subsection*{1.6 Consensus / Topology Surface}
\addcontentsline{toc}{subsection}{1.6 Consensus / Topology Surface}

Current confirmed testnet-facing networking and consensus facts:

\begin{itemize}[leftmargin=1.4em]
            \item ingress is concentrated through a broadcaster layer
\item proposer rotation uses stake-weighted \nolinkurl{RoundRobinTtl}
\item QC and TC certificates drive the two-chain commit rule
\item validator/sentry admission checks gate the transport layer
\item ports \nolinkurl{4001} and \nolinkurl{4002} split block-streaming and peer/RPC verification traffic
            \end{itemize}

Treat the exact operator deployment shape as still chain-scoped, but keep these surfaces aligned across lifecycle, gossip, and consensus notes.

\subsection*{1.7 Validator Lifecycle / Jail Surface}
\addcontentsline{toc}{subsection}{1.7 Validator Lifecycle / Jail Surface}

Current confirmed validator-control facts:

\begin{itemize}[leftmargin=1.4em]
            \item epochs are time-based via \nolinkurl{epoch_duration_seconds}
\item active validators are recomputed at epoch boundaries
\item signer admission checks search \nolinkurl{epoch_states[cur_epoch]}
\item jailed signers are excluded from normal proposer / signing flow
\item \nolinkurl{CSignerAction} currently has \nolinkurl{unjailSelf}, \nolinkurl{jailSelf}, and \nolinkurl{jailSelfIsolated}
\item manual unjail is rate-limited by \nolinkurl{signer_to_last_manual_unjail_time}
            \end{itemize}

What remains open on this lane is threshold/trigger detail, not the existence of the lifecycle surface.

\medskip\hrule\medskip

\section*{2. Exchange State (57 Fields)}
\addcontentsline{toc}{section}{2. Exchange State (57 Fields)}

\nolinkurl{CONFIRMED} from serde struct chain at \nolinkurl{.rodata} offset \nolinkurl{0x543428} in testnet binary \nolinkurl{331bef9b} (2026-04-03).

\begingroup
        \footnotesize
        \setlength{\tabcolsep}{4pt}
        \renewcommand{\arraystretch}{1.16}
        \begin{longtable}{L{0.08\linewidth}L{0.24\linewidth}L{0.24\linewidth}L{0.16\linewidth}L{0.16\linewidth}}
        \toprule
        \# & Field & Type & Parsed & Evidence \\
        \midrule
        \endfirsthead
        \toprule
        \# & Field & Type & Parsed & Evidence \\
        \midrule
        \endhead
        0 & \nolinkurl{locus} & Locus(15) & Yes & \nolinkurl{CONFIRMED} \\
1 & \nolinkurl{perp_dexs} & Vec\textbackslash{}\textless{}PerpDex\textgreater{} & Yes & \nolinkurl{CONFIRMED} \\
2 & \nolinkurl{spot_books} & Vec\textbackslash{}\textless{}SpotBook\textgreater{} & Yes & \nolinkurl{CONFIRMED} \\
3 & \nolinkurl{agent_tracker} & AgentTracker(5) & Yes & \nolinkurl{CONFIRMED} \\
4 & \nolinkurl{funding_distribute_guard} & BucketGuard & Yes & \nolinkurl{CONFIRMED} \\
5 & \nolinkurl{funding_update_guard} & BucketGuard & Yes & \nolinkurl{CONFIRMED} \\
6 & \nolinkurl{sub_account_tracker} & SubAccountTracker(2) & Yes & \nolinkurl{CONFIRMED} \\
7 & \nolinkurl{allowed_liquidators} & Vec\textbackslash{}\textless{}Address\textgreater{} & Yes & \nolinkurl{CONFIRMED} \\
8 & \nolinkurl{bridge2} & Bridge2(10) & Yes & \nolinkurl{CONFIRMED} \\
9 & \nolinkurl{staking} & Staking(6) & Yes & \nolinkurl{CONFIRMED} \\
10 & \nolinkurl{c_staking} & CStaking(23) & Yes & \nolinkurl{CONFIRMED} \\
11 & \nolinkurl{funding_err_dur_guard} & BucketGuard & Yes & \nolinkurl{CONFIRMED} \\
12 & \nolinkurl{max_order_distance_from_anchor} & f64 & Yes & \nolinkurl{CONFIRMED} \\
13 & \nolinkurl{scheduled_freeze_height} & u64 & Yes & \nolinkurl{CONFIRMED} \\
14 & \nolinkurl{simulate_crash_height} & u64 & Yes & \nolinkurl{CONFIRMED} \\
15 & \nolinkurl{validator_power_updates} & Vec & Skip & \nolinkurl{CONFIRMED} \\
16 & \nolinkurl{cancel_oi_cap_guard} & BucketGuard & Yes & \nolinkurl{CONFIRMED} \\
17 & \nolinkurl{last_hlp_cancel_time} & f64 & Yes & \nolinkurl{CONFIRMED} \\
18 & \nolinkurl{post_only_until_time} & f64 & Yes & \nolinkurl{CONFIRMED} \\
19 & \nolinkurl{post_only_until_height} & u64 & Yes & \nolinkurl{CONFIRMED} \\
20 & \nolinkurl{spot_twap_tracker} & JSON & Yes & \nolinkurl{CONFIRMED} \\
21 & \nolinkurl{user_to_display_name} & HashMap & Yes & \nolinkurl{CONFIRMED} \\
22 & \nolinkurl{book_empty_user_states_pruning_guard} & BucketGuard & Yes & \nolinkurl{CONFIRMED} \\
23 & \nolinkurl{user_to_scheduled_cancel} & HashMap & Yes & \nolinkurl{CONFIRMED} \\
24 & \nolinkurl{hyperliquidity} & 2 fields & Yes & \nolinkurl{CONFIRMED} \\
25 & \nolinkurl{spot_disabled} & bool & Yes & \nolinkurl{CONFIRMED} \\
26 & \nolinkurl{prune_agent_idx} & u64 & Yes & \nolinkurl{CONFIRMED} \\
27 & \nolinkurl{max_hlp_withdraw_fraction_per_day} & f64 & Yes & \nolinkurl{CONFIRMED} \\
28 & \nolinkurl{hlp_start_of_day_account_value} & f64 & Yes & \nolinkurl{CONFIRMED} \\
29 & \nolinkurl{register_token_gas_auction} & GasAuction(4) & Yes & \nolinkurl{CONFIRMED} \\
30 & \nolinkurl{perp_deploy_gas_auction} & GasAuction(4) & Yes & \nolinkurl{CONFIRMED} \\
31 & \nolinkurl{spot_pair_deploy_gas_auction} & GasAuction(4) & Yes & \nolinkurl{CONFIRMED} \\
32 & \nolinkurl{hyper_evm} & HyperEvmState(13) & Yes & \nolinkurl{CONFIRMED} \\
33 & \nolinkurl{vtg} & JSON & Yes & \nolinkurl{CONFIRMED} \\
34 & \nolinkurl{app_hash_vote_tracker} & 3 fields & Yes & \nolinkurl{CONFIRMED} \\
35 & \nolinkurl{begin_block_logic_guard} & BucketGuard & Yes & \nolinkurl{CONFIRMED} \\
36 & \nolinkurl{user_to_evm_state} & HashMap (778K) & Skip & \nolinkurl{CONFIRMED} \\
37 & \nolinkurl{multi_sig_tracker} & 1 field & Yes & \nolinkurl{CONFIRMED} \\
38 & \nolinkurl{reserve_accumulators} & JSON & Yes & \nolinkurl{CONFIRMED} \\
39 & \nolinkurl{partial_liquidation_cooldown} & f64 (30.0) & Yes & \nolinkurl{CONFIRMED} \\
40 & \nolinkurl{evm_enabled} & bool & Yes & \nolinkurl{CONFIRMED} \\
41 & \nolinkurl{validator_l1_vote_tracker} & 3 fields & Yes & \nolinkurl{CONFIRMED} \\
42 & \nolinkurl{staking_link_tracker} & JSON & Yes & \nolinkurl{CONFIRMED} \\
43 & \nolinkurl{action_delayer} & ActionDelayer(9) & Yes & \nolinkurl{CONFIRMED} \\
44 & \nolinkurl{default_hip3_limits} & JSON & Yes & \nolinkurl{CONFIRMED} \\
45 & \nolinkurl{hip3_stale_mark_px_guard} & BucketGuard & Yes & \nolinkurl{CONFIRMED} \\
46 & \nolinkurl{disabled_precompiles} & Vec & Yes & \nolinkurl{CONFIRMED} \\
47 & \nolinkurl{lv} & JSON & Yes & \nolinkurl{CONFIRMED} \\
48 & \nolinkurl{hip3_no_cross} & bool & Yes & \nolinkurl{CONFIRMED} \\
49 & \nolinkurl{initial_usdc_evm_system_balance} & f64 & Yes & \nolinkurl{CONFIRMED} \\
50 & \nolinkurl{validator_l1_stream_tracker} & JSON & Yes & \nolinkurl{CONFIRMED} \\
51 & \nolinkurl{last_aligned_quote_token_sample_time} & f64 & Yes & \nolinkurl{CONFIRMED} \\
52 & \nolinkurl{user_to_evm_to_l1_wei_remaining} & HashMap & Yes & \nolinkurl{CONFIRMED} \\
53 & \nolinkurl{dex_abstraction_enabled} & bool & Yes & \nolinkurl{CONFIRMED} \\
54 & \nolinkurl{hilo} & HyperliquidityImpactLimiter(3) & Yes & \nolinkurl{CONFIRMED} \\
55 & \nolinkurl{oh} & Vec\textbackslash{}\textless{}OracleSnapshot\textgreater{}(100) & Yes & \nolinkurl{CONFIRMED} \\
56 & \nolinkurl{hpt} & AlignedQuoteTokenTracker & Yes & \nolinkurl{DISCOVERED} \\
        \bottomrule
        \end{longtable}
        \endgroup

\textbf{57/57 fields declared. 55/57 deeply parsed from snapshots. 2 skipped (user\_to\_evm\_state, validator\_power\_updates).}

\medskip\hrule\medskip

\section*{3. Action Surface (97 Variants, 126 Sub-Types)}
\addcontentsline{toc}{section}{3. Action Surface (97 Variants, 126 Sub-Types)}

\nolinkurl{CONFIRMED} from binary dispatcher at VA 0x0272a320. 90 mainnet + 7 testnet.

\begingroup
        \small
        \setlength{\tabcolsep}{4pt}
        \renewcommand{\arraystretch}{1.16}
        \begin{longtable}{L{0.22\linewidth}L{0.10\linewidth}L{0.54\linewidth}}
        \toprule
        Category & Count & Key Types \\
        \midrule
        \endfirsthead
        \toprule
        Category & Count & Key Types \\
        \midrule
        \endhead
        Trading & 9 & order, cancel, cancelByCloid, modify, batchModify, TWAP, liquidate \\
Margin & 3 & updateLeverage, updateIsolatedMargin, topUpIsolatedOnlyMargin \\
Transfers & 6 & usdSend, spotSend, sendAsset, withdraw3, sendToEvmWithData \\
Sub-Accounts & 3 & createSubAccount, subAccountTransfer, subAccountSpotTransfer \\
Vaults & 6 & createVault, vaultTransfer, vaultDistribute, vaultModify, netChildVaultPositions, setVaultDisplayName \\
Staking & 5 & tokenDelegate, claimRewards, linkStakingUser, registerValidator, extendLongTermStaking \\
Account & 7 & approveAgent, setDisplayName, setReferrer, convertToMultiSigUser, approveBuilderFee, startFeeTrial, userPortfolioMargin \\
DeFi & 5 & borrowLend, userDexAbstraction, userSetAbstraction, agentSetAbstraction, agentEnableDexAbstraction \\
Governance & 3 & govPropose, govVote, voteGlobal (22 sub-types) \\
HIP-3/4 & 3 & SetGlobal (6 sub), perpDeploy (8 sub), spotDeploy \\
Validator & 9 & CValidator, CSigner, validatorL1Vote, validatorL1Stream, bridge votes (5) \\
System & 11 & SystemBole, SystemSpotSend, CWithdraw, CUserModify, EvmUserModify, etc. \\
Special & 7 & evmRawTx, multiSig, noop, VoteAppHash, ForceIncreaseEpoch, userOutcome (4 sub), settleFraction \\
Additional & 8 & priorityBid, registerSpot, disableDex, cancelAllOrders, quarantineUser, etc. \\
        \bottomrule
        \end{longtable}
        \endgroup

Current testnet notes widen the action surface to 97 variants. The local engine has broad typed coverage, but parity work remains active and this page should not be read as a blanket ``zero gaps'' claim.

\medskip\hrule\medskip

\section*{4. Funding Rate}
\addcontentsline{toc}{section}{4. Funding Rate}

\nolinkurl{CONFIRMED} from binary assertions.

\begin{itemize}[leftmargin=1.4em]
            \item \textbf{EMA}: DeterministicEma with fraction-based accumulation (num/denom). \nolinkurl{assert!(decay <= 1.)}, \nolinkurl{assert!(self.denom > 0.)}.
\item \textbf{Funding payment}: \nolinkurl{payment = szi x oracle_px x (cum_funding_global - pos.cum_funding_entry)}
\item \textbf{Direction}: Positive rate = longs pay shorts.
\item \textbf{Guard interval}: 8000ms for both distribute and update.
\item \textbf{Per-asset multiplier}: Set via \nolinkurl{SetFundingMultiplier} VoteGlobal.
            \end{itemize}

\medskip\hrule\medskip

\section*{5. Liquidation \& ADL}
\addcontentsline{toc}{section}{5. Liquidation \& ADL}

\nolinkurl{CONFIRMED} from binary constants and docs.

\begin{itemize}[leftmargin=1.4em]
            \item \textbf{Margin check}: \nolinkurl{margin_available = account_value - initial_margin_required}. Liquidatable when \textless{} 0.
\item \textbf{Isolated}: Per-position check with allocated margin.
\item \textbf{BOLE liquidation threshold}: Health factor \textless{} 0.8.
\item \textbf{BOLE cooldown}: 30 seconds for partial liquidations.
\item \textbf{BOLE types}: Partial (50\% seize), Market (full repay), Backstop (default liquidator).
\item \textbf{ADL}: Triggered when shortfall persists after liquidation. Counterparties ranked by ROE (highest first). Position reduced proportionally.
\item \textbf{ADL priority}: \nolinkurl{ROE = unrealized_pnl / margin_allocated}.
            \end{itemize}

\medskip\hrule\medskip

\section*{6. State Hashing}
\addcontentsline{toc}{section}{6. State Hashing}

\nolinkurl{CONFIRMED} algorithm: \nolinkurl{rmp_serde -> blake3 XOF (2048B) -> paddw u16 (LtHash16) -> SHA-256 (32B)}.

\begin{itemize}[leftmargin=1.4em]
            \item \textbf{11 L1 categories} + \textbf{3 EVM categories} = 14 accumulators.
\item \textbf{L1 accumulators}: Running sums from genesis maintained in live state, not the stale BSS cache that earlier notes treated as canonical.
\item \textbf{EVM accumulators}: accounts\_hash, contracts\_hash, storage\_hash.
\item \textbf{Heartbeat \nolinkurl{concise_lt_hashes}}: EVM only. The traced heartbeat surface does not carry the full L1 accumulator state.
            \end{itemize}

\subsection*{6.1 AppHash Split}
\addcontentsline{toc}{subsection}{6.1 AppHash Split}

Current repo truth is that the final \nolinkurl{app_hash} is \nolinkurl{first_16(SHA-256(L1_combined)) || first_16(SHA-256(EVM_combined))}, not a single SHA-256 over one merged 14-accumulator buffer.

\subsection*{6.2 RespHash Backend Split}
\addcontentsline{toc}{subsection}{6.2 RespHash Backend Split}

Current repo truth is intentionally narrower than "hashing is solved":

\begin{itemize}[leftmargin=1.4em]
            \item the code explicitly tracks \nolinkurl{Mainnet} versus \nolinkurl{Testnet} RespHash backends
\item the backend split is real and should remain chain-scoped in docs and replay work
\item the local implementation does \textbf{not} yet claim full mainnet serializer parity across all response families
            \end{itemize}

Treat \nolinkurl{RespHashMode::Mainnet} as backend selection, not as proof that every mainnet response serializer is already closed.

\subsection*{6.3 Current Serializer Facts}
\addcontentsline{toc}{subsection}{6.3 Current Serializer Facts}

Treat the following as closed facts, not loose hypotheses:

\begin{itemize}[leftmargin=1.4em]
            \item \textbf{G-family success/error split}: hybrid actions do \textbf{not} hash a 3-field payload on success. Success is the same 1-field \nolinkurl{{status:"success"}} map used by the H-family status serializer. The 3-field \nolinkurl{{status:"err", success:false, error:<msg>}} payload is error-only.
\item \textbf{Response-family map}: the current user-facing response surface closes four practical serializer families: F (TWAP), G (error branch for hybrid actions), H (status-only success), and J (order-status fill family).
\item \textbf{Fill hash payload}: fills hash through a separate 18-field payload: \nolinkurl{px}, \nolinkurl{sz}, \nolinkurl{startPosition}, \nolinkurl{dir}, \nolinkurl{closedPnl}, \nolinkurl{oid}, \nolinkurl{crossed}, \nolinkurl{fee}, \nolinkurl{builderFee}, \nolinkurl{tid}, \nolinkurl{cloid}, \nolinkurl{liquidation}, \nolinkurl{feeTrialEscrow}, \nolinkurl{builder}, \nolinkurl{twapId}, \nolinkurl{deployerFee}, \nolinkurl{liquidatedUser}, \nolinkurl{markPx}.
\item \textbf{API wrapper fields}: \nolinkurl{coin} and \nolinkurl{feeToken} belong to API/user-fill wrapper surfaces, not to the hashed fill payload itself.
            \end{itemize}

Current open lane:

\begin{itemize}[leftmargin=1.4em]
            \item exact local derivation of fill economics and flags (\nolinkurl{startPosition}, \nolinkurl{closedPnl}, \nolinkurl{tid}, liquidation membership, maker/taker routing)
\item remaining mainnet-specific serializer families that are still not fully wired locally
            \end{itemize}

\medskip\hrule\medskip

\section*{7. CoreWriter (EVM $\rightarrow$ L1)}
\addcontentsline{toc}{section}{7. CoreWriter (EVM $\rightarrow$ L1)}

\nolinkurl{CONFIRMED} from binary and official docs.

\begin{itemize}[leftmargin=1.4em]
            \item \textbf{Precompile address}: \nolinkurl{0x3333333333333333333333333333333333333333}
\item \textbf{Function}: \nolinkurl{sendRawAction(bytes)} selector \nolinkurl{0x17938e13}
\item \textbf{Encoding}: \nolinkurl{abi.encodePacked(uint8(1), uint24(actionId), abi.encode(params...))}
\item \textbf{15 action types}: LimitOrder, VaultTransfer, TokenDelegate, StakingDeposit, StakingWithdraw, SpotSend, UsdClassTransfer, FinalizeEvmContract, AddApiWallet, CancelByOid, CancelByCloid, ApproveBuilderFee, SendAsset, ReflectEvmSupplyChange, BorrowLend.
\item \textbf{Delay}: \nolinkurl{delay_scale x 3000ms} (configurable). Actions fire in next block's begin\_block Effect 8.
\item \textbf{In replay mode}: Raw tx calldata scanned via RLP parser without EVM execution.
            \end{itemize}

\medskip\hrule\medskip

\section*{8. Bridge Finalization and Validator-Set Updates}
\addcontentsline{toc}{section}{8. Bridge Finalization and Validator-Set Updates}

\nolinkurl{CONFIRMED} from Bridge2 state naming, bridge action inventory, and the current control-plane notes.

\begin{itemize}[leftmargin=1.4em]
            \item \textbf{Bridge2 state} includes \nolinkurl{withdrawal_signatures}, \nolinkurl{withdrawal_finalized_votes}, \nolinkurl{finished_withdrawal_to_time}, \nolinkurl{validator_set_signatures}, \nolinkurl{validator_set_finalized_votes}, \nolinkurl{bal}, \nolinkurl{last_pruned_deposit_block_number}, and \nolinkurl{oaw} (\nolinkurl{bool}).
\item \textbf{Withdrawal entrypoint}: \nolinkurl{withdraw3}.
\item \textbf{Bridge signing action}: \nolinkurl{ValidatorSignWithdrawal}.
\item \textbf{Finalize actions}: \nolinkurl{VoteEthFinalizedWithdrawal} and \nolinkurl{VoteEthFinalizedValidatorSetUpdate}.
\item \textbf{Validator-set update signing}: \nolinkurl{SignValidatorSetUpdate}.
\item \textbf{Signer model}: current repo truth keeps bridge signing on validator signer keys, not an unrelated bridge-only signer family.
            \end{itemize}

What remains open is exact dispute-period closure and some Ethereum-side operational details, not whether bridge finalization is a first-class staged state machine.

\medskip\hrule\medskip

\section*{9. Aligned Quote Token (HPT)}
\addcontentsline{toc}{section}{9. Aligned Quote Token (HPT)}

\nolinkurl{DISCOVERED} from Hyperliquid docs + API.

\begin{itemize}[leftmargin=1.4em]
            \item \textbf{Exchange field [56]}\nolinkurl{hpt} = AlignedQuoteTokenTracker.
\item \textbf{Per-token state}: isAligned, firstAlignedTime, evmMintedSupply, dailyAmountOwed, predictedRate.
\item \textbf{Validator sidecar}: \nolinkurl{aqa-publisher} (\href{https://github.com/native-markets/aqa-publisher}{github.com/native-markets/aqa-publisher}).
\item \textbf{Rate source}: 30-day SOFR average from NY Fed, FRED, OFR (median of 3 sources).
\item \textbf{Submission}: \nolinkurl{validatorL1Stream} action with \nolinkurl{riskFreeRate} field, daily at 22:00 UTC.
\item \textbf{Protocol rate}: Stake-weighted median of all active validator votes.
\item \textbf{Fee benefits}: 20\% lower taker, 50\% better maker rebate for aligned stablecoins.
            \end{itemize}

This is also a begin-block surface: \nolinkurl{update_aligned_quote_token} is the current effect-9 lane in the widened testnet note.

\medskip\hrule\medskip

\section*{10. Outcomes and Settlement Surface}
\addcontentsline{toc}{section}{10. Outcomes and Settlement Surface}

\nolinkurl{CONFIRMED} for the baseline market model; \nolinkurl{HYPOTHESIS} for the leading solvency-risk lane.

\begin{itemize}[leftmargin=1.4em]
            \item \textbf{Risk mode}: 1x isolated-only, no leverage, no funding.
\item \textbf{Settlement authority}: \nolinkurl{oracleUpdater} posts final outcome via \nolinkurl{SettleOutcome}.
\item \textbf{Post-settlement behavior}: open orders auto-cancel via \nolinkurl{outcomeSettledCanceled}; new orders reject via \nolinkurl{outcomeSettledRejected}.
\item \textbf{Question metadata}: \nolinkurl{fallbackOutcome}, \nolinkurl{namedOutcomes}, \nolinkurl{settledNamedOutcomes}.
\item \textbf{User token operations}: \nolinkurl{SplitOutcome}, \nolinkurl{MergeOutcome}, \nolinkurl{MergeQuestion}, \nolinkurl{NegateOutcome}.
            \end{itemize}

Current open risk lane:

\begin{itemize}[leftmargin=1.4em]
            \item \nolinkurl{MergeQuestion} / fallback reconciliation is still the leading higher-order solvency hypothesis.
\item The repo should treat question-level accounting as riskier than the simpler YES/NO pair mechanics until the binary path is closed.
            \end{itemize}

\medskip\hrule\medskip

\section*{11. Gossip Protocol}
\addcontentsline{toc}{section}{11. Gossip Protocol}

\nolinkurl{CONFIRMED} from binary RE.

\begin{itemize}[leftmargin=1.4em]
            \item \textbf{Frame format}: \nolinkurl{[u32 BE len][u8 kind][body]}. Traced data frames often use LZ4 with \nolinkurl{kind=0x01}, while greetings use \nolinkurl{kind=0x00}.
\item \textbf{Port 4001 greeting}: bincode-fork \nolinkurl{TcpGreeting} with chain-based variant index. Current live observations are testnet variant \nolinkurl{3} (8 bytes total) and mainnet variant \nolinkurl{2} (7 bytes total).
\item \textbf{Broader chain enum}: the ABCI-stream chain mapping still tracks \nolinkurl{Local=0}, \nolinkurl{Sandbox=1}, \nolinkurl{Testnet=2}, \nolinkurl{Mainnet=3}; do not conflate that with the observed 4001 \nolinkurl{TcpGreeting} variant index.
\item \textbf{Port 4003 authenticated greeting}: \nolinkurl{keccak256("Hyperliquid Consensus Payload" + 0x00 + bincode(content))}; content is bincode, not msgpack.
\item \textbf{Port 4003 signed content}: the greeting is variable-sized, not a tiny fixed blob. Captured content closes a 20-byte validator address, varint round, 1-byte variant flag, optional 32-byte ABCI extra, several additional counters plus a 32-byte hash, a sorted \nolinkurl{heartbeat_statuses} map, and a trailing empty-mempool varint. A few middle counters still lack semantic labels.
\item \textbf{Connection}: Server-side \nolinkurl{connection_checks} --- unknown peers rejected after 5s timeout.
\item \textbf{Loopback}: Dominated by \nolinkurl{MsgConcise}/\nolinkurl{OutMsgConcise} (tag 27/28).
            \end{itemize}

\medskip\hrule\medskip

\section*{12. Guard System}
\addcontentsline{toc}{section}{12. Guard System}

All rate-limited effects use \nolinkurl{BucketGuard}:

\begin{Verbatim}[fontsize=\small]
            struct BucketGuard {
    last_time: Option<u64>,   // ms
    interval_ms: u64,
}
            \end{Verbatim}

\begingroup
        \small
        \setlength{\tabcolsep}{4pt}
        \renewcommand{\arraystretch}{1.16}
        \begin{longtable}{L{0.35\linewidth}L{0.16\linewidth}L{0.35\linewidth}}
        \toprule
        Guard & Interval & Effect \\
        \midrule
        \endfirsthead
        \toprule
        Guard & Interval & Effect \\
        \midrule
        \endhead
        \nolinkurl{funding_distribute_guard} & 8000ms & Funding settlement \\
\nolinkurl{funding_update_guard} & 8000ms & Premium sampling \\
\nolinkurl{cancel_oi_cap_guard} & 1000ms & OI cap order cancellation \\
\nolinkurl{book_empty_user_states_pruning_guard} & 60000ms & Book cleanup \\
\nolinkurl{reset_recent_oi_guard} & 1000ms & HIP-3 OI reset \\
\nolinkurl{hip3_stale_mark_px_guard} & From snapshot & Stale mark refresh \\
\nolinkurl{begin_block_logic_guard} & 1000ms & Reentrancy protection \\
\nolinkurl{funding_err_dur_guard} & 60000ms & Funding error duration \\
        \bottomrule
        \end{longtable}
        \endgroup

\medskip\hrule\medskip

\section*{13. Implementation Status}
\addcontentsline{toc}{section}{13. Implementation Status}

\begingroup
        \small
        \setlength{\tabcolsep}{4pt}
        \renewcommand{\arraystretch}{1.16}
        \begin{longtable}{L{0.34\linewidth}L{0.28\linewidth}L{0.22\linewidth}}
        \toprule
        Component & Status & Tests \\
        \midrule
        \endfirsthead
        \toprule
        Component & Status & Tests \\
        \midrule
        \endhead
        Action handlers (97) & All implemented & 330+ \\
Begin-block (9 + 5) & All implemented & Tested \\
Bootstrap (57 fields) & 55/57 parsed & Bootstrap test \\
CoreWriter decoder & 15 actions + RLP scanner & 7 tests \\
ADL + BOLE liquidation & Execution implemented & ADL plan + candidates tests \\
Pipeline stages & 6 stages with real logic & 4 tests \\
RPC (30+ endpoints) & Consolidated in hl-rpc & Info tests \\
Integration tests & 18 E2E devnet tests & All pass \\
\textbf{Total} & \textbf{482 tests, 0 failures} & \textbf{Release: 11MB} \\
        \bottomrule
        \end{longtable}
        \endgroup

        \end{document}
