Skip to content

fathens/mpc_wallet

Repository files navigation

MPC Wallet

Distributed Key Wallet by MPC (Multi Party Computation) Like a multisig wallet, you can create 2of3 (for example) key. Unlike a multisig wallet, contract can not control your assets. The key is not stored anywhere, not known by anybody, It is stored distributedly.

This wallet support EVM(H160) and WASM(SS58) address. You can handle your assets in both VM, seamlessly.

Support devices

  • Chrome Extension
  • Mobile (Android / iOS)

Problem to be solved

Single key wallet (e.g. Metamask) is providing a simple solution. That is simple and good. But if you lost key, its assets will be lost. and if key is leaked, its assets also be leaked. Therefore you must store the key secretly, also cannot backup it easy storage.

MultiSig wallet by smart contract can reduce the risk of by key lost. But it is not handy. You can not login to Web3 site (e.g tofuNFT) by the contract wallet, .

In comparing by "HOT" or "COLD", a single key wallet is hot and a multisig wallet is cold.

MPC wallet is middle of these. not so simple such as a single key wallet, nor so hard such as a multisig wallet. It can reduce the risk of assets leak, and be used to login like the other single key wallets.

The worst problem with contract wallet is that the contract can not make signature of the address, because there is no private key of the address. MPC wallet can make it, even if it does not know private key of the address.

A key of MPC is generated by distributed devices which comes to be holder of "partial key" and they never know other "partial key" each other. Furthermore, even in the process of "partial key" working together to make signature, no completed private key is ever made anywhere. So, the "private key" never be known anybody, nor be stored anywhere.

You can have safety distributed keys like a multisig, and use it like a single key handy.

Usage situations

Single User Mode

Create “2 of 3” of

  • one Desktop
  • one Mobile Phone
  • one Tablet (or other mobile)

🔑 Usually use mobile phone to make complete signature in desktop.

🔑 If lost the mobile phone, use tablet to recover assets.

Collaboration Mode

Create “m of n”

🔑 Signature cannot be completed without the consent of more than one person.

Comparison with MultiSig contract wallet

pros

  • Address can correspond to signature, can be used to login.
  • Neither Contract nor App manage private key, so no worry about leaks due to bugs.
  • No need to wrap transaction.

cons

  • Partial keys cannot be replaced, so the address should be recreated in the case of incident.

Architecture

https://miro.com/app/board/uXjVO64pByQ=/?share_link_id=894793008867

Front End

Flutter + wasm

Back End

Firebase Cloud Messaging

wasm contract

References

Basic tech.

GG20

https://eprint.iacr.org/2020/540.pdf

Implementations of GG20

Rust

https://github.com/KZen-networks/multi-party-ecdsa

Go

https://github.com/coinbase/kryptology/tree/f7f15f217682f3e13b88846a419bce94bc3f7f73/pkg/tecdsa/gg20