You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Streamline the MagicBlock Protocol v2 delegation account lifecycle #203
Streamline delegation and undelegation account lifecycle for MagicBlock Protocol v2 under #132.
Why
Reduce account churn and redundant delegation state, retain surplus lamports in a global vault while delegated, and charge the delegation fee at entry.
Scope
On delegation, leave the rent-exempt minimum on the delegated account, move surplus lamports to a global vault, and account for their return.
On undelegation, restore the vaulted lamports, zero account data, and assign the account back to the expected owner without closing and recreating it.
Combine delegation record and metadata into one PDA; remove stored seeds only when the v2 flow no longer needs them.
Charge the delegation fee exactly once during delegation, with no delegation-fee charge during undelegation.
Cover lamport round trips, zero-and-assign behavior, the unified PDA layout, and fee timing in tests.
changed the title [-]feat: streamline delegation account lifecycle for DLP v2[/-][+]Streamline the DLP v2 delegation account lifecycle[/+]on Sep 17, 2026
changed the title [-]Streamline the DLP v2 delegation account lifecycle[/-][+]Streamline the MagicBlock Protocol v2 delegation account lifecycle[/+]on Sep 17, 2026
Goal
Streamline delegation and undelegation account lifecycle for MagicBlock Protocol v2 under #132.
Why
Reduce account churn and redundant delegation state, retain surplus lamports in a global vault while delegated, and charge the delegation fee at entry.
Scope