Architecture

The Unlockd Wallet's architecture is designed to provide a secure and flexible framework for asset and signature delegation. It leverages the Gnosis Safe contracts as the foundation and extends their functionality. Let's explore the architecture in detail.

The following diagram illustrates the main contract interactions within the Unlockd Wallet ecosystem:

DelegationWalletFactory:

  • Deploys new instances of the Delegation Wallet components (GnosisSafe, DelegationOwner, GuardOwner, ProtocolOwner, TransactionGuard).

  • Registers the deployed wallet components in the DelegationWalletRegistry.


DelegationWalletRegistry:

  • Keeps track of all deployed Delegation Wallets and their associated components.

  • It provides functions to retrieve wallet information and component addresses.


GnosisSafe:

  • The core contract that holds assets and executes transactions.

  • Integrated with the Unlockd Wallet's delegation mechanisms.


DelegationOwner:

  • Manages asset and signature delegation.

  • Interacts with the TransactionGuard to enforce delegation rules.

  • Utilizes DelegationRecipes to determine allowed functions for asset collections.

  • Integrates with AllowedControllers to manage delegation and lock controllers.


GuardOwner:

  • Manages the setup and initialization of the TransactionGuard contract.

  • Deploys a new instance of the TransactionGuard contract using a beacon proxy.

  • Sets the TransactionGuard as the guard for the GnosisSafe contract.

  • Interacts with the TransactionGuard to perform guard-related operations.


ProtocolOwner:

  • Handles protocol-level functions and permissions.

  • Interacts with the TransactionGuard and DelegationOwner contracts.


TransactionGuard:

  • Enforces delegation and locking rules on transactions.

  • Validates transactions based on predefined conditions and allowances.

  • Interacts with the DelegationOwner, GuardOwner, and ProtocolOwner contracts.


DelegationRecipes:

  • Registers and manages allowed functions for specific asset collections.

  • Defines the rules and permissions for asset delegation.


AllowedControllers:

  • Manages the allowed delegation and lock controllers.

  • Determines which addresses are authorized to perform delegation and locking operations.


The Unlockd Wallet's architecture facilitates the following data flow:

Deployment:

  • The DelegationWalletFactory deploys new instances of the Delegation Wallet components.

  • The deployed components are registered in the DelegationWalletRegistry.


Asset Delegation:

  • The DelegationOwner contract manages asset delegation.

  • It interacts with the TransactionGuard to enforce delegation rules.

  • The DelegationRecipes contract defines the allowed functions for asset collections.


Signature Delegation:

  • The DelegationOwner contract also manages signature delegation.

  • It validates signatures against the delegated signing authority.


Transaction Execution:

  • Transactions are initiated through the GnosisSafe contract.

  • The TransactionGuard intercepts and validates transactions based on delegation and locking rules.

  • The DelegationOwner, GuardOwner, and ProtocolOwner contracts interact with the TransactionGuard to enforce specific rules and permissions.


Access Control:

  • The AllowedControllers contract manages the allowed delegation and lock controllers.

  • It determines which addresses are authorized to perform delegation and locking operations.

Last updated