Skip to main content
Source: src/DepositQueue.sol

Responsibility

DepositQueue is the user entrypoint for depositing into a fund. Deposits are not instant—they are queued into the current batch and converted to shares only when the batch’s oracle report is accepted (see Oracle). This gives every depositor in a batch the same execution price and lets the operator screen prices before settlement. It supports multiple deposit assets (ERC-20s and native ETH via the 0xEeee…EEeE sentinel), per-asset and global pausing, cancellation before settlement, and pro-rata claiming after settlement. Admin functions authorize against the Fund’s access control (spoke pattern).

Deposit lifecycle

1

Request

The user calls deposit. The queue asks the Fund for the current batch id, runs Fund.checkDepositRiskManager, then escrows the assets.One request is allowed per (asset, batch, user).
2

Cancel

The user can cancel their current-batch request before settlement for a full refund.An admin (CANCEL_DEPOSIT_REQUEST_ROLE) can cancel any user’s request in any unsettled batch.
3

Settle

During Fund.acceptReport, the Fund mints the batch’s user shares to the queue and calls settleDeposit, transferring all escrowed assets of that batch to the Fund.
4

Claim

The user calls claimDeposit and receives:depositAmount×batchShareTotalsbatchDepositTotals\text{depositAmount} \times \frac{\text{batchShareTotals}}{\text{batchDepositTotals}}There is no deadline.

Function reference

User actions

Fund actions

Admin

Roles are checked on the Fund.

Views

getAllowedAssets(), getAssetStatuses(), getDepositRequest(asset, batchId, investor), getPendingDeposits(investor), getClaimableDeposits(investor), batchDepositTotals(asset, batchId), batchShareTotals(asset, batchId), isAssetPaused(asset), fund(). RedeemQueue · Oracle · RiskManager