Asset Manager

Overview

This document outlines the design for a hub-and-spoke asset management system that enables cross-network asset transfers with optional execution of additional logic. The system consists of a central Hub Asset Manager (in Solidity) and multiple Spoke Asset Managers that can be implemented in any language/platform.


Hub Asset Manager

System Design

Core Components

The hub asset manager maintains several key components:

  • Connection Module: Handles cross-chain message verification

  • Wallet Factory: Generates deterministic user wallets on the hub chain

  • Asset Tokens: Manages wrapped versions of spoke chain assets

  • Network Mappings: Maps spoke chain asset managers and their assets

State Variables

IConnection public connection;                    // Cross-chain messaging
IWalletFactory public walletFactory;             // User wallet management
address public assetImplementation;              // Asset token implementation
mapping(uint256 => bytes) public spokeAssetManager;  // Authorized spoke managers
mapping(uint256 => mapping(bytes => address)) public assets;  // Spoke assets to hub tokens

Transfer Data Structure

Core Operations

  1. Receiving Cross-Chain Transfers

  1. Initiating Cross-Chain Transfers


Spoke Asset Manager Specification

Required Implementation

Spoke chains must implement an asset manager that can:

  1. Receive and verify cross-chain messages from the hub

  2. Lock/unlock native assets

  3. Send properly formatted messages to the hub

  4. Enforce rate limits on withdrawals

Required Functions

  1. Receive Message

  1. Send Transfer

Security Considerations

  1. Hub Chain

  • Only authorized spoke managers can send messages

  • Asset tokens must be properly wrapped/unwrapped

  • Wallet hooks must be properly validated

  1. Spoke Chains

  • Must verify messages come from hub

  • Must properly lock/unlock native assets

  • Must implement proper access controls

  • Must enforce rate limits on withdrawals

  • Must use consistent function naming (recvMessage)

  1. Cross-Chain

  • Asset mappings must be carefully managed

  • Withdrawal limits must be properly configured and enforced

Last updated