Brahma - xiao's results

Brahma Console is a custody and DeFi execution environment.

General Information

Platform: Code4rena

Start Date: 13/10/2023

Pot Size: $31,250 USDC

Total HM: 4

Participants: 51

Period: 7 days

Judge: 0xsomeone

Id: 295

League: ETH

Brahma

Findings Distribution

Researcher Performance

Rank: 40/51

Findings: 1

Award: $14.47

Analysis:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

14.466 USDC - $14.47

Labels

analysis-advanced
grade-b
sufficient quality report
A-08

External Links

🕵️‍♀️ Analysis - Brahma

Summary

ListHeadDetails
a)The approach I followed when reviewing the codeStages in my code review and analysis
b)Analysis of the code baseWhat is unique? How are the existing patterns used?
c)Test analysisTest scope of the project and quality of tests
d)Centralization risksHow was the risk of centralization handled in the project, what could be alternatives?
e)Systemic risksPotential systemic risks in the project
f)Competition analysisWhat are similar projects?
g)Security Approach of the ProjectAudit approach of the Project
h)Other Audit Reports and Automated FindingsWhat are the previous Audit reports and their analysis

a) The approach I followed when reviewing the code

Determine the scope of code audit: https://github.com/code-423n4/2023-10-brahma

NumberStageDetailsInformation
1Compile and Run TestInstallationTest and installation structure is simple, cleanly designed
2Architecture Reviewhttps://docs.brahma.fi/product/brahma-consoleUnderstand the functions of each module
3Graphical AnalysisGraphical Analysis with vscode-solidity-auditorSolidity language support and visual security auditor for Visual Studio Code
4Test SuitsTestsIn this section, the scope and content of the tests of the project are analyzed.
5Code ReviewScopeTop-down analysis of codes according to architectural design, IDE used: VsCode
6What Is Brahma?Brahma
7InfographicExcalidrawI made Visual drawings to understand the hard-to-understand mechanisms

b) Analysis of the code base

Analysis

c) Test analysis

Fork 2023-10-brahma/contracts/

NumberHeadTest Details
1)AddressProviderGovernance replacement, setting and obtaining addresses, and handling of various error situations
2)AddressProviderServiceOther contracts can easily resolve the addresses of other services through the "AddressProvider" and include the necessary error handling and permission checking mechanisms.
3)ConsoleFallbackHandlerHandles signature verification and execution operations
4)ConsoleOpBuilderThis contract is designed to generate bytecode for multiple operations in order to perform those operations in the Brahma Console account
5)ConstantsProvides a centralized place to manage and reuse constants for multiple contracts
6)ExecutorPluginAllows executors with module permissions to execute transactions and provides a mechanism to verify the legitimacy of execution requests
7)PolicyValidatorVerify policy signatures for secure contract transactions, ensuring that only verified signatures can execute transactions, thereby increasing security
8)SafeDeployerManage and create Brahma Console accounts and sub-accounts and ensure their initial setup
9)SafeEnablerProvides a way to initialize and configure Gnosis Safe's modules and daemons, allowing certain checks to be bypassed during initialization for setup
10)SafeModeratorThe "SafeModerator" contract acts as a guard for Safe accounts, validating transactions and ensuring they comply with policy requirements
11)SafeModeratorOverridableAct as a guardian for Safe accounts, validating transactions and ensuring they comply with policy requirements. But unlike "SafeModerator", it allows rewriting by removing guards
12)ExecutorRegistryIt allows the owner of a sub-account to register and unregister executors and provides functionality to check if a specific executor has been registered as an executor for the sub-account
13)PolicyRegistryThe "PolicyRegistry" contract allows different roles to update an account's policy submission based on a set of conditions.
14)WalletRegistryThe "WalletRegistry" contract is used to manage and track the relationship between wallets and their subaccounts, as well as record which addresses are marked as wallets

d) Centralization risks

Users cannot provide their own main wallet to call the function of registering a sub-wallet, and can only be assigned by the project party. This is a centralization risk. https://github.com/code-423n4/2023-10-brahma/blob/main/contracts/src/core/registries/WalletRegistry.sol#L50C91-L50C91

In the same way, ExecutorRegistry.sol and PolicyRegistry.sol are also affected

e) Systemic risks

Pay attention to version issues when deploying on some l2 chains https://docs.arbitrum.io/solidity-support

f) Competition analysis

Beacon

g) Security Approach of the Project

It must be ensured that the project party does not interfere with the operation of the project, so that it will be safer. The control of this type of smart contract project is more centralized, because the deployment of the contract and the setting of key parameters are usually performed by the owner or administrator of the project. The project owner or administrator has the authority to upgrade, maintain, and modify the contract.

h)Other Audit Reports

Automated Findings: https://github.com/code-423n4/2023-10-brahma/blob/main/bot-report.md

Other Audit Reports: https://github.com/Brahma-fi/brahma-security/tree/master/audits

Time spent

37 hours

Time spent:

37 hours

#0 - c4-pre-sort

2023-10-22T21:11:40Z

raymondfam marked the issue as sufficient quality report

#1 - c4-judge

2023-10-27T13:41:38Z

alex-ppg marked the issue as grade-b

#2 - alex-ppg

2023-10-27T13:41:41Z

Very brief, lists an incorrect competitor, and does not contain any statements that indicate an in-depth understanding of the Brahma system. Borderline B rating.

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter