Skip to content

Value base assets in the base withdrawal queue at the cross price#225

Merged
naddison36 merged 1 commit into
nicka/withdraw-on-swapfrom
nicka/base-asset-value
May 14, 2026
Merged

Value base assets in the base withdrawal queue at the cross price#225
naddison36 merged 1 commit into
nicka/withdraw-on-swapfrom
nicka/base-asset-value

Conversation

@naddison36
Copy link
Copy Markdown
Collaborator

Summary

Value pending base-asset redemptions at the live crossPrice in totalAssets() so moving base assets into an adapter withdrawal queue does not create an immediate NAV bump.

Changes

  • Updated AbstractARM._availableAssets() to discount pendingRedeemAssets by crossPrice.
  • Kept pendingRedeemAssets storage semantics unchanged as the undiscounted liquidity-denominated expected redemption amount.
  • Added unit tests covering:
    • queued base redemptions valued at cross price
    • live cross-price repricing while redemptions are pending
    • claim transition from discounted pending value to actual received liquidity

Motivation

On-hand base assets were already valued at crossPrice, but pending adapter redemptions were previously valued at full expected liquidity. That meant requesting a base-asset redemption could immediately increase ARM NAV, creating an opportunity for new LPs to capture value from sudden yield jumps before redemption completes.

This change keeps queued base assets valued consistently with on-hand base assets.

Test Plan

  • forge test --match-path test/unit/OriginARM/TotalAssets.sol
  • forge test --match-path test/fork/LidoARM/TotalAssets.t.sol
  • forge test --match-path test/fork/OriginARM/VaultInteractions.sol
  • forge test --match-path test/fork/EtherFiARM/RequestWithdraw.t.sol
  • forge test --match-path test/fork/EthenaARM/RequestWithdraw.t.sol
  • forge fmt --check src/contracts/AbstractARM.sol test/unit/OriginARM/TotalAssets.sol
  • git diff --check -- src/contracts/AbstractARM.sol test/unit/OriginARM/TotalAssets.sol

@naddison36 naddison36 merged commit 518cacc into nicka/withdraw-on-swap May 14, 2026
8 checks passed
@naddison36 naddison36 deleted the nicka/base-asset-value branch May 14, 2026 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant