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: Locked tokens from Transfer Fees - could be burned #6795

Open
BlockLunch opened this issue Jun 4, 2024 · 14 comments
Open

Suggestion: Locked tokens from Transfer Fees - could be burned #6795

BlockLunch opened this issue Jun 4, 2024 · 14 comments

Comments

@BlockLunch
Copy link

Catwifhat ($CWIF), contract address "7atgF8KQo4wJrD5ATGX7t1V2zVvykPJbFfNeVf1icFv1" is a Token Extension project that uses Transfer Fees as an auto-burn mechanism.

The token currently has 964 trillion+ of a 1,000 trillion supply locked forever using Token Extensions, which leads to an insanely high Fully Diluted Market Cap on sites like CoinGecko/CoinMarketCap and Solana Explorer.

Screenshot 2024-06-04 at 6 34 06 PM

My request as the creator of $CWIF is an addition to Token Extensions where projects that use a Transfer Fee with no withdraw authority can have their permanently locked supply burned periodically. In our case, this would get rid of the confusing ~$1.8 billion FDMC while $CWIF's market cap is actually only around $65 million.

@joncinque
Copy link
Contributor

I don't think this is generally the best option -- in some cases, a mint with no fee withdraw authority might not like the burn behavior, perhaps using the amount withheld as a proxy for total amount transferred. In that case, the behavior you're proposing would be destructive for them.

The better option is to give the withdraw authority to a PDA on a program that will withdraw and burn withheld tokens all at once, and then anyone can run a crank to harvest and burn fees.

I appreciate that this isn't possible for this token since the authority has been revoked unfortunately, but we shouldn't change the protocol for everyone based on one-off needs, especially when a good, simple, and composable solution exists.

@BlockLunch
Copy link
Author

I don't think this is generally the best option -- in some cases, a mint with no fee withdraw authority might not like the burn behavior, perhaps using the amount withheld as a proxy for total amount transferred. In that case, the behavior you're proposing would be destructive for them.

The better option is to give the withdraw authority to a PDA on a program that will withdraw and burn withheld tokens all at once, and then anyone can run a crank to harvest and burn fees.

I appreciate that this isn't possible for this token since the authority has been revoked unfortunately, but we shouldn't change the protocol for everyone based on one-off needs, especially when a good, simple, and composable solution exists.

Those are very interesting suggestions for needs that other projects may have in the future. Those are not our needs however. Unfortunately a program that withdraws and burns the tokens is a very centralized approach, and we have stuck with completely decentralized methods for $CWIF from day 1, hence no withdraw authority.

@joncinque
Copy link
Contributor

Sorry, maybe it wasn't clear, but the burn program should be permissionless, making the whole thing totally decentralized!

@BlockLunch
Copy link
Author

In my opinion there can't be any trust in a system that has a withdraw authority. The withdraw authority enabled would make the entire process itself centralized.

@tonton-sol
Copy link
Contributor

@joncinque

Would it be possible to add a process_burn_withheld_tokens_from_accounts() function that just clears the withheld amount but does not add it to the destination? Or it could even take an amount and do a checked_sub() instead. If you wrap this in an instruction and invoke in a transfer-hook this is an auto tax burn.

If you think this is an okay idea, I will submit a PR for it!

@joncinque
Copy link
Contributor

Maybe I'm misunderstanding, but people can't just burn withheld tokens -- they belong to the withdraw withheld authority

And unfortunately, since there's no re-entrancy in Solana, you can't call token-2022 from a transfer hook program

@BlockLunch
Copy link
Author

@joncinque The main issue here isn't whether the transfer fee is burned; the issue is rather that transfer fees that have no withdraw authority (a revoked withdraw authority) still appear in the token's Max Supply. This seems misleading as the tokens will never be in circulation again, so why do they appear in the Max Supply? I believe @tonton-sol's function aims to solve the Max Supply issue without burning any tokens, but please correct me if I am wrong.

@joncinque
Copy link
Contributor

It's a similar situation to tokens held in frozen accounts where the mint has no more freeze authority -- those tokens will also never be in circulation, but they are still part of the mint supply.

@tonton-sol
Copy link
Contributor

@joncinque The idea would be for the withdraw authority to burn these tokens from the recipients account. When you say Solana does not support re-entrancy, are you referring to the recipient account being write-locked during the transfer? So in the same vein, you couldn't also withdraw the tokens in the transfer-hook as well? (I know the transfer-fee extension itself was designed to avoid this for parallelism)

@BlockLunch
Copy link
Author

@tonton-sol If that's the case, I believe it would be beneficial to separate the "Withdraw Authority" and "Burn Authority" into two distinct entities. Withdrawals of transfer fees can significantly impact projects, whereas burning transfer fees primarily affects the Max Supply with minimal other consequences.

Personally, I am in favor of a Burn Authority and wish it could be implemented for $CWIF. The issue with having a "Withdraw Authority" is that it compromises decentralization by placing too much trust in a single party, which could potentially misappropriate the transfer fees. However, if Withdraw Authorities could be revoked while allowing the original Withdraw Authority to retain a Burn Authority, it would be a revolutionary step towards decentralized burns.

@joncinque
Copy link
Contributor

When you say Solana does not support re-entrancy, are you referring to the recipient account being write-locked during the transfer?

@tonton-sol Not quite -- on Solana, you can't:

  • execute program A
  • from A, CPI into program B
  • from the program B CPI, do another CPI back into program A <-- this is the re-entrancy step

@joncinque
Copy link
Contributor

@BlockLunch we could potentially add a separate BurnWithheldTokens instruction and burn_withheld_authority, but it would have to be a new extension, which means that it could not be added to existing tokens

@tonton-sol
Copy link
Contributor

@joncinque So you couldn't even cpi into token22 to mint a token while inside a transfer-hook?

@joncinque
Copy link
Contributor

So you couldn't even cpi into token22 to mint a token while inside a transfer-hook?

@tonton-sol that's correct

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

3 participants