For the complete documentation index, see llms.txt. This page is also available as Markdown.

High-Level Architecture

The service is a pipeline of four asyncio components connected by three bounded queues. A single user deposit flows left to right through them:

  1. Reader: keeps a websocket open to Hyperliquid, subscribes to the relayer's non-funding ledger updates, and pushes raw matching messages onto message_queue. It never does heavy work itself, so the receive loop never blocks.

  2. Message dispatcher: pulls messages off message_queue and spawns a processing task per message, bounded by a semaphore. Detected deposits are enqueued onto bridge_queue.

  3. Bridge worker: pulls a batch off bridge_queue, bridges the aggregate amount from HyperCore to HyperEVM, marks the transfers as bridged, and forwards each transfer to deposit_queue.

  4. Deposit worker: pulls a batch off deposit_queue and submits a single on-chain batchDeposit call to the vault via the Fordefi-signed BatchDepositor.

Last updated