feat: add alternative vault redemption simulations - #1601
Conversation
Vault test remaining fixesObjectiveResolve the remaining issues from the 2026-08-01 ordered 129-vault production The alternative path must prove the real adapter request, settlement and claim BaselineThe verified rerun used:
The machine report is
The headline target is not to relabel every production constraint as ordinary Result modelReplace the current single-outcome compromise with two explicit layers in the {
"observed_result": "redemption_window_closed",
"observed_detail": "Gains withdrawal request window is closed",
"alternative_simulation": {
"succeeded": true,
"interventions": [
{
"kind": "time_advanced",
"timestamp_before": "2026-08-01T00:00:00",
"timestamp_after": "2026-08-02T00:00:00"
}
],
"transactions": ["0x..."],
"assets_returned_raw": "1000000000"
}
}For compatibility, An intervention record must include:
Rows with interventions must remain excluded from return, slippage, solvency Safety invariants
Work item 1: general alternative simulation orchestrationeth-defi contractAdd a manager-owned method such as
The base manager must remain unsupported. Each protocol adapter opts in with a For asynchronous redemptions, extend trade-executor orchestrationRefactor the current redemption retry in
The runner must serialise Work item 2: capital, capacity and zero-payout pathsPharaoh USDCVault
Arche USDVault
Existing Morpho interventionsKeep Apyx USDC and Saturn USDC as regression fixtures. General orchestration Work item 3: time and phase pathsGains withdrawal windowVault
YieldNest RWA MAX maturityVault
Work item 4: amount and asset alternativesEmber Apollo ACREDVault
Sentora USD EarnVault
This is a deposit-asset run override, not a redemption intervention kind. Work item 5: raw failuresAerodrome USDC satellite closeVault
DeTrade Core USDC infrastructure failureVault
Testingeth-defi
trade-executor
Matrix verificationAfter both repositories pass focused tests:
Acceptance criteria
Delivery order
|
|
Implementation update
|
|
Full 129-vault rerun completed on 2026-08-01. Result breakdown:
The Pharaoh payout is explicitly counterfactual: direct USDC funding changes ERC-4626 Run provenance: trade-executor Focused eth-defi fork coverage also passed: Morpho V2, Pharaoh, and Gains closed-window redemption (3 passed; one unrelated pytest configuration warning). The dynamic matrix did not hit a closed Gains window; that path is covered at its pinned fork. |
Non-successful vault resultsThis table covers the 34 non-success rows from the 129-vault rerun. “Likely” separates verified metadata mismatches from lifecycle cases that still need protocol-specific confirmation.
The actual whitelisting-needed rows are expected policy results. The 15 whitelisted-incorrectly rows identify production Vault JSON permission data that should be changed to permissionless. |
|
Correction to the non-success table: the 15 The rerun forks Ethereum at block Therefore the mismatch is a time-snapshot comparison: historical fork state says permissionless, while refreshed production metadata describes a later state. The result should be classified as a historical permission mismatch, not as a request to change current production JSON to permissionless. A valid metadata-correctness check must use an RPC block aligned with the metadata snapshot, or include the metadata observation block/time in the comparison. |
|
Correction to the preceding correction: current production vault metadata is incorrect for these 15 entries. I queried each affected vault against current live RPC using the same eth-defi Therefore these are genuine production metadata defects, not a historical fork-versus-snapshot effect. Please disregard the preceding time-snapshot explanation. The required fix is in the production vault-metadata generation/publishing path: it is emitting |
Production JSON root cause and fixThe public blob embeds eth-defi #1428 adds a versioned metadata-refresh input to that cache signature. Deploying it causes a one-time metadata refresh of every configured EVM chain, then normal cache behaviour resumes. The remaining deployment check is a cache-bypassed fetch of |
Why
The vault matrix needs to show both the live redemption constraint and a disclosed Anvil-only lifecycle proof where one is available.
Lessons learnt
A synthetic success must not replace the original production-state diagnosis or enter economic aggregates.
Summary
Adds the repository-specific implementation plan and changelog entry. Implementation follows after the eth-defi dependency PR.