Skip to content

Structural Alignment

ERC-7540 was designed specifically for vaults where fulfillment is asynchronous and operator-controlled. The Vault-K-NO architecture maps directly onto the ERC-7540 two-phase pattern.

Concept Mapping

ERC-7540 Concept Vault-K-NO Implementation
Request phase requestWithdraw(shares, receiver) — enters FIFO queue, returns requestId
Pending state getRequest(requestId) — returns full Request struct (owner, receiver, shares, timestamp) for any pending requestId
Queue visibility queueDepth() — returns total pending requests; getRequest() readable by any caller for any requestId
Operator fulfillment processWithdrawals(maxCount) — permissioned keeper, processes queue in FIFO order
Cancellation cancelWithdraw(requestId) — returns shares to original requester
Operator role Keeper address controls fulfillment sequencing and timing
Request identifier requestId (uint256), assigned at queue entry, emitted in WithdrawRequested, referenced on cancel and fulfillment

The Two-Phase Pattern

Phase 1 (Request):
  Investor calls requestWithdraw(shares, receiver)
  └── Shares locked in vault
  └── Request stored in FIFO queue
  └── requestId returned and emitted
  └── No USDC transferred yet

Phase 2 (Fulfillment):
  Keeper calls processWithdrawals(maxCount)
  └── FIFO queue processed
  └── Exit price computed from quadratic curve
  └── USDC transferred to receiver
  └── Shares burned
  └── WithdrawProcessed event emitted

This two-phase structure is exactly what ERC-7540 was designed to standardize.