background
logo

Security Audit Report for AlphaX-Protocol's AlphaX-Protocol-Contract-Tron

DESCRIPTION

The target of this audit is the code repository of AlphaX-Protocol-Contract-Tron of AlphaX-Protocol. This project is a TRON-based custody vault and gasless transfer system. The contract DEXVaultV1 is an upgradeable custody vault that allows users to deposit assets and permits withdrawals when predefined risk controls are satisfied. The gasless wallet layer consists of the contract GasFreeController, the contract GasFreeAccount, and the contract GasFreeFactory. Users can store funds in their own GasFreeAccount contracts, sign transactions off-chain, and rely on a relayer to pay for transaction costs during execution. The contract GasFreeController handles EIP-712-based permit execution, while the contract GasFreeFactory deploys deterministic accounts through CREATE2. Note that for contract DEXVaultV1, we only audit its compatibility with Tron.

Please refer to the report for the detailed audit scope.

Our audit methodology employs automated vulnerability scans, manual verification, and business logic analysis to uncover potential security issues coupled with gas and code quality optimization recommendations.

In summary, we did not find any critical issues within the audited codebase. However, we have identified some non-critical issues that should be addressed. Additionally, we have put forth recommendations and notes that should be taken into consideration. It is important to note that the scope of our audit was strictly limited to the specific code versions mentioned in the report. Any updates made subsequent to our review would require a re-evaluation.

KEY FINDINGS

In total, we find 6 potential issues in the smart contract. We also have 5 recommendations and 11 notes, as follows:

High Risk: 0
Medium Risk: 2
Low Risk: 4
Recommendation: 5
Note: 11
ID Severity Description Status
1 Medium Lack of verification for permit.gasFreeAddress Fixed
2 Medium Lack of critical signature field Fixed
3 Low Lack of TRC20 transfer result handling in withdrawERC20() Confirmed
4 Low Lack of whitelist check in the function depositETH() Confirmed
5 Low Improper owner attribution in withdrawal events Fixed
6 Low Lack of constructor parameters in getGasFreeAccountCreationCodeHash() Confirmed
7 - Return the prefixed hash from function calcSigHash() Confirmed
8 - Use consistent TRON native asset naming and unit semantics Confirmed
9 - Add _disableInitializers() in the function constructor() Confirmed
10 - Remove redundant code Confirmed
11 - Adopt two-step transferOwnership() ownership handover Confirmed
12 - TRC-10 asset compatibility -
13 - TRON address format conversion -
14 - Predicted CREATE2 addresses depend on the variable controller -
15 - Assumption of supported token -
16 - TRON typed-data signing depends on address normalization -
17 - Potential centralization risks -
18 - Centralized delay mechanism -
19 - Permanent controller binding for accounts -
20 - Ensure the correct declaration of permit.firstTime -
21 - Ethereum-style signing prefix and naming on TRON -
22 - Asymmetric gasless support between TRX and TRC20 -

More details are provided in the audit report.

Take the first step towards a secure future

Reach out now for BlockSec's expert code audit services, elevate the security of your protocol before it goes live!

Security Audit Report for AlphaX-Protocol's AlphaX-Protocol-Contract-Tron - BlockSec