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 fee payer key improvement #2606

Closed
Tracked by #2506
ws4charlie opened this issue Jul 31, 2024 · 2 comments · Fixed by #2673
Closed
Tracked by #2506

Solana fee payer key improvement #2606

ws4charlie opened this issue Jul 31, 2024 · 2 comments · Fixed by #2673
Assignees
Labels
chain:solana zetaclient Issues related to ZetaClient

Comments

@ws4charlie
Copy link
Contributor

Describe the Issue
The Solana fee payer's private key is now a file (~/.zetacored/solana-key.json) containing plain text. Consider using a encrypted file and password to protect the key. The protection could be similar to what we've done for TSS key. Also, if necessary, we could use a better default path for the fee payer key? @CharlieMc0

Expected Outcome
A description of what outcome you are seeking.

@ws4charlie ws4charlie added zetaclient Issues related to ZetaClient chain:solana labels Jul 31, 2024
@lumtis
Copy link
Member

lumtis commented Aug 6, 2024

The most ideal solution, short term, to me would be to move the signer out of the ZetaClient. The issue would be how to let ZetaClient communicate to the signer the tx to be sent?

As a long term solution we should have a model where a reward is paid to relayer to incentivize anyone to relay the tx

@ws4charlie ws4charlie self-assigned this Aug 6, 2024
@ws4charlie
Copy link
Contributor Author

ws4charlie commented Aug 6, 2024

The current flow:

  1. Each outbound requires a TSS signature as authorization.
  2. Once TSS signature is produced. Anyone (without permission) is able to wrap the signature into a Solana transaction to call Solana gateway program.
  3. The step 2 is now done by the TSS signers using their own Solana private keys. To be specific, 9/9 of them will try to call 'withdraw' method on gateway, and only (and always) 1/9 will succeed.

Looks to me the TSS signers are the best candidates to do the job in step 2 because they're the only actors having immediate access to the TSS signatures.

For the cost of the Solana transaction, at least the Solana fee (now it's 0.000005 SOL static fee per outbound) of the transaction that calls the gateway withdraw needs to a refund back to the caller address (whoever it is).

For incentivization, it could be more a TBD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chain:solana zetaclient Issues related to ZetaClient
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants