⚠️ Switch is still in development and not ready to be used with live assets. Please proceed with caution.
Switch is a fully trustless wallet recovery service for Ethereum Externally Owned Accounts (EOA - your normal Ethereum address, not smart contract wallet), powered by storage proofs on StarkNet.
Unlike social recovery and other off-chain methods for wallet retrieval, Switch runs in an entirely trustless, non-custodial way. This allows users to build more fault tolerant wallet setups, while retaining the strong security guarantees of Ethereum.
Video presentation + demo: Link
Slides: Link
To recover user funds, Switch uses storage proofs (by Oiler Network) to recursively derive the past state of an EOA and determine whether an account has been lost. This works (broadly) as follows:
- The owner of an EOA delegates control of their funds to a
RecoveryContract
on L1. - Access details for EOA are lost.
- After a set period of inactivity (say 1 year), the user can call a
StorageProver
contract on StarkNet to verify that the nonce of the lost EOA has not changed over the period. If the test passes, the EOA is treated as lost and the L1RecoveryContract
is notified. - To recover their assets, the user pings the L1
RecoveryContract
to withdraw all delegated assets.
Switch is currently deployed for Ethereum L1 but can be ported to any other L1 blockchain which uses Patricia Merkle Trees.
Users can get started with Switch by interacting with the frontend application deployed at https://starknet-recovery-service.vercel.app/.
The project files for Switch currently include three repos:
recovery
, which contains the core smart contract logic for consuming storage proofs and handling L1 <> L2 messaging.recovery-front-end
, a frontend application for interacting with the deployed smart contracts (using either Argent or Braavos)recovery-web-hooks
, a server for interacting with and consuming data from the Fossil API.
Given that this methodology works for any blockchains that uses Patricia merkle trees (such as Solana, Avalanche, Fantom etc.), developers can build on top of our existing smart contracts or extend them to other Layer 1 blockchains via a cross-chain messaging protocol such as LayerZero.
Marcello Bardus for building Fossil and helping to integrate Switch with it.