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