0

In my program I am making the program-owned account receive token payments. So I was wondering the following?

Questions:

  1. Is there anything wrong with creating associated token accounts (ATAs) on a program-owned account?

  2. What happens to the ATAs in the case that I close the program-owned account?

  3. Should I always close the ATAs before I close the program-owned account?

1 Answer 1

2

To answer your questions:

  1. There's certainly nothing wrong with this! DeFi application are often built using token accounts owned by program-owned accounts
  2. The ATAs must be closed by the account that owns them or by a designated "close authority", so even if you close the program-owned account, if the account is on a program-derived address, your program can still close them. The ATAs will not be closed automatically, however.
  3. Order doesn't really matter, as long as you can sign for the program-owned account.

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.