TraderDAOai v3 Security Audit Report

Are Your Funds Safe?

Our expert team at Callisto Network has conducted an in-depth security audit of the TraderDAOai v3 smart contract. This audit aims to ensure the security of your funds by identifying and assessing any potential vulnerabilities. Here, we present our findings:

0
Total Finding(s)
0 - Hight severity issue(s)
0 - Medium severity issue(s)
0 - Low severity issue(s)
19 note(s)
0 owner privilege(s)

Executive Summary

This report presents the results of the security audit conducted by the Callisto Network Security Department on the TraderDAOai v3 smart contract in May 2023. It analyzes the contract’s security in-depth and highlights any identified vulnerabilities.

1. Scope of the Audit

Blockchain: Arbitrum.

The audit focused on the following TraderDAO v3 contracts:

2. Audit Findings

Our audit reported a total of 0 finding(s), categorized as follows:

  • 0 high-severity issue(s).
  • 0 medium severity issue(s).
  • 0 low-severity issue(s).

In addition to these findings, our audit identified 19 additional points, detailed in the following sections:

  • 3 note(s).
  • 16 owner privilege(s).
No critical security issues were found.

2.1 Owner privileges of Ambassador_Redeem_Contract

null

Severity:

Owner Privileges.
null

Description:

  1. Contract Ambassador_Redeem_Contract contract inherits basic access control properties from Openzeppelin’s Ownable contract, where the contract’s ownership can be transferred or renounced. Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.
  2. Function SetPause() allows the owner to pause or resume the contracts functionalities available to the users. Users would be unable to redeem USDT tokes for the signature signed by the signerAddress if the contract is paused.
  3. Function SetSigner() allows the owner to update the signerAddress. All previous un-redeemed signatures will be invalid if the signerAddress is updated. New signatures must be generated for previous unclaimed signatures.
  4. Function Save() allows the owner to withdraw ERC-20 tokens from the contract.

2.2 Owner privileges of Liquidity_Wallet

2.2.1 Functions SetDecimal() and SetRate() allow gov address to modify POT<>USDT conversion rate

null

Severity:

Owner Privileges.
null

Description:

The functions SetDecimal() and SetRate() allow the gov address to modify POT<>USDT conversion parameters. With current values of Rate = 100 and Decimals = 10**18, the 1 POT = 0.0001 USDT

Users should know that the gov address can set any conversion rate without restriction.

2.2.2 Owner Privileges

null

Severity:

Owner Privileges.
null

Description:

  1. Contract Liquidity_Wallet contract inherits basic access control properties from Openzeppelin’s Ownable contract, where the contract’s ownership can be transferred or renounced. Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.
  2. Function SetPause() allows the owner to pause or resume the contracts functionalities available to the users. Users cannot trade POT tokens for USDT tokens if the contract is paused.
  3. Function SetGov() allows the owner to update the gov address.
  4. Function Save() allows the owner to withdraw ERC-20 tokens from the contract.
  5. Function SetFee() allow the gov address to set a fee for the user’s claim amount.

2.3.1 Owner Privileges

null

Severity:

Notes.
null

Description:

  1. Contract POT_Token contract inherits basic access control properties from Openzeppelin’s Ownable contract, where the contract’s ownership can be transferred or renounced. Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.
  2. Function ownerMint allows the owner to mint arbitrary tokens.
  3. Function SetSigner() allows the owner to update the signerAddress. All previous un-redeemed signatures will be invalid if the signerAddress is updated. New signatures must be generated for previous unclaimed signatures.

2.4.1 Users Claim Reward with USDT tokens

null

Severity:

Notes.
null

Description:

Based on the docs, the Proof_of_Trade_Arbi_One contract should rewards users in POT tokens, but the contract’s implementation rewards users in USDT tokens.
null

Recommendation:

Consider reviewing the implementation or updating documentation based on the business requirements.

2.4.2 Owner Privileges

null

Severity:

Owner Privileges.
null

Description:

  1. The function SetSigner() allows the owner to update the signerAddress. All previous un-redeemed signatures will be invalid if the signerAddress is updated. New signatures must be generated for previous unclaimed signatures.
  2. Function SetPause() allows the owner to pause or resume the contract’s functionalities available to the users. Users cannot deposit USDT tokens or claim rewards if the contract is paused.
  3. Function Save() allows the owner to withdraw ERC-20 tokens from the contract.

2.4.3 Deposit with Arbitrary Parameters

null

Severity:

Notes.
null

Description:

The function deposit() can be called by any user with any parameters. It allows an attacker to deposit with id_ that already exists.

2.5 Follow Good Coding Practice

null

Severity:

Notes.
null

Description:

  1. Missing docstrings

The contracts in the code base lack documentation. This hinders reviewers’ understanding of the code’s intention, which is fundamental to correctly assess not only security but also correctness. Additionally, docstrings improve readability and ease maintenance. They should explicitly explain the purpose or intention of the functions, the scenarios under which they can fail, the roles allowed to call them, the values returned, and the events emitted.

Consider thoroughly documenting all functions (and their parameters) that are part of the contracts’ public API. Functions implementing sensitive functionality, even if not public, should also be documented. Consider following the Ethereum Natural Specification Format (NatSpec) when writing docstrings.

  1. Missing test suite

The contract is missing a test suite to validate and verify the behavior of the contract functionalities. Add tests are recommended to ensure that the contract functions and behaves as expected.

  1. Missing zero address checks

In several places in the code, addresses are passed as parameters to functions. In many of these instances, the functions do not validate that the passed address is not the address 0. While this does not currently pose a security risk, consider adding checks for the passed addresses being nonzero to prevent unexpected behavior where required, or documenting the fact that a zero address is indeed a valid parameter.

  1. Insufficient event logging

Multiple functions with owner privileges in the contracts do not emit an event. Events are useful to inform external dapps or users that an important state was modified on the contract.

3. Security Practices

4. Conclusion

The audited smart contract can be deployed. No security issues were found in the audited contracts.

Users should be aware of the complete centralization of TraderDAO, where the owner can withdraw any tokens from smart contacts without limitation. Users can claim USDT from TraderDAO only if the owner adds enough USDT to contracts. The owner can mint POT tokens without restriction.

Audited contracts don’t implement the functionality described in the Litepaper; therefore, it uses a centralized server-side for all TraderDAO logic.

It is recommended to adhere to the security practices described in pt. 4 of this report to ensure the contract’s operability and prevent any issues that are not directly related to the code of this smart contract.

About Callisto Network

Founded by Dexaran,  co-founder of Ethereum Classic, Callisto Network is a blockchain platform that prioritizes security. We’ve conducted over 330 smart contract audits across platforms like Ethereum, Ethereum Classic, and EOS. In addition to our audits, we’ve developed the ERC 223 token standard and CallistoNFT standard, enhancements over existing standards that address flaws and offer new capabilities, further establishing us as industry leaders in crypto-security.

Trust The Blockchain, Audit Your Smart Contracts.