Skip to main content

Overview

SyncQueue is the abstract base contract for synchronous queues: queues that settle a deposit or redemption in the same transaction the user sends. It is not deployable on its own. It is extended by: Unlike Queue, a sync queue keeps no request history and does not wait for a future oracle report. It prices each action against the latest stored oracle report for its asset, which must be non-suspicious and no older than a configured maxAge. Unlike SignatureQueue, a sync queue needs no offchain signatures. Any eligible user can call it directly, and the vault’s deposit or redeem fee applies.

How sync queues compare

Storage

Storage lives in a custom slot derived with SlotLibrary.getSlot("SyncQueue", name_, version_).

Initialization

  • Called by child contracts from initialize
  • Reverts with ZeroValue if asset_ or vault_ is the zero address
  • Initializes the reentrancy guard

Creating a sync queue

Sync queues are deployed through the vault’s queue factories, like any other queue, with ShareModule.createQueue. The standard deployment registers queue implementations in this order: Confirm the version on your network with factory.implementationAt(version) before you create a queue.

Interface compatibility

Sync queues are registered in ShareModule like any other queue, so they implement the methods the vault calls on every queue:
  • handleReport(priceD18, timestamp): no-op. Oracle reports do not change sync queue state.
  • canBeRemoved(): always true, because a sync queue holds no pending requests.
  • vault() and asset(): return the configured addresses.
  • name(): returns "SyncDepositQueue" or "SyncRedeemQueue".
Because canBeRemoved() is true, OracleHelper skips sync redeem queues when it subtracts outstanding redeem demand from vault TVL.

Errors