Coinsult

Request your audit at coinsult.net

Advanced Manual
Smart Contract Audit

May 18, 2022

Audit requested by

Mobipad Fairlaunch

0xEb79D22c3a15e51B34e444D507ff941F398D73C9

Mobipad Fairlaunch / Security Audit

Table of Contents

1. Audit Summary

1.1 Audit scope

1.2 Tokenomics

1.3 Source Code

2. Disclaimer

3. Global Overview

3.1 Informational issues

3.2 Low-risk issues

3.3 Medium-risk issues

3.4 High-risk issues

4. Vulnerabilities Findings

5. Contract Privileges

5.1 Maximum Fee Limit Check

5.2 Contract Pausability Check

5.3 Max Transaction Amount Check

5.4 Exclude From Fees Check

5.5 Ability to Mint Check

5.6 Ability to Blacklist Check

5.7 Owner Privileges Check

6. Notes

6.1 Notes by Coinsult

6.2 Notes by Mobipad Fairlaunch

7. Contract Snapshot

8. Website Review

9. Certificate of Proof

Mobipad Fairlaunch / Security Audit

Audit Summary

Audit Scope

Project Name

Mobipad Fairlaunch

Blockchain

Binance Smart Chain

Smart Contract Language

Solidity

Contract Address

0xEb79D22c3a15e51B34e444D507ff941F398D73C9

Audit Method

Static Analysis, Manual Review

Date of Audit

18 May 2022

This audit report has been prepared by Coinsult’s experts at the request of the client. In this audit, the results of the static analysis and the manual code review will be presented. The purpose of the audit is to see if the functions work as intended, and to identify potential security issues within the smart contract.

The information in this report should be used to understand the risks associated with the smart contract. This report can be used as a guide for the development team on how the contract could possibly be improved by remediating the issues that were identified.

Mobipad Fairlaunch / Security Audit

Tokenomics

Source Code

Coinsult was comissioned by Mobipad Fairlaunch to perform an audit based on the following code:
https://bscscan.com/address/0xEb79D22c3a15e51B34e444D507ff941F398D73C9#code

Fairlaunch Contract

Mobipad Fairlaunch / Security Audit

Disclaimer

This audit report has been prepared by Coinsult’s experts at the request of the client. In this audit, the results of the static analysis and the manual code review will be presented. The purpose of the audit is to see if the functions work as intended, and to identify potential security issues within the smart contract.

The information in this report should be used to understand the risks associated with the smart contract. This report can be used as a guide for the development team on how the contract could possibly be improved by remediating the issues that were identified.

Coinsult is not responsible if a project turns out to be a scam, rug-pull or honeypot. We only provide a detailed analysis for your own research.

Coinsult is not responsible for any financial losses. Nothing in this contract audit is financial advice, please do your own research.

The information provided in this audit is for informational purposes only and should not be considered investment advice. Coinsult does not endorse, recommend, support or suggest to invest in any project. 

Coinsult can not be held responsible for when a project turns out to be a rug-pull, honeypot or scam.

Mobipad Fairlaunch / Security Audit

Global Overview

Manual Code Review

In this audit report we will highlight the following issues:

Vulnerability Level

Total

Pending

Acknowledged

Resolved

0

0

0

0

3

0

0

0

2

0

0

0

0

0

0

0

Mobipad Fairlaunch / Security Audit

Too many digits

Literals with many digits are difficult to read and review.

				
					    uint256 private poolSupply = 24000000000000000000000000; // 24m Max token supply in fairlaunch [Pool supply]
				
			

Recommendation

Exploit scenario

				
					contract MyContract{
    uint 1_ether = 10000000000000000000; 
}
				
			

While 1_ether looks like 1 ether, it is 10 ether. As a result, it’s likely to be used incorrectly.

Mobipad Fairlaunch / Security Audit

Missing events arithmetic

Detect missing events for critical arithmetic parameters.

				
					    function setWithdrawalAddress(address payable _addr) external onlyOwner {
        WITHDRAWAL_ADDRESS = _addr;
    }
				
			

Recommendation

Emit an event for critical parameter changes.

Exploit scenario

				
					contract C {

  modifier onlyAdmin {
    if (msg.sender != owner) throw;
    _;
  }

  function updateOwner(address newOwner) onlyAdmin external {
    owner = newOwner;
  }
}
				
			

updateOwner() has no event, so it is difficult to track off-chain changes in the buy price.

Mobipad Fairlaunch / Security Audit

Conformance to Solidity naming conventions

Allow _ at the beginning of the mixed_case match for private variables and unused parameters.

				
					    bool private sale_enabled = false;

    bool private claim_enabled = false;

    bool private refund_enabled = false;
    bool private refund_disabled_forever = false; // auto true when claim enabled

    bool private vesting_1_enabled = false;
    bool private vesting_2_enabled = false;
    bool private vesting_3_enabled = false;

    uint256 private vesting_1 = 20; // 20%
    uint256 private vesting_2 = 40; // 40%
    uint256 private vesting_3 = 40; // 40%
				
			

Recommendation

Follow the Solidity naming convention.

Rule exceptions

  • Allow constant variable name/symbol/decimals to be lowercase (ERC20).
  • Allow _ at the beginning of the mixed_case match for private variables and unused parameters.
referral_count can be greater than 1 for the same address (🟢 Acknowledged)
				
					referral_count[referrer] = referral_count[referrer].add(1);
				
			

Recommendation

(🟢 Acknowledged) Using this configuration, the referral_count can be greater than 1 if the user contributes twice, using the same addresses. This will not directly have effects on the contract, but if you have social incentives concerning the referral count, people can abuse this by contributing low amounts with the same addresses to increase this number.
Unable to claim previous vest during vesting schedule 2 (🟢 Acknowledged)
				
					    function setVesting2Enabled(bool _enabled) external onlyOwner {
        if (_enabled == true) {
            vesting_1_enabled = false;
            vesting_3_enabled = false;
        }
        vesting_2_enabled = _enabled;
    }
				
			

Recommendation

(🟢 Acknowledged) No need to disable previous vesting schedules when moving to a new vesting period. This allows investors who could not claim their vest during previous periods to still claim their bought tokens.

Mobipad Fairlaunch / Security Audit

Other Owner Privileges Check

Coinsult lists all important contract methods which the owner can interact with.

⚠ Owner can enable or disable the sale

⚠ Owner can set claiming period enabled or disabled

⚠ Owner can change the referral percentage without any constraints

 

 

 

Mobipad Fairlaunch / Security Audit

Notes

Notes by Mobipad Fairlaunch

No notes provided by the team.

Notes by Coinsult

✅ No notes provided by Coinsult

Mobipad Fairlaunch / Security Audit

Contract Snapshot

This is how the constructor of the contract looked at the time of auditing the smart contract.

				
					contract MBPFairlaunch is Context, Ownable {
    using SafeMath for uint256;

    constructor() public {}

    // Decimal is 18
    uint256 private poolSupply = 24000000000000000000000000; // 24m Max token supply in fairlaunch [Pool supply]
    uint256 private totalBnbInvested = 0; // Total BNB in fairlaunch //same as address(this).balance

    IMbpToken public MBP_CONTRACT;

    function defineToken(address _mbpToken) external onlyOwner {
        MBP_CONTRACT = IMbpToken(_mbpToken);
    }

    bool private sale_enabled = false;

    bool private claim_enabled = false;

    bool private refund_enabled = false;
    bool private refund_disabled_forever = false; // auto true when claim enabled

    bool private vesting_1_enabled = false;
    bool private vesting_2_enabled = false;
    bool private vesting_3_enabled = false;

    uint256 private vesting_1 = 20; // 20%
    uint256 private vesting_2 = 40; // 40%
    uint256 private vesting_3 = 40; // 40%

    address payable WITHDRAWAL_ADDRESS =
        0x7578dFe7a8F2cb1B45B9758b4445F19E0Ae53b61;

    function getPoolSupply() external view returns (uint256) {
        return poolSupply;
    }

    function getSaleEnabled() external view returns (bool) {
        return sale_enabled;
    }

    function setSaleEnabled(bool _enabled) external onlyOwner {
        sale_enabled = _enabled;
    }

    function getClaimEnabled() external view returns (bool) {
        return claim_enabled;
    }
				
			

Mobipad Fairlaunch / Security Audit

Website Review

Coinsult checks the website completely manually and looks for visual, technical and textual errors. We also look at the security, speed and accessibility of the website. In short, a complete check to see if the website meets the current standard of the web development industry. 

Type of check

Description

Mobile friendly?

Contains jQuery errors?

Is SSL secured?

Contains spelling errors?

Mobipad Fairlaunch / Security Audit

Certificate of Proof

Mobipad Fairlaunch

Completed KYC Verification at Coinsult.net

Date: 18 May 2022

Mobipad Fairlaunch

Audited by Coinsult.net

Date: 18 May 2022

Coinsult

coinsult.net

End of report
Smart Contract Audit

Request your smart contract audit / KYC

t.me/coinsult_tg