Skip to content
This repository has been archived by the owner on Nov 5, 2023. It is now read-only.

Add recovery to extension #281

Closed
voltrevo opened this issue Jul 20, 2022 · 4 comments
Closed

Add recovery to extension #281

voltrevo opened this issue Jul 20, 2022 · 4 comments
Assignees

Comments

@voltrevo
Copy link
Collaborator

voltrevo commented Jul 20, 2022

Using this mechanism:
https://github.com/web3well/bls-wallet/blob/main/contracts/contracts/VerificationGateway.sol#L196

Let users know that multisig may be a good combo when doing this.

Probably some overlap with:
#220

@kautukkundan
Copy link
Contributor

related #220

@blakecduncan
Copy link
Contributor

I caught up with James on this ticket and will explain the expected UX below

In the Instant wallet

  • The users sets the recovery hash using an address in the Quill extension (ex: wallet 0) and arbitrary salt
  • After the hash is set the user can click to copy the salt and the Instant wallet smart contract address. These can then be used in the quill extension to recover the wallet

In the quill extension

  • The user must input the salt and the smart contract address from above
  • We will use the smart contract address to look up the bls key hash (this is the hash of the instant wallet) and the quill extension will generate a new bls key. With the hash, salt, new bls key and signature from the existing wallet (ex: wallet 0) in the quill extension we can call the recoverWallet function

@jzaki just want to confirm this is correct?
Also, FYI @kautukkundan

@jzaki
Copy link
Collaborator

jzaki commented Sep 6, 2022

To nest it a little more:

  1. User installs quill extension (eg first-time web3 users upgrading their instant wallet to a more secure one)
  • first bls wallet address in quill to be used as recovery address
  • this must be funded with some eth to recover the instant wallet
  1. In the Instant wallet
  • The user sets the recovery hash using an address in the Quill extension (ex: wallet 0) and arbitrary salt
  • After the hash is set (regular transaction toast) the user can click a button in the recovery menu to copy the salt and the Instant wallet smart contract address (convenience for recovery params)
  • These can then be used in the quill extension to recover the wallet
  1. In the quill extension
  • Instead of "add" wallet, user clicks button to "recover a wallet" a bls wallet
  • The user must input (just paste?) the salt and the smart contract address copied from above
  • On user confirmation, the extension will:
    • use the smart contract address to look up the bls key hash (param2) (this is the hash of the instant wallet's bls key)
    • generate a new bls key to replace that of the instant wallet (param 4)
    • sign the instant wallet address with the new bls key (signatures is param 1)
    • With the 4 params: signature, hash, salt (param 3), and new bls key; call recoverWallet from wallet 0
      • (ie create the transaction, sign with wallet 0's bls key, then submit signed tx to aggregator)

@blakecduncan blakecduncan moved this from 📤 Up Next (Current Sprint) to 🛠 In Progress in Wallet Account eXperiments (WAX) Sep 9, 2022
@blakecduncan blakecduncan mentioned this issue Sep 20, 2022
2 tasks
@blakecduncan blakecduncan moved this from 🛠 In Progress to 🧐 In review in Wallet Account eXperiments (WAX) Oct 26, 2022
@jacque006
Copy link
Collaborator

Resolved via #342

Repository owner moved this from 🧐 In review to 🤝 Done in Wallet Account eXperiments (WAX) Dec 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Development

No branches or pull requests

5 participants