New Wallet Design

New Wallet Design

The smart contract wallet allows the user’s own account to have state and code, bringing programmability to the wallet. We think there are more directions to expand. For example, token asset management, functional expansion of token transactions, etc.

It aims to achieve the following goals:

  1. Assets are allocated and managed by the wallet itself, such as approve and allowance, which are configured by the user’s contract wallet, rather than controlled by the token asset contract, to avoid some existing ERC-20 contract risks.

  2. Add the transferFungibleToken function, the transaction initiated by the non-smart wallet itself or will verify the allowance amount

  3. Users can choose batch approve and batch transfer. Batch approve can greatly reduce gas. The contract wallet itself manages the authorization status of all assets, and batch approve can be performed without calling multiple asset contracts.

  4. Users can choose to add hook function before and after their transferFungibleToken to increase the user’s more playability

  5. The user can choose to implement the receive hook

Use the sequence diagram to compare the difference between using this interface to transfer tokens.

Alice calls the transfer herself

The user call the transaction sequence diagram now(transfer).

The user use new paradigm to call the transaction sequence diagram, dotted lines are optional.

Alice doesn’t call the transfer herself

Sequence diagram of third party calling user transaction now(transferForm).

Sequence diagram of third party calling user transaction use new paradigm.(transferFungibleToken).

The third party uses new paradigm and is compatible with the old dapp protocol and EOA to call the user transaction sequence diagram(transferForm).

Last updated