Skip to content

Conversation

grod220
Copy link
Member

@grod220 grod220 commented Jun 18, 2025

This instruction is a mitigation for an edge case. A mint with the close authority extension has the ability to:
1 - close the mint
2 - re-create the mint w/ new extensions

This can happen after an escrow ATA is created and whose owner is set to be the WrappedMintAuthority. Because the re-created mint adds new space/extension requirements to the escrow ATA, an attempt to Wrap will result in an error.

The mitigation is this instruction which can detect the bad state of the escrow PDA and close it. The client can then re-create it on their own.

Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great overall! Just the bit about the immutable owner extension

Copy link

@buffalojoec buffalojoec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I second Jon's feedback, and added some inconsequential comments myself. 😊

@grod220 grod220 changed the base branch from main to account-mint-builders June 23, 2025 15:00
@grod220 grod220 requested review from joncinque and buffalojoec June 23, 2025 15:21
Base automatically changed from account-mint-builders to main June 24, 2025 07:59
@grod220 grod220 merged commit 2fccfa0 into main Jun 24, 2025
11 checks passed
@grod220 grod220 deleted the repair-escrow branch June 24, 2025 09:03
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.

3 participants