Skip to content

Conversation

@samkim-crypto
Copy link
Contributor

@samkim-crypto samkim-crypto commented Jan 2, 2026

Problem

The WithdrawWithheldTokensFromMint instruction credits tokens directly to the available balance of the destination account and does not update the pending balance or its associated credit counter. Therefore, the instruction should not fail when the destination account’s pending_balance_credit_counter equals its maximum_pending_balance_credit_counter, since no pending credit is created.

Applying this check incorrectly leads to unnecessary transaction failures and can prevent the TransferFeeConfig withdraw-withheld authority from distributing withheld fees to certain accounts. Moreover, because this authority cannot invoke ApplyPendingBalance on accounts it does not own, it has no way to reduce their pending_balance_credit_counter, meaning such accounts may be permanently unable to receive withheld-fee withdrawals even though the operation is semantically valid.

Summary of Changes

Remove the overly strict validation check on withheld fee destination account.

@samkim-crypto samkim-crypto changed the title [program] Remove an overly stric validation check on withheld fee destination account [program] Remove an overly strict validation check on withheld fee destination account Jan 2, 2026
@samkim-crypto samkim-crypto marked this pull request as ready for review January 7, 2026 01:52
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!

@samkim-crypto samkim-crypto merged commit 3eee08b into solana-program:main Jan 7, 2026
38 checks passed
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