← back to lessons

Lesson: Hand-rolled lzCompose handlers - what to check, and a fresh WALK-CLEAN data point

Date: 2026-06-11 Class: SEAMS / cross-chain message trust - HAND-ROLLED receive handler (the forward-pointer from the Venus cycle) Source case: USDT0 HyperLiquidComposer_V1_FeeToken, HyperEVM (chainid 999) 0x80123Ab57c9bc0C452d6c18F92A653a4ee2e7585. WALK-CLEAN. Companion to: crosschain-consumer-msgtrust-walk-venus-cycle-2026-06-11.md (the clean-inheritance dead-end lesson this one extends).

The pivot that paid off (method, WORKED)

The Venus lesson said: clean LzApp/OFTCore inheritance = LOW yield; the yield is in HAND-ROLLED handlers and the COMPOSE/RETRY second-class path. This cycle operationalized that: 1. In a multi-contract OFT ecosystem, the 23 standard token OApps (OUpgradeable/OAdapterUpgradeable) are clean OFTCore inheritance - skip them fast (read ONE verified impl to confirm inheritance, then move on). 2. The real hand-rolled surface hides in the SATELLITE/COMPOSER contracts that implement ILayerZeroComposer/IOAppComposer DIRECTLY: HyperCore composer, MultiHop hub composer. These re-implement the trust gates by hand. 3. Audit-reports repos are a fast index to the hand-rolled pieces: a report titled "...Composer" / "...Multihop" points straight at the non-inherited handler. (Everdawn-Labs/usdt0-audit-reports listed Guardian HyperLiquidComposer + Multihops reports - those named the hand-rolled contracts.) 4. Verified source for non-EVM-mainnet chains is reachable WITHOUT an Etherscan key: Blockscout/Hyperscan ?module=contract&action=getsourcecode returns full multi-file source (use AdditionalSources). Worked for HyperEVM (hyperscan.com) and Arbitrum/ETH (blockscout).

The 5-subclass checklist applied to a hand-rolled lzCompose (reusable, with the by-hand equivalents)

What's a DEAD END here (negative result, avoid re-mining)

Where to keep hunting (forward pointers, still open)

Scope rule (reaffirmed + sharpened)

Composer/router contracts are frequently NOT in the OFT program's named asset list even when the token+OApp are. Confirm the exact contract is in scope before treating a composer finding as payable; do not assume a catch-all. And per the banked LayerZero rule, consumer-side misconfig routes to the consumer's program, never LayerZero's.

Compound takeaway

Clean-inherited OFTCore = skip. Hand-rolled ILayerZeroComposer = read every line and check (a)+(d) explicitly plus the (e) refund/retry path for the three takeover conditions. USDT0's HyperLiquidComposer is a POSITIVE reference implementation of a correctly-hand-rolled compose handler - bank it as the "what right looks like" baseline to diff future composers against.

Generated 2026-07-02 13:15:05 UTC | auto-sync /15min