YO Protocol Async Redemption Escrow Accounting

A successful settlement cannot subtract more shares or gross assets than that receiver has pending. It subtracts exactly the accepted amounts.

YO Protocol queues a vault redemption when idle underlying assets cannot satisfy it immediately. Its pinned YoVault.sol async-redemption logic pools the shares and tracks aggregate pending shares and gross assets by receiver. YoAsyncRedemptionEscrow is the Lean model for this source slice. This case proves the successful request, fulfillment, cancellation, and selected lifecycle transitions stated in Specs.lean.

Why It Matters

When a redemption is queued, the vault records the receiver's shares, the assets they are owed, and the total assets reserved for all queued redemptions. These records must change together. Otherwise, the vault could burn too many shares, reduce a user's claim, or treat reserved assets as available.

The units at risk are YO vault shares and the vault's underlying asset units. For the deployed yoUSD escrow on Base, the underlying asset is USDC. The proven fulfillment path also burns exactly the selected shares, splits the selected gross assets into net assets plus the current withdrawal fee, and, under the modeled no-callback-mutation boundary, leaves every other receiver's pending record unchanged.

What the source also permits

YO confirmed that this flexibility is intentional. If the vault's value becomes uncertain after an incident, the authorized operator can settle a request at a lower exchange rate.

The contract checks the shares and assets separately. It prevents the operator from using more than the receiver has pending, but it does not require the two amounts to remain proportional, or even to both be greater than zero. For example, a request for 100 shares and 200 assets could be settled as 1 share and 199 assets.

A settlement with one amount set to zero can leave the remaining record temporarily stuck. A later redemption request for the same receiver can make it usable again.

This flexibility relies on trusting the authorized Redeemer. The proof confirms that the contract's accounting remains within the recorded limits, but it does not decide whether the chosen rate is fair or protect users if the Redeemer key is compromised.

How This Was Modeled and Proven

We recreated the relevant async-redemption logic in Verity, including requests, fulfillment, cancellation, authorization, share movements, fees, and reverts. We then defined the exact accounting rules that each action must follow.

Lean checked those rules against the model for every permitted input, rather than testing only a selection of examples. The 14 resulting proofs cover the normal lifecycle and selected failure paths. All proofs are complete, with no case-specific axioms or sorry placeholders.

Scope

The model covers the async redemption slice of the pinned YO source: requestRedeem, redeem, fulfillRedeem, cancelRedeem, the internal withdrawal path, authorization, fee updates, and the relevant share transfer and burn helpers.

External preview, ERC-20 balance reads, authority calls, and token transfers are explicit success or revert outcomes. The model proves the escrow's own storage transitions and rollback at the selected boundaries. It assumes no authority or token callback mutates modeled vault storage while a boundary call is in flight. It does not prove external token balances, callback code, oracle pricing, or the implementation of the external authority contract.

Deposits, mints, yield strategy execution, manage, upgrade governance, and event logs are out of scope. The source tracks aggregate records by receiver rather than per-request IDs, and the model keeps that exact aggregation.

This is an accounting proof. It does not prove that an emergency settlement rate is fair, that the vault is solvent, or that the authorized Redeemer key cannot be compromised.

Proof artifacts
FunctionTheoremStatus
requestRedeemrequest_redeem_branchingproven
requestRedeemqueued_request_aggregationproven
requestRedeemtwo_owner_queue_aggregationproven
redeemredeem_wrapperproven
fulfillRedeemfulfill_redeem_accountingproven
cancelRedeemcancel_redeem_accountingproven
fulfillRedeemlifecycle_bounds_and_isolationproven
fulfillRedeem / cancelRedeemzero_component_lifecycleproven
request / settlecandidate_g_source_reachabilityproven
request / settle / repairmalformed_pair_lifecycleproven
request / fulfill / replayfull_clear_requeue_replayproven
fulfillRedeemowner_fallback_authorizationproven
fulfillRedeem / cancelRedeemlifecycle_rollbackproven
fee update / fulfillRedeemfee_aliasingproven
Verify it yourself
git clone https://github.com/lfglabs-dev/ethereum-verification-benchmark
cd ethereum-verification-benchmark
git checkout 7d15f0054037ab6d866888d7ab2e80c64c0d15e9
lake build Benchmark.Cases.YOProtocol.AsyncRedemptionEscrow.Compile

This target imports the contract model, specifications, and all reference proofs. A successful build means Lean checked that complete case. Source repository

Assumptions

These three boundaries summarize the detailed preconditions in the Lean theorems. The complete technical conditions remain available in Proofs.lean; the case adds no Lean axioms.

  • trusted authorizationan authorized operator chooses the settlement values

    YO authorization model

    The proof checks what the vault does after a Redeemer or owner is authorized. It does not verify the live role configuration, judge the operator's chosen emergency rate, or protect an existing request if an authorized key is compromised or misused.

  • external callsexternal calls return the modeled result and do not change vault storage through callbacks

    model boundary

    Oracle previews, token balance reads, authority checks, and token transfers are modeled as success or revert outcomes. The proof covers the vault's storage changes and selected rollback paths, not the internal behavior or balances of those external contracts.

  • valid starting statethe vault starts in a valid state and the selected calls satisfy their runtime guards

    Solidity execution conditions

    The modeled share ledger begins well formed, arithmetic fits within Solidity's limits, and successful calls meet checks such as sufficient balances and a live pending record. The reviewed Base deployment also uses separate addresses for USDC and yoUSD.

Learn More

More Research