3

In my program, when I call the frontend function I'd like the PDA to be the fee payer and not the end user (so end user has not to approve transaction), although my PDA is stated as isSigner in my IDL, I tried using a node wallet (anchorWallet) as intermediary to pay the fees but it requires access to it's Keypair and I believe that is not possible, maybe in some old deprecated version?

1 Answer 1

4

It is not possible as far as I am aware to have a PDA account pay the transaction fee.

Can you create a program that refunds the fee in the same transaction but still ask the user to sign (example)?

Here is Armani asking the same question:

https://twitter.com/armaniferrante/status/1506788094242082826

1
  • thanks the answer! For your question, I believe a refund would have the same mechanics as a withdraw function, with my actual implementation it would still require the signer to approve the "withdraw" so we we end up in a halting problem hahaha
    – Sing
    Commented Aug 17, 2022 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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