High-Level Architecture
Last updated
The service is a pipeline of four asyncio components connected by three bounded queues. A single user deposit flows left to right through them:
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.
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.
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.
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
