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
Currently, a "tombstone" is added to the first 8 bytes of an account when using #[account(close)]. However, this can leave an account in limbo if one closes it and a subsequent instruction immediately refunds it. This is particularly important for PDAs, which are associated with a user, since this effectively means the user can no longer use the contract with a previously used wallet.
To handle this case, we should consider adding an instruction to all Anchor programs that simply checks if a tombstone discriminant is present. If so, send out all lamports to a given, unauthorized destination address.
Currently, a "tombstone" is added to the first 8 bytes of an account when using
#[account(close)]
. However, this can leave an account in limbo if one closes it and a subsequent instruction immediately refunds it. This is particularly important for PDAs, which are associated with a user, since this effectively means the user can no longer use the contract with a previously used wallet.To handle this case, we should consider adding an instruction to all Anchor programs that simply checks if a tombstone discriminant is present. If so, send out all lamports to a given, unauthorized destination address.
Related #604.
The text was updated successfully, but these errors were encountered: