3

I've been interested in Solana's ecosystem recently and digged a lot of documentation.

While going through token-2022 docs I found out that the transfer fees that occur on ALL transfers are like a deducted tax.

My question is :

Is there a way to modify the function in order to swap(or maybe through the transfer-hook function) so that the withdrawer wallet doesn't receive native token but SOL or wSOL ?

1 Answer 1

3

As you noticed, the transfer fees in token-2022 are only denominated in the same token. If you want to deduct a transfer fee in a different token, then you will need to do this separately through a transfer-hook.

Note that there are protections in token-2022 which demote the authorizing signer to be a non-signer to avoid abuse in transfer-hook programs, so you'll need to pass in additional signers if you want to go this path.

Not the answer you're looking for? Browse other questions tagged or ask your own question.