attestantio / dirk

Apache License 2.0
75 stars 22 forks source link

[Feature Request] Shard an existing key into multiple shares #30

Closed ThomasDalla closed 1 year ago

ThomasDalla commented 1 year ago

Distributed validator technology (DVT) solutions such as SSV and Obol offer the possibility to shard an existing key (an account from an hd wallet) into multiple shares (that they then distribute amongst different "operators"). The outcome is similar to a distributed wallet in Dirk, but comes with a lot more custom infrastructure to adopt (SSV token for example).

Having a similar feature for Dirk would leverage Dirk's slashing protection to offer similar benefits to the native distributed wallet, but on "standard" hd wallets.

It could greatly increase Vouch/Dirk's adoption as:

  1. we could migrate existing validators to such "sharded" account in Dirk to gain security/protection while remaining the sole "operator", without the whole infrastructure requirements that come with full-fledge solutions such as SSV/Obol
  2. unlike a distributed wallet that only Dirk supports so far (ie, Dirk's lock-in), a "standard" wallet can be easily ported to other solutions so there is less reluctance to adopt it (knowing we could easily change if unhappy)

See https://github.com/attestantio/vouch/issues/97 for the discussion that led to this feature request.

ThomasDalla commented 1 year ago

Nimbus is also offering a similar solution (not production ready) to split a keystore and store shares in separate instances of web3signer: https://github.com/status-im/nimbus-eth2/blob/b564ddd2f95f68f53692482199a2abaa5963376e/docs/the_nimbus_book/src/web3-signer.md#distributed-keystores

ThomasDalla commented 1 year ago

Also worth mentioning that most liquidity staking providers (such as RocketPool) only support hd wallets. Being able to shard these keys would make it possible to stake on these liquidity staking providers with Vouch and a distributed Dirk wallet.

ybstaked commented 1 year ago

Very interested in this feature being available!

selfuryon commented 1 year ago

We are going to release our app for splitting keys to shards and combining shards to keys in 1–2 weeks, which we use internally for exactly that task. I can write a message here when it will be ready

ybstaked commented 1 year ago

Any updates @selfuryon?

selfuryon commented 1 year ago

@ybstaked soon, maybe additional 1-2 weeks, it works, but need to make some cosmetic stuff for public release :)

ybstaked commented 1 year ago

Thanks for the update! Interested to compare it with charon

skynnes commented 1 year ago

Any Updates on this @selfuryon?

poupas commented 1 year ago

I've built a thing as a proof of concept and used it to split a Rocket Pool validator key and load the shares into Dirk distributed wallets on Prater/Goerli. It's in the "works for me" stage; I haven't used it for anything serious :) https://github.com/poupas/ethdont

selfuryon commented 1 year ago

We almost made that, and you can check it here: https://github.com/p2p-org/dkc. We called it DKC: dirk key converter. In several days, we also add a possibility to convert directly from/to keystores.

Now you can convert ND Wallets and Distributed Wallets in both direction.

mcdee commented 1 year ago

As this is now covered by a third party tool I'll close this issue. Thanks.

ThomasDalla commented 1 year ago

These third party tools are rather experimental. Is there any recommended one to split keys from a hd wallet into a distributed wallet?

poupas commented 1 year ago

As the author of ethdont, I would recommend dkc.

Not because I believe that there's anything wrong or dangerous with ethdont, it's just that dkc has a team behind it, and it's more likely you'll get timely support if you ever need it.

ethdont is a proof-of-concept created to explore splitting keys into shares.