Skip to content

Support claiming legacy redeem requests#232

Merged
naddison36 merged 6 commits into
nicka/withdraw-on-swapfrom
nicka/migration
May 21, 2026
Merged

Support claiming legacy redeem requests#232
naddison36 merged 6 commits into
nicka/withdraw-on-swapfrom
nicka/migration

Conversation

@naddison36
Copy link
Copy Markdown
Collaborator

Summary

  • Move reservedWithdrawLiquidity to a new storage slot and preserve the legacy packed withdrawal queue slot.
  • Add one-step upgrade compatibility for legacy LP withdrawal requests with shares == 0.
  • Convert LP-path revert strings to custom errors to keep ARM implementations under EIP-170.
  • Update migration, unit, fork, and upgrade guard tests for pending legacy withdrawal queues.

Details

Legacy asset-denominated LP withdrawal requests can now be claimed after the upgrade instead of requiring the old queue to be fully drained before upgradeToAndCall.

New share-escrowed requests continue to use the new share-based queue accounting, while legacy requests use the preserved _deprecatedWithdrawsQueued/_deprecatedWithdrawsClaimed counters.

Swap-facing revert strings are intentionally unchanged for compatibility.

Testing

  • forge test --match-path 'test/unit/OriginARM/{Deposit,RequestRedeem,ClaimRedeem,MigrateLegacyWithdrawQueue}.sol' -vv
  • forge test --match-path 'test/fork/LidoARM/{Deposit,ClaimRedeem}.t.sol' -vv
  • forge test --match-path 'test/deploy/*UpgradeGuards.t.sol' -vv
  • forge build --sizes | rg '(^|\| )(LidoARM|OriginARM|EthenaARM|EtherFiARM|ReentrantGuardHarnessARM) '
  • git diff --check

Contract Sizes

EthenaARM   23,699 B   margin +877 B
EtherFiARM  24,469 B   margin +107 B
LidoARM     24,430 B   margin +146 B
OriginARM   23,680 B   margin +896 B

Copy link
Copy Markdown
Contributor

@clement-ux clement-ux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments, but lgtm 👍

Comment thread src/contracts/AbstractARM.sol
Comment thread src/contracts/AbstractARM.sol
Comment thread src/contracts/AbstractARM.sol
Comment thread src/contracts/AbstractARM.sol
@naddison36 naddison36 merged commit d679919 into nicka/withdraw-on-swap May 21, 2026
8 checks passed
@naddison36 naddison36 deleted the nicka/migration branch May 21, 2026 23:22
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.

2 participants