Skip to content

Demo of institutional grade key management primitives for Substrate staking operations; utilizing multisigs, anonymous proxy accounts, and `Staking` + `CancelProxy` proxy filters.

License

Notifications You must be signed in to change notification settings

canontech/proxy-multisig-staking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

proxy-multisig-staking

Overview

Demo of institutional grade key management primitives for Substrate staking operations; utilizing multisigs, anonymous proxy accounts, and Staking + CancelProxy proxy filters. Features usage of the multisig and proxy Substrate FRAME pallets.

Run

In one terminal, start a substrate or polkadot --dev --tmp node. (We use --tmp because we need to purge the DB between demo runs.) If you compile from scratch it can take up to 30 minutes for the node to start.

git clone https://github.com/paritytech/polkadot.git
cd polkadot
cargo run -- --dev --tmp

In another terminal download this repository

git clone https://github.com/emostov/proxy-multisig-staking.git
cd proxy-multisig-staking

Install dependencies

yarn install

Run the demo

yarn start

Demo workflow

  • Eve create anonymous proxy, A, with herself as an Any proxy.
    • proxy.anonymous()
  • Eve adds 2/3 multisig, M, as time delayed Staking proxy to A.
    • proxy.proxy(proxy.addProxy)
  • Eve adds 1/3 multsig C, as a CancelProxy
    • proxy.proxy(proxy.addProxy) -M executes batchAll(staking.bond, staking.setKeys, batchAll(staking.bond, staking.setKeys, staking.validate)) on behalf of A
    • multisig.approveAsMulti(proxy.announce(batchAll(staking.bond, staking.setKeys, staking.validate)))
    • multisig.asMulti(proxy.announce(batchAll(staking.bond, staking.setKeys, staking.validate)))
    • Wait for announcement delay
    • proxy.proxyAnnounced(batchAll(staking.bond, staking.setKeys, staking.validate))
  • M is compromised and announces a unwanted proxy.announce(staking.validate), u, on behalf of A
    • proxy.announce(staking.validate)
  • Announcement watchdog witnesses an unexpected proxy announcement and alerts C composite members.
  • C member cancels u on behalf of A
    • multisig.asMultiThreshold1(proxy.rejectAnnouncement(u))

TODO

  • Design & build announcement watchdog

About

Demo of institutional grade key management primitives for Substrate staking operations; utilizing multisigs, anonymous proxy accounts, and `Staking` + `CancelProxy` proxy filters.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published