Duality Code
0x2f7cEe8e40deACde054ed3A652a55339C0968d26 0x2f7c...968d26

Static analysis Dynamic analysis Symbolic Execution SWC check

TBA

Contract address
0x2f7c...968d26
Network Binance Smart Chain
License None
Compiler v0.8.12 v0.8.12+commit.f00d7308
Type N/A
Language Solidity
Request date 2022/08/15
Revision date 2022/08/23
Critical
Passed
High
Passed
Optimization
Passed

Owner privileges

Crucial issues found The contract does contain issues of high or medium criticality. In some circumstances, the Contract may not function as intended and may pose a safety risk.
Contract owner cannot mint It is not possible to mint new tokens.
Contract owner cannot blacklist addresses. It is not possible to lock user funds by blacklisting addresses.
Contract owner cannot set high fees The fees, if applicable, can be a maximum of 25% or lower. The contract can therefore not be locked. Please take a look in the comment section for more details.
Contract cannot be locked Owner cannot lock any user funds.
Token cannot be burned There is no burn function within the contract.
Ownership is not renounced Contract can be manipulated by owner functions.
Comments

This contract was created by a token generator and the liquidity will be added to an address of the providing service.

The owner can blacklist addresses.

The _setBalance will mint/burn functions

Every time someone is trying to transfer the following call will happen

1. _transfer function will be called
2. If "swapTokensAtAmount" is lower than contractTokenBalance the logic above will be executed
3. "swapAndSendToFee" function will be called where the issue is
4. Duality Token will be swapped to WBNB and after it, the swapped token (in this case WBNB) will be swapped to rewardToken (in your case also the WBNB address)
5. The function will be reverted and nobody is able to transfer any more.

Audit Scope

This audit covered the following files listed below with a SHA-1 Hash. The above token Team provided us with the files that needs to be tested.

We will verify the following claims:
  • Correct implementation of Token standard
  • Deployer cannot mint any new tokens
  • Deployer cannot burn or lock user funds
  • Deployer cannot pause the contract
  • Overall checkup (Smart Contract Security)
The auditing process follows a routine series of steps:
  • Review of the specifications, sources, and instructions provided to SolidProof to make sure we understand the size, scope, and functionality of the smart contract.
  • Manual review of code, which is the process of reading source code line-by-line in an attempt to identify potential vulnerabilities.
  • Comparison to specification, which is the process of checking whether the code does what the specifications, sources, and instructions provided to SolidProof describe.
  • Test coverage analysis, which is the process of determining whether the test cases are actually covering the code and how much code is exercised when we run those test cases.
  • Symbolic execution, which is analysing a program to determine what inputs causes each part of a program to execute.
  • Best practices review, which is a review of the smart contracts to improve efficiency, effectiveness, clarify, maintainability, security, and control based on the established industry and academic practices, recommendations, and research.
  • Specific, itemized, actionable recommendations to help you take steps to secure your smart contracts.

A file with a different Hash has been modified, intentionally or otherwise, after the security review. A different Hash could be (but not necessarily) an indication of a changed condition or potential vulnerability that was not within the scope of this review.

Functions
public

138

State variables
public

28

Total lines
of code

1691

Capabilities
Hover on items

Audit Details

Throughout the review process, care was taken to evaluate the repository for security-related issues, code quality, and adherence to speciïŹcation and best practices. To do so, reviewed line-by-line by our team of expert pentesters and smart contract developers, documenting any issues as there were discovered.

Risk represents the probability that a certain source-threat will exploit vulnerability, and the impact of that event on the organization or system. Risk Level is computed based on CVSS version 3.0.

medium Issues

Pending

#1 Issue

Access control

CoinToken.sol

L1182,1193

Description

These functions can be called by anyone and users can remove/set the MAP of other users.

Pending

#2 Issue

Incorrect Swap Mechanism

CoinToken.sol

L1650

Description

The contract swaps the same token twice which will result in a revert of the transaction everytime this function is called

low Issues

Pending

#1 Issue

Local variables shadowing (shadowing-local)

CoinToken.sol

L816

L864

L871

L878

L888

L1308

Description

Rename the local variables that shadow another component.

Pending

#2 Issue

Missing Zero Address Validation (missing-zero-check)

CoinToken.sol

L816,984

L1319

L1355

L1375

L1496

Description

Check that the address is not zero.

Pending

#3 Issue

Floating Pragma

CoinToken.sol

L2

Description

The current pragma Solidity directive is “^0.8.0". Contracts should be deployed with the same compiler version and flags that they have been tested with thoroughly. Locking the pragma helps to ensure that contracts do not accidentally get deployed using other versions.

Pending

#4 Issue

Contract doesn’t import npm packages from source (like OpenZeppelin etc.)

CoinToken.sol

L15

Description

We recommend importing all packages from npm directly without flattening the contract. Functions could be modified or can be susceptible to vulnerabilities

Pending

#5 Issue

Missing Error Message

CoinToken.sol

L903

Description

Always use an error message with the require statement so it doesn't create any confusion.

Pending

#6 Issue

No limitations

CoinToken.sol

L984

Description

The value of the 'minimumTokenBal' can be set without any limitations

informational Issues

Pending

#1 Issue

Functions that are not used (dead-code)

CoinToken.sol

L210-219

L228-237

L262-268

L242-257

L9-11

L898-904

L126-128

L130-133

L184-187

L155-161

L143-150

Description

Remove unused functions.

Pending

#2 Issue

Unused state variables (unused-state)

CoinToken.sol

L138

Description

Remove unused state variables.

Pending

#3 Issue

Unused return values (unused-return)

CoinToken.sol

L1470-1472

L1517-1602

L1666-1679

Description

Ensure that all the return values of the function calls are used.

Pending

#4 Issue

Misspelling

CoinToken.sol

L1513

Description

Correct the spelling for proper readability

Diagrams

Disclaimer

SolidProof.io reports are not, nor should be considered, an “endorsement” or “disapproval” of any particular project or team. These reports are not, nor should be considered, an indication of the economics or value of any “product” or “asset” created by any team. SolidProof.io do not cover testing or auditing the integration with external contract or services (such as Unicrypt, Uniswap, PancakeSwap etc’...)

SolidProof.io Audits do not provide any warranty or guarantee regarding the absolute bug- free nature of the technology analyzed, nor do they provide any indication of the technology proprietors. SolidProof Audits should not be used in any way to make decisions around investment or involvement with any particular project. These reports in no way provide investment advice, nor should be leveraged as investment advice of any sort.

SolidProof.io Reports represent an extensive auditing process intending to help our customers increase the quality of their code while reducing the high level of risk presented by cryptographic tokens and blockchain technology. Blockchain technology and cryptographic assets present a high level of ongoing risk. SolidProof’s position is that each company and individual are responsible for their own due diligence and continuous security. SolidProof in no way claims any guarantee of security or functionality of the technology we agree to analyze.