What is a blockchain wallet

The blockchain wallet (hereinafter referred to as the wallet) is the user's entrance to the blockchain and the user's pass in the Web3 world.

Wallets usually include the following functions:

Create a blockchain account

Since the process of creating a blockchain account is relatively complicated, the existence of wallets can help users simplify these processes. Generally, after creating an account, the wallet will guide the user to back up the private key or mnemonic phrase, and then perform a secondary verification to ensure that the private key or mnemonic phrase backed up by the user is accurate.

Managing blockchain assets

The existence of wallets greatly facilitates users to manage their assets, including transfers, collections, viewing asset details, transaction details, etc. The functions are similar to bank apps, where you can see what assets you currently own, how much, and transfer your assets.

Explore the blockchain ecosystem

Currently, some public chain designs will encourage users in the ecosystem to actively participate in the construction of the public chain ecosystem. The main forms include node voting, referendum, staking, etc., all of which can be participated in through wallets.

In addition, some large DApp applications exist in the form of third-party independent apps. When experiencing these DApps in the form of apps, wallets are also required as a medium for login and transaction authorization.

trade

Some wallets also support cryptocurrency trading services such as coin-to-coin exchange, exchange trading, and OTC trading. OTC (Over The Counter) trading is a point-to-point transaction outside the exchange and guaranteed by a third party. It is currently the main way of one-to-one trading between fiat currency and cryptocurrency assets.

other

Since wallets naturally have financial attributes, some wallets will integrate a variety of financial tools and functions including mining pools, financial management, mining, project investment, etc., which can meet the needs of users for asset appreciation.

Compare with Alipay

For users who are new to blockchain, we can first compare blockchain wallets to "Alipay" from a non-strictly defined perspective.

Similarities with Alipay:

  • Can manage assets, make payments, transfers, view assets, etc.

  • Can manage identities and authorize login to access third-party apps or websites

Differences from Alipay:

  • Alipay is a centralized product controlled by Ant Group, while blockchain wallets are native to decentralized blockchains and are almost impossible to be controlled by humans.

  • Creating an Alipay account requires an ID card and mobile phone information, which can be retrieved if lost. Blockchain wallet accounts are anonymous and almost impossible to retrieve if lost.

  • The assets managed by Alipay are recorded in legal currency, and there are in-depth laws to protect the user's "ownership". The assets managed by blockchain wallets truly belong to the user.

Wallet development and challenges

When Bitcoin was first created, wallets were very simple and even required several days of synchronization to download the entire Bitcoin ledger before they could be run. At that time, only a few geeks could use wallets on their computers. The following picture shows the world's first Bitcoin wallet designed by Satoshi Nakamoto, the founder of Bitcoin:

With the development of Bitcoin, on June 29, 2011, Bitcoin payment processor BitPay launched the first Bitcoin electronic wallet for smartphones. This was a historic step for wallets to reach ordinary users, but its main feature was that it could only store Bitcoin.

In November 2013, nearly five years after the birth of the Bitcoin Genesis Block, the Ethereum white paper was released, heralding the entry of blockchain into the 2.0 era. Smart contracts began to be used in blockchain. In addition to transferring and receiving payments, wallets at this time can also perform on-chain contract operations.

In 2018, the word DeFi was first proposed on Telegram. With the launch of protocols such as Compound, Uniswap, and DAI, the Ethereum ecosystem began to flourish. After the outbreak of yield farming and aggregators in the summer of 2020, trading activities increased significantly, DeFi yield farming became popular, the number of blockchain wallet users exceeded 50 million, and blockchain wallets entered a period of rapid expansion.

From 2021 to date, with the narrative of cross-chain and Layer2, blockchain wallets have become a popular choice for people to store assets and conduct transactions. At the same time, supporting cross-chain assets has also become one of the key considerations for users when choosing wallets.

At the Devcon 6 conference held in Bogota in 2022, Tomasz Tunguz mentioned some statistics about Web3: the cumulative DAU of major public chains is about 2.5 million, while the DAU of traditional Internet is 5 billion, and the former barely reaches 0.05% of the latter. From the supply side, there are about 16,000 developers developing in Web3, while the total number of developers in the world has reached 27 million, and Web3 developers account for less than 0.06%. Therefore, Web3 is still a long way from large-scale adoption.

As the entrance to Web3, the first challenge for large-scale adoption of wallets is to solve the problem of "private key custody".

In the blockchain world, private keys control everything, and there is a consensus in the industry: "Not Your Keys, Not Your Coins."

Decentralized wallets use mnemonics and hierarchical deterministic (HD) structures to derive private keys and self-custody, which seems to mean that decentralized wallets should be the best practice for managing crypto assets. According to a report released by Finbold, there are 295 million cryptocurrency wallet users on global exchanges, and only 81 million decentralized wallet users, accounting for 21.5%.

It is naturally unsafe to entrust private keys to centralized exchanges. The collapse of FTX in November 2022 is the latest in a long list of exchange security incidents. However, a large number of users are still willing to take custody risks in exchange for lower costs and ease of use. Because for the vast majority of users, although they can independently manage their assets by mastering private keys without handing over assets and data to others, the custody of private keys has become a major problem. I believe that many people have the experience of writing mnemonics on paper.

According to OKLink statistics, in 2022, the largest loss of digital assets caused by private key leakage and loss was as high as US$930 million, accounting for about 40% of the total loss. In the blockchain world, once the private key is lost or stolen, it means permanent loss of assets, which is unbearable for ordinary users.

In order to solve the "private key custody" problem, wallet manufacturers are exploring private keyless wallets and social recovery, and smart contract wallets are one of the mainstream solutions.

Smart Contract Wallet

Ethereum account types are divided into external accounts (Externally Owned Account, EOA) and contract accounts (Contract Account, CA).

A smart contract wallet is a contract account that behaves like a wallet, i.e., a smart contract that allows users to manage assets and interact with DApps. Unlike external account wallets, smart contract wallets do not have private keys, only addresses. Therefore, smart contract wallets cannot actively initiate transactions, but only execute transactions according to the written code after being triggered. And smart contracts need to be deployed on the chain, so the creation of smart wallets requires initial costs.

The multi-signature wallet we often talk about is a type of smart contract wallet, which requires the signature of M-of-N keys to execute transactions.

In a multi-signature wallet, each entity holds its own private key. Executing transactions requires multiple entities to pass the verification of the wallet contract. The contract generally also provides a recovery option. The majority of entities can vote to change the authorized key set, which can effectively solve the problem of the private keys of a few entities being stolen or lost.

Multi-signature wallets are widely used by DeFi protocols and DAOs, but they are not a technical path for wallets to be universal and popular. After all, ordinary users are already accustomed to Web2 payments and accounts, such as biometric payments and social account recovery.

To realize such powerful functions in the Web3 world, it is necessary to introduce the concept of "account abstraction".

In computer science, "abstraction" means extracting relevant parts from a larger piece, splitting something into smaller parts.

In Ethereum, account abstraction refers to the splitting of transaction verification and transaction execution from a monolithic process into modular components that can be adjusted to the user's individual needs.

The core goal of account abstraction is to enable smart contracts to serve as the initiating account for transactions, allowing users to customize the security model and operation model of their accounts, and completely eliminating the need for external accounts. Because external accounts are tightly coupled with key pairs, they are essentially the same thing, and it is impossible to program with custom code to authorize transactions and unlock the user experience.

In the article "Three Transformations of Ethereum", Vitalik Buterin mentioned that if not everyone can migrate to smart contract wallets, Ethereum will fail.

Therefore, account abstraction is of great significance to Ethereum. Once it is truly implemented, new applications, gameplay, and imagination space may be born in Web3.

Account Abstraction

Since Ethereum was launched in 2015, the discussion on account abstraction has never stopped. The latest ERC-4337 was proposed by Vitalik Buterin and others.

Introduced UserOperation, a special transaction that represents user intent and allows contract accounts to actively perform operations. These UserOperations are managed by a role called Bundler, which simulates executing UserOperations and adds valid operations to a special transaction pool. The EntryPoint contract then verifies and executes these UserOperations to fulfill user intent.

The biggest advantage of ERC-4337 is that it does not require modifications at the consensus protocol level, because this does not require a hard fork.

The verification and transaction process is separated into two smart contracts: EntryPoint contract and Wallet contract. The EntryPoint contract acts as a coordinator and interacts with the Wallet contract. The Wallet contract handles the user's transaction verification based on custom logic. If the Wallet contract successfully verifies a transaction, the EntryPoint contract executes the transaction and submits it to the next block.

This abstraction gives developers and users the freedom to program anything they want into a custom wallet contract as a requirement for a transaction to be valid. For example, a wallet contract could use multi-signatures, social recovery functions, or even quantum-resistant signature schemes.

ERC-6551 is a proposal by the Future Primitive team to connect non-fungible tokens (NFTs) to smart contract wallets in a new way, which can achieve more control and flexibility over assets. The protocol is called "Token bound accounts" and allows each NFT to have its own wallet address.

ERC-6551 is not an account abstraction, nor is it a new token standard. But smart contract wallets can be combined to significantly enhance the functionality of NFTs, making them more practical than ever, such as enabling NFT composability, on-chain reputation, game character inventory, etc.

In principle, NFT holders create smart contract wallets by interacting with the Registry contract. The Registry contract is immutable, permissionless, and has no owner. It deploys a unique, deterministically addressed smart contract wallet for each NFT, and its control is only owned by the NFT holder. When the ownership of the NFT is transferred, the control of the account is also transferred.

With the latest ERC-4337 proposal and ERC-6551 proposal becoming the industry's trendsetter, the industry is experiencing rapid development in 2023, as shown in the following figure:

EIP-3074 is another proposal that has received widespread support from the Ethereum community and has been formally included in the next Ethereum hard fork.

EIP-3074 was proposed by Ethereum researcher Sam Wilson, Go Ethereum developer Matt Garnett and others. Its core is to allow any EOA account to operate like a smart contract wallet, without the need to deploy additional contracts or manual migration.

EIP-3074 introduces two new Ethereum virtual machine instructions: AUTH and AUTHCALL, which enable EOA to connect to a smart contract and give control of the transaction to the smart contract.

  • AUTH: Used to verify a signature and set a context variable "authorized". If the signature is valid and the signer address matches the given authorized address, "authorized" is set to the authorized address. The AUTH instruction allows a smart contract to perform operations on behalf of an EOA, thereby implementing authorization delegation;

  • AUTHCALL: Similar to the existing CALL instruction, it is used to perform an external call. The difference is that AUTHCALL will use the authorized address previously set by the AUTH instruction as the caller address. This means that AUTHCALL will use the authorized EOA as the sender, not the contract itself.

EIP-3074 needs to be implemented through an Ethereum hard fork. Its main goal is to give EOA functions similar to smart contracts and delegate the control of EOA to smart contracts. However, since the account itself is EOA, if the key is stolen or lost, it means a complete loss of control.

EIP-7702 was released by Vitalik on May 7 this year as an alternative to EIP-3074. EIP-7702 allows EOA to temporarily adopt the functions of smart contracts during the transaction process. EOA can convert EOA into a smart contract wallet during the execution of a single transaction and restore it to the normal state after the transaction is completed.

EIP-7702 introduces a new transaction type containing a "contract_code" parameter and a signature. During the transaction, the signed EOA account is temporarily converted into a smart contract wallet, thereby achieving functionality equivalent to EIP-3074.

EIP-7702 does not introduce new opcodes, so no hard fork is required. The main goal is to make EIP-3074 leaner and more compatible with EIP-4337, as the introduced "contract_code" parameter can be an existing EIP-4337 wallet code, and through an additional EIP (EIP-5003), EOA accounts can also be permanently upgraded to smart contract wallets.

In the account abstraction finale, all accounts on Ethereum use smart contract wallets to manage assets and transactions, and no longer rely on traditional EOA accounts.

The current cutting-edge research on account abstraction is as follows:

Social Recovery

Social recovery refers to a mechanism that uses social relationships to help users regain access to their accounts if they lose their keys, such as using email to reset the password of a smart contract wallet.

Users using social recovery functions usually need to set up guardians during or after the wallet creation process and meet a certain guardian verification threshold, such as 2 out of 3 guardians, to log in or restore the wallet. This process is often referred to as multi-factor authentication.

Social recovery is currently a popular research direction in account abstraction. Wallets that have implemented social recovery include Argent Wallet, Loopring Wallet and UniPass.

Intent to trade

An intent is a set of signed declarative constraints that allow users to outsource transaction creation to a third party without giving up full control over the transaction. In simple terms, if a transaction specifies "how" to perform an operation, then an intent defines "what is the expected result" of that operation.

Intent transactions use the wallet client as the intent layer, allowing users to express their intent and complete the process from intent to UserOperation.

At present, there are only some experimental projects in intention trading. Whether it is natural language input of intention, or decomposing goals, calculating the optimal path and executing operations, AI can play its advantages. It is expected to become one of the scenarios where blockchain combines AI.

Device Account

Device Account (DA) is a technology that uses the hardware security module on modern computing devices (such as PCs, mobile phones, tablets, etc.) on the user side to manage user keys and wallet accounts.

Device accounts rely on password-free authentication technology Passkey/WebAuthn, which is more convenient and secure than traditional authentication methods:

  • Protected by the device they are saved on, using biometrics as an extra layer of security, without the need for passwords;

  • It can be seamlessly synchronized between multiple devices such as mobile phones and computers via Airdrop/Bluetooth, solving the single point of failure;

  • You can log in securely across devices, scan the QR code with your phone, and then log in to the web page through biometric recognition, improving the user experience.

Summarize

As one of the essential tools for crypto market participants, wallets play a very important role in the infrastructure field. In the future, the importance of wallet entrances will surpass that of trading platforms and become a hub for Web3 traffic and one of the infrastructures of the Metaverse.

While supporting payment and transfer, all DApps are integrated into the wallet. Project developers and users can gather in large numbers to form a new generation of Internet ecosystem based on blockchain technology. In this ecosystem, all online operations of users can be performed through the wallet, including social networking, short video browsing, shopping, ordering food, taking taxis, and traveling. The wallet will truly become the "Alipay" in Web3.