Counterparty Risk

Introduction

Brahma Console is a comprehensive execution interface designed for sophisticated interaction with DeFi ecosystems across Ethereum and other EVM-compatible chains. It represents a leap forward in DeFi management and execution, particularly for institutions, DAOs, and advanced users seeking a blend of security, efficiency, and autonomy in their transactions.

Central to its value proposition is the full self-custodial nature of Console, ensuring that users retain complete control over their assets in their Safe Smart Wallets without compromising on functionality or security.

It introduces a multi-layered structure that includes Main Accounts, Sub-Accounts, and detailed transaction policies, all aimed at providing users with unparalleled control and flexibility over their DeFi operations.

Key Features:

  • Sub-Accounts: Users can create Sub-Accounts under the Main Console Account, enabling risk segregation and operational delegation. Each Sub-Account can be configured with unique roles, permissions, and transaction policies.

  • Transaction Policies: Detailed policies can be set to govern transactions, including restrictions on asset transfers to certain addresses or protocols, enhancing security and compliance.

  • Automation: Console supports automated routines for recurring transactions and risk management, allowing users to set up automatic responses to specific market events.

  • Security: Leveraging Safe's account abstraction and security features, Console ensures that users have a robust layer of protection for their assets, maintaining self-custody at all times.

Counterparty Risks and Mitigation

Counterparty risks in DeFi operations often stem from reliance on external entities for asset custody or access to keys/recovery execution. Brahma Console mitigates these risks through its design and architecture, with continuous user control and redundant access and execution, with self-custody.

Self-Custody

Users onboard to Console by setting up or importing a Safe wallet, over which they have sole ownership and signature rights. This approach ensures that users' assets remain under their control, protected by Safe's unmodified open source contracts, and not susceptible to counterparty risks associated with traditional custody solutions.

  • The created imported Safe is unmodified by Brahma and doesn’t run any custom code. Users can access it at any time on alternative frontends like Safe’s, or directly using contract interfaces.

  • Created SubAccounts are also individual Safes, owned on-chain by the Main Safe, and by derivation by the Main Safe owners. Sub-Accounts have a custom Transaction Guard installed on it on-chain, which can be removed anytime by the user with an on-chain transaction from the Safe UI/contracts (we have a decentralised IPFS-based tool to generate the required call-data to make it simple).

Decentralized Execution

Brahma Console's execution framework has no counterparty risk. The Console employs a relayer to route transactions, enhancing execution without ever taking custody of assets. Users can execute transactions across multiple accounts, leveraging auto-gas and RPC selection, with optimised handling to navigate gas fees and network congestion effectively.

Brahma never has co-signing or signing rights on any user's Console Safe or SubAccount. Brahma doesn’t generate or store user keys. Any transaction requires the Safe owners signature. Brahma simply provides the best UX for execution including batching, routing, relaying and automations.

Execution Flow:

  • The user connects any EOA that owns a Safe smart contract wallet, which can be created or imported on Brahma.

  • The user can connect to any dApp, or utilize an in-app feature, like in-app swap. When the user defines what action to execute, the transaction is shown and simulated with Tenderly, showing token changes, and estimated fee to the user. The user can then sign with their EOA wallet owning that Safe. The calldata they see and sign is to directly perform an action on the end protocol (Uniswap, AAVE, 1inch, with the relayer handling the gas payment and relaying on their behalf).

  • The "Safe wallet open source contract" performs a check on any transaction being executed from the wallet, ensuring the integrity and authorization of the transaction.

  • If the user doesn’t sign calldata for an execution, Brahma and its relayer cannot perform any operation on behalf of the user

Transaction Relaying

  • After a user's signatures are collected and meet the predefined threshold and verified by the Safe contract, the transaction is picked up by the Brahma Relayer for relaying with the most accurate parameters for efficient execution.

  • The transaction relaying process involves a Gas estimation, followed by the selection of an RPC ensuring the transaction is optimised for execution speed and quality.

  • The relayer, at its own expense, posts the transaction to the blockchain and collects the corresponding gas fee, in the same transaction.

Automated Execution

Automated transactions and strategies are executed within the boundaries set by the user, ensuring that automated operations do not introduce additional counterparty risk. Users pre-authorise specific actions, maintaining control over their execution parameters and retaining asset custody in their Safes.

  • A user can start an automation setup through the Brahma UI, which comprises a single transaction signature to perform a multitude of actions.

    • An Automation SubAccount is created, to segregate risk and granting it restricted automation approval. The SubAccount has the permission to pull the specific tokens and amount for the automation execution, and can only return it back to the Main Console.

    • Specific parameters are set for the automated transaction. This includes on-chain approval of tokens and amounts to the SubAccount and Executor, with additional parameters verified via a secure hash in the database.

    • A policy is created containing the parameters of the automations set by the user. The policy will automatically screen any transaction sent by the executor to ensure they conform with the user-signed parameters.

    • An "Assigned Executor" is indicated, which is currently Brahma, which in the future may be an Automation third party depending on the automation (Automation API launching in May).

    • The user can always modify or stop a running automation with a single on-chain transaction.

In the example of a TWAP automation, the funds stay on the Main Safe and are pulled by the Automation SubAccount and swapped and returned back to the Main Safe in the output token, all in 1 multi-call transaction. This severly reduces any risk as only the Automation SubAccount can pull those funds and its transaction is always automatically screened by the Policy on that SubAccount.

Continuous Access

A defining feature of Brahma Console is its commitment to ensuring users have continuous access to their assets. Even in the unlikely event of UI unavailability, users can access their Safe Wallets directly from alternative Safe Frontends or contracts, ensuring that they retain control and can manage their assets independently of the Console interface.

  • Even with running DeFi positions and the Brahma frontend unavailable, the users could always access the Main Safe and directly connect it to a dApp to manage positions.

  • SubAccounts have Policies installed on them, and are therefore only accessible from Brahma’s frontend for execution, but detaching this policy and resetting SubAccount Safe is a very easy process, which can be done in a single transaction for multiple SubAccounts from the independent Safe frontend. We even built a decentralized IPFS hosted tool to auto-generate the transaction calldata for the user, requiring no technical knowledge.

In conclusion, Brahma Console mitigates counterparty risks inherent in DeFi operations through its innovative architecture and self-custodial nature, ensuring users maintain control over their assets at all times. By integrating Sub-Accounts, detailed transaction policies, and automated execution within a secure framework, Console empowers users with the autonomy to manage their DeFi activities efficiently and securely. The continuous access feature further ensures that users can manage their assets independently, even in the absence of the Console interface, providing a robust solution to the counterparty risks typically associated with external custody and execution services in the DeFi ecosystem.

Last updated