CMOS AUDIT

RISKS

After auditing contract address 0x87869A9789291A6cEC99f3c3Ef2fF71fcEb12a8e belonging to CoinMerge OS, we concluded after testing and reading. 1) The _transfer function does not use the _SafeMath library to perform arithmetic operations, which may make it vulnerable to integer overflow and underflow attacks. However, it does include a check to ensure that the transfer amount is greater than zero, as these are MINOR issues we see "NO SERIOUS" issues with the contract.  

The CMOS contract was thoroughly reviewed by DAR Auditing Services. We were not able to find any serious exploits to the contract or security risks. Always do your own research and due diligence before investing into any project. This audit does not constitute a contractual agreement, a promise, any form of legally binding agreement, or a representation or undertaking as to the future performance of CMOS or the CoinMerge Operating System.


RECOMMENDATIONS

*Consider implementing a time-lock mechanism for the transferOwnership function to prevent malicious actions.

*Consider adding a pause function to pause trading in case of any issues or vulnerabilities.

*Consider adding a blacklist of addresses that are not allowed to receive tokens to prevent fraudulent activities.

FUNCTIONS

'name': returns the name of the token as a string.

'symbol': returns the symbol of the token as a string.

'decimals': returns the number of decimal places used by the token.

'totalSupply': returns the total supply of the token as an unsigned integer.

'balanceOf': returns the balance of a specified address.

'transfer': transfers a specified amount of tokens from the sender's address to a recipient's address.

'approve': approves another address to spend a specified amount of tokens on behalf of the sender.

'allowance': returns the amount of tokens approved for spending by a specified address.

'transferFrom': transfers a specified amount of tokens from a specified sender's address to a recipient's address, provided the sender has been approved to spend the specified amount of tokens.

'launch': launches trading.

'transferOwnership': transfers ownership of the contract.

'airdrop': airdrops a specified amount of tokens to a list of recipient addresses.


SOURCE CODE

/**

 *Submitted for verification at Etherscan.io on 2023-02-06

*/


// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.7.0 <0.9.0;


contract CoinMergeOS {

    uint256 constant TOTAL_SUPPLY = 11000000000 * 10**9;

    uint8 m_Decimals = 9;

    string m_Name = "CoinMerge OS";

    string m_Symbol = "CMOS";

    bool m_Launched = false;

    address m_Owner = 0x333e0F5eD7B8269e383328FB5f3b3AA2619479dc;

    mapping (address => uint256) m_Balances;

    mapping (address => mapping (address => uint256)) m_Allowances;

    event Transfer(address indexed from, address indexed to, uint256 value);

    event Approval(address indexed owner, address indexed spender, uint256 value);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);


    constructor () {

        m_Balances[0x333e0F5eD7B8269e383328FB5f3b3AA2619479dc] = TOTAL_SUPPLY;

        emit OwnershipTransferred(address(0), 0x333e0F5eD7B8269e383328FB5f3b3AA2619479dc);

        emit Transfer(address(0), 0x333e0F5eD7B8269e383328FB5f3b3AA2619479dc, TOTAL_SUPPLY);

    }

    function owner() public view returns (address) {

        return m_Owner;

    }

    function name() public view returns (string memory) {

        return m_Name;

    }

    function symbol() public view returns (string memory) {

        return m_Symbol;

    }

    function decimals() public view returns (uint8) {

        return m_Decimals;

    }

    function totalSupply() public pure returns (uint256) {

        return TOTAL_SUPPLY;

    }

    function balanceOf(address _account) public view returns (uint256) {

        return m_Balances[_account];

    }

    function transfer(address _recipient, uint256 _amount) public returns (bool) {

        _transfer(msg.sender, _recipient, _amount);

        return true;

    }

    function allowance(address _owner, address _spender) public view returns (uint256) {

        return m_Allowances[_owner][_spender];

    }

    function approve(address _spender, uint256 _amount) public returns (bool) {

        _approve(msg.sender, _spender, _amount);

        return true;

    }

    function transferFrom(address _sender, address _recipient, uint256 _amount) public returns (bool) {

        require(m_Allowances[_sender][msg.sender] >= _amount);

        _transfer(_sender, _recipient, _amount);

        _approve(_sender, msg.sender, m_Allowances[_sender][msg.sender] - _amount);

        return true;

    }

    function launch() public {

        require(msg.sender == m_Owner);

        m_Launched = true;

    }

    function _approve(address _owner, address _spender, uint256 _amount) private {

        require(_owner != address(0), "ERC20: approve from the zero address");

        require(_spender != address(0), "ERC20: approve to the zero address");

        m_Allowances[_owner][_spender] = _amount;

        emit Approval(_owner, _spender, _amount);

    }

    function _transfer(address _sender, address _recipient, uint256 _amount) private {

        require(_sender != address(0), "ERC20: transfer from the zero address");

        require(_amount > 0, "Transfer amount must be greater than zero");

        if(_sender != m_Owner) 

            require(m_Launched, "Trading not yet opened");

        // Safemath is obsolete as of 0.8

        m_Balances[_sender] -= _amount;

        m_Balances[_recipient] += _amount;

        emit Transfer(_sender, _recipient, _amount);

    }

    function transferOwnership(address _address) external {

        require(msg.sender == m_Owner);

        m_Owner = _address;

        emit OwnershipTransferred(msg.sender, _address);

    }

    function airdrop(address[] memory _recipients, uint256[] memory _amounts) external {  

        for(uint i=0; i<_recipients.length; i++){

            _transfer(msg.sender, _recipients[i], _amounts[i]);

        }

    }

}

SCORE

CMOS score  8.5 /10. DAR APPROVED

DAR DISCLAIMER

DAR LLC is an Independent Audit Company. DAR is a hired company to provide legitimate audits on various contracts. We scan for vulnerabilities to contacts and it is up to the owner/owners of the project to take our recommendations into consideration and make any changes that we may suggest. 

Once the contract is verified on Main Net, the source code cannot be changed. The only changes that can be made are the function calls. DAR is only one party doing one Audit. No audit is ever 100% correct and it is always recommended to have a second audit from another outside source completed before launch. DAR LLC will not be responsible or liable for any malicious attacks/behavior against a contract. Please always do your own research and due diligence before making an investment into any project. Investing is always a risk.