Skip to content

improvement: assign instead of close account when undelegating #59

@crypto-vincent

Description

@crypto-vincent

Summary

When undelegating accounts we close/open accounts, this might be simplified to simply zeroout+assign the account instead, this would have two distinct advantage:

  • the proper lamport balance (even if different than the minimum_rent) would be conserved
  • the account would be assigned to the receiving program directly, instead of being passed as a system_program account (closed accounts are system_program owned) which mean the receiving program will NOT need to sign for the account to be able to modify it, since it is already the owner at the time of the CPI

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions