chore: implement atomic vault migration adapter - #212
Open
V00D00-child wants to merge 6 commits into
Open
V00D00-child wants to merge 6 commits into
V00D00-child wants to merge 6 commits into
Conversation
V00D00-child
marked this pull request as draft
September 23, 2026 17:24
Replace mock call-count checks with signed delegation chains through the real adapters so migrations are verified by mUSD and vault-share balances.
V00D00-child
marked this pull request as ready for review
September 23, 2026 18:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Why?
to-premium/to-base)How?
Note
High Risk
Moves vault shares and underlying assets through permissionless entry points with custom compliance and delegation signature schemes; bugs could affect user funds or allow mis-routed premium transfers.
Overview
Introduces
VaultMigrationHelper, a compositor over immutableVedaAdapterandComplianceVedaAdapterso base ↔ premium vault moves run as one atomic transaction via paired withdrawal/deposit delegation chains (single and batch, permissionless callers). To-premium legs still forward premium deposit compliance to the compliance adapter; shared root delegator and slippage checks are enforced in the helper.Also adds
premiumTransfer/ batch: redeems a leaf delegation that sends the owner’s full premium share balance to the helper, then forwards shares to atoaddress only after dual destination control—ERC-1271 EIP-191 user proof bindingfrom/to/leaf signature, plus a helper-scoped compliance EIP-191 digest (replay-protected, Teller signer role/window, distinct from deposit signatures). OwnerwithdrawEmergencyrecovers stray tokens.Deployment is supported via
DeployVaultMigrationHelper.s.sol(CREATE2 + new.envvars) andIComplianceVedaTeller/IRolesAuthorityinterface additions for compliance role checks. Broad Monad fork tests cover migrations, batches, transfer edge cases, and compliance failures.Reviewed by Cursor Bugbot for commit 0844476. Bugbot is set up for automated code reviews on this repo. Configure here.