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의 전문 코드 감사팀에 문의하시면 됩니다.