Skip to content

chore: implement atomic vault migration adapter - #212

Open
V00D00-child wants to merge 6 commits into
chore-add-support-for-veda-protocol-with-compliancefrom
chore/vault-migration-adapter-veda
Open

V00D00-child wants to merge 6 commits into
chore-add-support-for-veda-protocol-with-compliancefrom
chore/vault-migration-adapter-veda

Conversation

@V00D00-child

@V00D00-child V00D00-child commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

What?

  • Add VaultMigrationAdapter to compose existing base (VedaAdapter) and premium (ComplianceVedaAdapter) calls into one atomic transaction
  • Support to-premium and to-base as permissionless single and batch entry points, forwarding both delegation chains and premium deposit compliance

Why?

  • To support money account atomic vault migrations(ie 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 immutable VedaAdapter and ComplianceVedaAdapter so 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 a to address only after dual destination control—ERC-1271 EIP-191 user proof binding from/to/leaf signature, plus a helper-scoped compliance EIP-191 digest (replay-protected, Teller signer role/window, distinct from deposit signatures). Owner withdrawEmergency recovers stray tokens.

Deployment is supported via DeployVaultMigrationHelper.s.sol (CREATE2 + new .env vars) and IComplianceVedaTeller / IRolesAuthority interface 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.

@V00D00-child
V00D00-child requested a review from a team as a code owner September 23, 2026 17:22
@V00D00-child
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
V00D00-child marked this pull request as ready for review September 23, 2026 18:39
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