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

solana: Consider providing a 'backup account' in case of ATA issues #366

Open
johnsaigle opened this issue Mar 28, 2024 · 1 comment
Open
Labels
abi Changes Contract ABI solana Change to Solana programs

Comments

@johnsaigle
Copy link
Collaborator

In some niche scenarios it may be possible that a user does not have ownership over their associated token account (for example, after a phishing attack).

A nice UX for these unlucky users would be to allow them to specify an alternate token account where they can claim transfers.
The logic of the release_inbound function could be modified to do an explicit owner check on the primary account and, if there is account owner does not match, transfer the funds instead to the alternate account.

Similar example from Mango:
https://github.com/blockworks-foundation/mango-v4/blob/f54bb6f0b00f4674f7177b3b1484ae5d615b0805/programs/mango-v4/src/accounts_ix/token_force_withdraw.rs

@johnsaigle johnsaigle added solana Change to Solana programs abi Changes Contract ABI labels Mar 28, 2024
@johnsaigle
Copy link
Collaborator Author

Added ABI label because I think adding the alternate account would change the function signature and thus the IDL as well. Not sure if this is correct or if there are alternate designs we could consider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abi Changes Contract ABI solana Change to Solana programs
Projects
None yet
Development

No branches or pull requests

1 participant