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

Is it possible to let users set some hooks for their behavior like transferring native tokens ? #3030

Open
kikakkz opened this issue Dec 15, 2024 · 1 comment
Assignees

Comments

@kikakkz
Copy link

kikakkz commented Dec 15, 2024

Motivation
When users transfer tokens, they use private key to sign their Operation then send to blockchain. If the private key is leak, then phisher who have the private key will be able to transfer assets of the account.

Description
So, I would like to design some more secure steps to this process (and it should be applicable to applications tokens):

  • 1 User can set some hooks like beforeTransfer to their account, and it'll be stored on-chain. The hooks may be a function of an application with arguments,
  • 2 When user transfer native tokens, the hooks in the beforeTransfer will be called recursively,
  • 3 In the application, we can do some security check for the action, e.g. call external service to validate 2-FA code

Thus we can have a more secure account management system. I don't think it's possible of this feature to be implemented with other blockchain. But it may be possible for Linera blockchain because Linera blockchain has some mechanism which let application be able to interact with external services.

@ma2bd ma2bd self-assigned this Dec 16, 2024
@ma2bd
Copy link
Contributor

ma2bd commented Dec 16, 2024

Thanks @kikakkz for the suggestion. We've been looking into (re)authenticating Web2 users together with a partner. Ideal solutions usually try to maintain some form of privacy (at least pseudonymity) and accountability (a super-majority of validators cannot silently impersonate a user).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants