Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Add new authority for 'spl-token withdraw-excess-lamports' #6858

Open
chudleigh2 opened this issue Jun 17, 2024 · 3 comments
Open

Comments

@chudleigh2
Copy link

This may be a pointless request but if you don't ask, you don't get.

I believe the authority to withdraw excess lamports from a program owned account for SPL 2022 is set with Minth Authority.

Almost all tokens created will revoke the Mint Authority making this a pointless CLI command. I appreciate there are already a lot of authorities but but surely one more can't hurt?

Whether it's even possible to change this now is beyond me but doing so would make a huge amount of people happy.

@joncinque
Copy link
Contributor

This is certainly possible -- here's how I'm thinking it would go:

  • Add a new extension like WithdrawExcessLamportsAuthority just for mints, along with an instruction to initialize the authority
  • Add a new WithdrawExcessLamportsAuthority and support it in SetAuthority
  • During withdraw_excess_lamports, if the extension exists, then that's the only possible authority that can withdraw lamports, so even the mint authority wouldn't be able to withdraw lamports

And I think that's it. What do you think?

@chudleigh2
Copy link
Author

chudleigh2 commented Jun 18, 2024

That makes sense!

I was hoping there might have been an even easier solution like giving an existing authority the ability to do it, perhaps even metadata update authority. A lot of tokens will have this extension active but not all.

your way would work for all tokens going forward and is a great idea.

Why not both?

@joncinque
Copy link
Contributor

SPL Token is very careful to avoid overloading authorities, so I would go with the same approach if we add another authority, rather than spreading the ability to withdraw lamports across multiple authorities.

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

No branches or pull requests

2 participants