Capsule’s multi-app architecture is designed to allow users to access the same wallet across different applications while maintaining robust security measures. This document outlines how Capsule implements this feature and the benefits it provides to both users and developers.

Overview

In the crypto ecosystem, users often need to access the same wallet across various applications. However, this convenience can pose security risks if not managed properly. Capsule’s multi-app architecture addresses these challenges by implementing a sophisticated permissions scheme that balances accessibility with security.

Key Components

Shared Wallet Access

Enables users to access their Capsule wallet across multiple applications.

Permissions Scheme

Specifies what types of transactions an application can perform and which ones require user approval.

Encrypted Device Key

The user’s device key is encrypted specifically for each application.

App Public Key

Each application has its own public key added to Capsule’s allow-list.

How It Works

1

Account Creation

When a user creates an account or connects to a new app, they’re presented with the option to use an existing wallet or create a new one.

2

Permission Setup

Users are shown the set of permissions the new app will require. They can review and approve these permissions.

3

Key Encryption

The client encrypts the private key (k1) with the new app’s key and sends it, along with the app’s public key, to Capsule.

4

Authorization

This process includes a signature generated using the portal enclave key for authorization purposes.

5

Allow-list Addition

Capsule adds the new app’s public key to its allow-list, granting the necessary permissions to interact with the wallet.

6

Key Retrieval

Upon returning to the application, the client requests the account from Capsule to receive the encrypted k1 private key and the account public key.

7

Key Decryption

The client decrypts the k1 key using the enclave-based app key and securely stores the k1 private key in the KeyChain.

Security Features

Benefits

For Users

Convenience

Access the same wallet across multiple applications without manual key imports.

Security

Maintain control over which applications can access the wallet and what actions they can perform.

Transparency

Clear visibility into what permissions each application has been granted.

For Developers

Simplified Integration

Easy-to-implement SDK for adding Capsule wallet support to applications.

Increased User Trust

The transparent permissions system can increase user confidence in the application.

Flexibility

Ability to request specific permissions based on the application’s needs.

Example Use Cases

  1. DeFi Dashboard: An app that aggregates data from multiple DeFi protocols could request read-only permissions across various chains.

  2. NFT Marketplace: Could request permissions specifically for NFT-related transactions on relevant chains.

  3. Cross-Chain DEX: Might request permissions for swap transactions across multiple chains.

Future Enhancements

Capsule is continuously working on improving its multi-app architecture. Future enhancements may include:

  • More granular permission controls
  • Improved user interfaces for managing permissions across apps
  • Integration with decentralized identity solutions for enhanced privacy

By leveraging this multi-app architecture, Capsule provides a secure and user-friendly way for users to use their wallets across various applications in the crypto ecosystem, while giving developers the tools to create seamless, secure experiences for their users.