Skip to content

View Functions

All read-only functions publicly available on LiquidityVault.

Function Returns Description
totalManagedAssets() uint256 aggregateMarketNav(). Real-time total value of vault assets at market prices.
sharePrice() uint256 aggregateModeledNav() / totalShares. The modeled share price investors see accruing over time.
marketSharePrice() uint256 aggregateMarketNav() / totalShares. The true mark-to-market share price.

Two share prices

sharePrice() reflects the model's expected outcome — what investors track as yield accrual. marketSharePrice() reflects live market reality. The gap between them is the source of the redemption curve discount.

Position Information

Function Returns Description
activePositionCount() uint256 Count of slots with status == ACTIVE.
positionInfo(uint256 slot) Position Full Position struct for a given slot index (0–3). Returns all fields including adapter address, entry price, maturity, status, and last rebase timestamp.

Liquidity State

Function Returns Description
remainingDailyLiquidity() uint256 dailyCap - redeemedToday. Amount of USDC that can still be redeemed in the current day window.
paused() bool Returns aggregateGapBps() > PAUSE_GAP_BPS \|\| idleReserve < dailyCap. Implemented as a modifier: modifier whenNotPaused() { require(!paused()); _ }. Applied to processWithdrawals (reverts entire call) and emergencyLiquidate (inverse check — requires paused). Not applied to: deposit, requestWithdraw, cancelWithdraw, or any governance function.

Queue State

Function Returns Description
getRequest(uint256 requestId) Request Returns the Request struct for a given requestId. Uses the requestStatus mapping to determine state. Reverts with typed errors for non-pending states — see table below.
queueDepth() uint256 nextRequestId - nextProcessId. Total pending requests in the queue, including those that cannot be processed today due to the daily cap.

getRequest — Request State Reference

getRequest uses the requestStatus mapping to return typed errors for all non-pending states. ERC-7540 integrators can distinguish all four states via typed error selectors without off-chain indexing.

requestStatus value getRequest behaviour
PENDING Returns the Request struct
PROCESSED Reverts with RequestAlreadyProcessed(requestId)
CANCELLED Reverts with RequestAlreadyCancelled(requestId)
NONE (ID never issued) Reverts with RequestNeverExisted(requestId)

Usage Examples

Check if withdrawals are available today

bool canWithdraw = !vault.paused() && vault.remainingDailyLiquidity() > 0;

Estimate payout for a queued request

The exact payout is not deterministic until keeper processing — see ERC-7540 Divergence. For a rough estimate:

uint256 sharePrice   = vault.sharePrice();
uint256 shares       = vault.getRequest(requestId).shares;
uint256 grossEst     = shares * sharePrice / 1e18;
uint256 feeEst       = grossEst * 50 / 10000;       // 0.5%
uint256 netEst       = grossEst - feeEst;
// Actual payout will be ≤ netEst due to curve discount

Monitor gap

uint256 modeled = vault.sharePrice();
uint256 market  = vault.marketSharePrice();
uint256 gapBps  = (modeled - market) * 10000 / modeled;
// gapBps >= 1500 means system is or will be paused