The problem Civia-prototype solves
We develop a wallet prototype with social recovery and social graph based on the account abstraction support from Starkware and wallet functions baseline code from Argentx.
Wallets are possibly the most frequently used Web3 infrastructure apps. We design Civia so that the wallet can be used for social purposes in addition to crypto asset transactions. In Civia, users get invited by friends to install the app and setup their real-life friends as guardians for the social recovery. Users can also follow friends and browse their wallets. These activities create users' social graph on-chain.
The real-person based social recovery process is more secure and reliable than traditional wallets. On-chain non-transferable data locked in a wallet contract address such as SBTs and user social graph data can be recovered if the wallet gets lost. In fact, the users own these data and can take them anywhere when they login to DApps with their Civia wallet address.
Video links of the Civia prototype demo:
- Account creation
- Follow friends
- Add guardians
- Social recovery
- Civia demo full
- Demo videos on the Civia website
Challenges I ran into
- We have to design a secure and reliable social recovery workflow which is the key to the prototype. Please find the workflow diagrams on the Civia website.
- To implement user following relations, we represent the one-way following with a SBT issued by the followed user account to the following user account. This relation is preserved on-chain and won't get lost with our account social recovery.
- Smart contract wallets need account abstraction functions to process user operations. While these functions are not supported by Ethereum mainnet, and EIP-4337 implementations are not quite ready, we found the built-in support of account abstraction in Starknet infrastructures, and use them for this prototype.
- We also borrowed the opensource codebase from Argentx for the implementation of the basic smart contract wallet account and transaction functions.
- In a fresh account initial ETH deposit is needed for gas payments in account and guardian setup. This can be done by the user himself or by the guardian in account social recovery. For the convenience of the prototype, we pay the initial ETH from a centralized server to each new account.