The DepositQueue contract enables asynchronous asset deposits into vaults using a time-delayed, oracle-priced queuing mechanism. Deposits are not processed immediately. Instead, users submit requests that are later fulfilled when an external price oracle submits a valid report. This enables batching (based on Fenwick Tree data structure), mitigates front-running, and facilitates accurate share pricing.
deposit(assets, referral, merkleProof).(timestamp, value) checkpoint under requestOf[msg.sender].merkleProof) or onchain mapping (if flags.hasWhitelist() returns true).handleReport(priceD18, timestamp) method.depositInterval seconds (the interval is specified in the oracle’s security params).prices and uses it to convert accumulated assets to shares.ReportHandled is emitted.A user calls claim(account) to mint and receive previously allocated shares.
The number of shares is computed as:
uint256 shares = (request.assets * reducedByDepositFeePriceD18) / 1e18;
Shares are minted to the user via mintAllocatedShares.