background
logo

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

專案簡介

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.

關鍵發現

我們在該智能合約中共發現 6 個潛在問題,另有 5 條建議與 11 條說明,明細如下:

高風險:0
中風險:2
低風險:4
建議:5
說明: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 -

更多細節見審計報告

邁出走向安全的第一步

立即聯絡我們,獲取 BlockSec 的專業程式碼審計服務,在協議上線之前把安全性提上來!