# Follow a withdrawal from queue to cash This offline lesson follows one normal queued withdrawal and calculates its net payment. You need only a calculator or a spreadsheet. All inputs are fictional and fixed for the exercise; do not connect a wallet or submit transactions. The example is not a quote, a live-vault simulation or a payment-time guarantee. By the end, you will be able to distinguish queue submission, vault request, settlement, operator collection and the lender's claim. For actual actions, use the [Pareto app](https://app.pareto.credit/) and [lender redemption guide](../product/users/lenders/guides/redeem.md). ## 1. Set up the worksheet Create columns named **Stage**, **Lender tranche tokens**, **Queue tranche tokens**, **Queue receipt**, **Queue cash** and **Lender cash received**. Amounts below use a fictional settlement token called UNIT with six decimals. Tranche tokens have 18 decimals. Use these assumptions: | Input | Fixed exercise value | | -------------------------------------- | -------------------------------------------------------- | | Route | Standard AA queue; normal withdrawal; no loss or default | | Lender's initial position | 10,000 AA tokens | | Price when the queue is processed | 1 UNIT per AA token, after the accounting checkpoint | | Total active AA NAV at that checkpoint | 100,000 UNIT; no BB capital; AA yield allocation 100% | | Strategy epoch while submitting | 41; queue assigns this withdrawal to epoch 42 | | Next epoch duration | 30 days | | Remaining buffer at processing | 6 days | | Gross simple annual rate | 7.3%, on a 365-day basis | | Annual management fee | 0.365% | | Performance fee | 10% of projected interest after management fees | | Other exercise costs | Zero; no gas, commercial charges or escrow sale | Assume the queue contains only this request and has no earlier uncollected claims. The operator processes it at the checkpoint, with no additional elapsed management-fee accrual, and starts the next epoch after the six-day buffer. The borrower funds the full withdrawal liability at successful settlement. Rates and settings stay fixed. These assumptions isolate the withdrawal calculation; they do not predict the preceding cycle's performance. **Checkpoint:** the opening row is `10,000 | 0 | 0 | 0 | 0` across the five balance columns. ## 2. Submit to the queue during epoch 41 Move all 10,000 AA tokens from the lender column to the queue column. Record queue request epoch **42**. The queue holds the tokens, but they still represent an active tranche position. No vault receipt or cash payment exists yet. **Expected row:** `0 | 10,000 | 0 | 0 | 0`. **Check your understanding:** has the lender been paid? **No: lender cash received is 0 UNIT.** ## 3. Process the vault request in the next buffer Assume epoch 41 settles successfully, advancing the strategy to epoch 42. The standard queue processor uses the current epoch and accepts no epoch argument. If bucket 42 stays unprocessed and the strategy advances to 43, the lender can cancel using the original epoch 42 and resubmit when the route opens. At the operator's processing checkpoint, the price is exactly 1 UNIT per AA token. Calculate: ```text Principal = 10,000 × 1 = 10,000 UNIT Projected interest = 10,000 × 7.3% × 30 / 365 = 60 UNIT Management fee = 10,000 × 0.365% × (30 + 6) / 365 = 3.60 UNIT Gain after management fee = 60 − 3.60 = 56.40 UNIT Performance fee = 56.40 × 10% = 5.64 UNIT Total withdrawal fees = 3.60 + 5.64 = 9.24 UNIT Net receipt = 10,000 + 60 − 9.24 = 10,050.76 UNIT ``` The six-day buffer enters upfront management fees; projected withdrawal interest covers only the 30-day epoch. The example's buffer-adjusted strategy APR is 8.76% (`7.3% × 36 / 30`); reversing that adjustment for the withdrawal gives the 60 UNIT above. Do not add another six days of projected withdrawal interest. Record the burn of the queue's 10,000 AA tokens and its receipt of **10,050.76 UNIT**. The queue's withdrawal price is `10,050.76 / 10,000 = 1.005076 UNIT` per submitted AA token. The lender's share of queue pending claims is **10,050.76 UNIT**. **Expected row:** `0 | 0 | 10,050.76 | 0 | 0`. **Raw-value checkpoint:** the receipt is `10050760000` underlying units; the queue price is `1005076` underlying units per `1e18` AA tokens. These inputs produce exact integer results at the stated precision. ## 4. Settle and fund epoch 42 Advance the worksheet through the assumed six-day buffer and 30-day epoch. Reaching the end date does not change any cash column. Now record a successful authorized settlement that funds the queue's full **10,050.76 UNIT** claim and advances the strategy epoch to **43**. In an ordinary minted-interest stop, strategy tokens book active interest while this withdrawal still needs its cash funding. The queue has a funded strategy claim, but has not collected its cash. Mark the receipt **funded**, retaining the same numeric row: `0 | 0 | 10,050.76 | 0 | 0`. **Checkpoint:** funding is not yet a lender payment, and the queue cash column remains **0 UNIT**. ## 5. Collect into the queue Record the operator collecting the funded claim for queue epoch 42. Clear its receipt and move **10,050.76 UNIT** into queue cash. Mark queue pending claims **0 UNIT**. This clears the queue's aggregate claim gate so the operator can process the next withdrawal bucket while direct requests are enabled. The withdrawal price remains **1.005076 UNIT** per submitted AA token. **Expected row:** `0 | 0 | 0 | 10,050.76 | 0`. **Checkpoint:** the lender can now claim under this exercise's assumptions, but has received **0 UNIT** so far. ## 6. Record the lender's claim and reconcile Calculate `10,000 × 1.005076 = 10,050.76 UNIT`. Move that amount from queue cash to lender cash received and clear the lender's queued entitlement. **Final row:** `0 | 0 | 0 | 0 | 10,050.76`. Your reconciliation should show: | Result | Exact expected amount | | ---------------------------------------------------- | --------------------- | | Principal returned | 10,000 UNIT | | Gross projected interest | 60 UNIT | | Vault withdrawal fees | 9.24 UNIT | | Net gain | 50.76 UNIT | | Cash received | 10,050.76 UNIT | | Remaining receipt, queue cash and lender entitlement | 0 | The 50.76 UNIT is a **0.5076%** gain on the exercise principal. It is not an APY: this lesson assumes a particular waiting period, fees, full funding and a successful claim. If your result is 10,060 UNIT, you omitted fees. If it is 10,050.76 UNIT immediately on submission, you collapsed the lifecycle. If you counted both the receipt and the burned tokens as active value, you counted the same position twice. Next, read [liquidity](../product/credit-vaults/liquidity.md) for the route variations, [fees](../product/credit-vaults/fees.md) for the accounting order, and [risks](../product/credit-vaults/risks.md) for cases where full payment does not occur. The [Web3 guide](../developers/integrators/web3.md) maps request states to implementation actions; this lesson intentionally performs none. **Exercise scope:** the rates, balances, and timing assumptions belong only to this exercise. Use the [withdrawal integration guide](../developers/guides/withdrawals.md) to check request and claim conditions for a live vault.