Appearance
Withdrawal Approval Flow
This diagram shows the three-step approval-based withdrawal process when requireApprovalForWithdrawals = true.
Process Overview
This flow only applies when a pool is configured to require manager approval for withdrawals. It provides better liquidity management and prevents bank-run scenarios.
Three Steps
- Request - LP submits withdrawal request
- Approve - Pool manager reviews and approves
- Execute - LP executes standard ERC4626 withdraw/redeem
Key Points
- Optional Feature: Only applies when
requireApprovalForWithdrawals = true - Manager Control: Pool manager determines approval amounts
- Reserved Shares Protection: Approved shares excluded from
getAvailableForBorrowing() - Atomic Consumption: Approval consumed when withdrawal executes
- Partial Approvals: Manager can approve less than requested
Reserved Shares
When shares are approved for withdrawal, they are tracked in totalReservedShares. This amount is subtracted from the available capital for borrowing:
solidity
function getAvailableForBorrowing() returns (uint256) {
uint256 totalAvailable = virtualBalance;
uint256 reserved = totalReservedShares * sharePrice;
return totalAvailable - reserved;
}This ensures that borrowers cannot draw funds that LPs have been approved to withdraw.
Comparison: Approval vs Instant
| Feature | With Approval | Instant (No Approval) |
|---|---|---|
| Request needed | ✅ Yes | ❌ No |
| Manager review | ✅ Yes | ❌ No |
| Wait time | Typically the withdrawalPeriod defined in the Tranche settings | Immediate |
| Liquidity management | ✅ Better | Basic |
| Bank-run protection | ✅ Yes | Limited |
| Use case | Institutional pools | Retail/liquid pools |
Related Flows
- Deposit Flow - How LPs deposit
- Architecture Overview - WithdrawalRegistry component