Mixty Finance Token - Smart Contract Audit Report

Summary

Mixty Finance Token Audit Report Mixty Finance intends to build an open network for an emerging world of digital assets and decentralized applications.

We reviewed Mixty Finance's token contract at 0x29f199517022235761bc3287b8c80fda84e32488 on the Ethereum mainnet.


Notes on the token contract:

  • The total inital supply is 20,000 MXF tokens, delivered to the deployer's address.
  • The deployer has sent 1,014 tokens to various addresses after deployment.
  • At the time of writing, the remaining 94% of tokens are in the deployer's address.
  • The token is only minted once upon contract deployment, so the total supply cannot increase.

  • The code has TimeLockedWallet() and withdraw() functions to lock ether in the contract and withdraw it, but as the unlockDate can be changed at any time by the owner, these functions serve no purpose beyond acting as an ETH wallet for the team.
  • Some gas optimizations could be achieved through marking functions as external, but the impact is negligible.
  • Utilization of SafeMath to prevent overflows.
Audit Findings Summary
  • No security issues from external attackers were identified.
  • MXF has not yet been listed. As with any presale, excercise caution when giving ETH directly to the project team.
  • Date: February 8th, 2021

Vulnerability CategoryNotesResult
Arbitrary Storage WriteN/APASS
Arbitrary JumpN/APASS
Delegate Call to Untrusted ContractN/APASS
Dependence on Predictable VariablesN/APASS
Deprecated OpcodesN/APASS
Ether ThiefN/APASS
ExceptionsN/APASS
External CallsN/APASS
Integer Over/UnderflowN/APASS
Multiple SendsN/APASS
SuicideN/APASS
State Change External CallsN/APASS
Unchecked RetvalN/APASS
User Supplied AssertionN/APASS
Critical Solidity CompilerN/APASS
Overall Contract Safety PASS

Function Graph

Smart Contract Graph


Smart Contract Inheritance




 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public

 + [Int] ERC20Interface 
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] balanceOf
    - [Ext] approve #
    - [Ext] allowance
    - [Ext] totalSupply

 +  SafeMath 
    - [Pub] safeAdd
    - [Pub] safeSub
    - [Pub] safeMul
    - [Pub] safeDiv

 +  Owned 
    - [Pub]  #
    - [Pub] transferOwnership #
       - modifiers: onlyOwner
    - [Pub] acceptOwnership #

 +  MixtyFinance (ERC20Interface, SafeMath, Owned)
    - [Pub]  #
    - [Pub] transfer #
    - [Pub] transferFrom #
    - [Pub] approve #
    - [Pub] TimeLockedWallet #
       - modifiers: onlyOwner
    - [Pub] Recieved ($)
    - [Pub] withdraw #
       - modifiers: onlyOwner
    - [Pub] allowance
    - [Pub] balanceOf

							

Click here to download the source code as a .sol file.


/**
 *Submitted for verification at Etherscan.io on 2020-12-04
*/

pragma solidity =0.5.16;

interface ERC20Interface {
    function transfer(address to, uint tokens) external returns (bool success);
    function transferFrom(address from, address to, uint tokens) external returns (bool success);
    function balanceOf(address tokenOwner) external view returns (uint balance);
    function approve(address spender, uint tokens) external returns (bool success);
    function allowance(address tokenOwner, address spender) external view returns (uint remaining);
    function totalSupply() external view returns (uint);

    event Transfer(address indexed from, address indexed to, uint tokens);
    event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}

contract SafeMath {
    function safeAdd(uint a, uint b) public pure returns (uint c) {
        c = a + b;
        require(c >= a);
    }
    function safeSub(uint a, uint b) public pure returns (uint c) {
        require(b <= a);
        c = a - b;
    }
    function safeMul(uint a, uint b) public pure returns (uint c) {
        c = a * b;
        require(a == 0 || c / a == b);
    }
    function safeDiv(uint a, uint b) public pure returns (uint c) {
        require(b > 0);
        c = a / b;
    }
}

contract Owned {
    address public owner;
    address public newOwner;
    address public creator;
    uint public unlockDate;
    uint public createdAt;
    uint public balance;

    event OwnershipTransferred(address indexed _from, address indexed _to);

    constructor() public {
        owner = msg.sender;
    }

    modifier onlyOwner {
        require(msg.sender == owner, "you are not the owner");
        _;
    }

    function transferOwnership(address _newOwner) public onlyOwner {
        newOwner = _newOwner;
    }
    function acceptOwnership() public {
        require(msg.sender == newOwner, "you are not the new owner");
        emit OwnershipTransferred(owner, newOwner);
        owner = newOwner;
        newOwner = address(0);
    }
}

contract MixtyFinance is ERC20Interface, SafeMath, Owned {
    string public name;
    string public symbol;
    uint8 public decimals;
    uint public totalSupply;
    mapping(address => uint) public balances;
    mapping(address => mapping(address => uint)) public allowed;
   
   
     constructor () public {
        name = "Mixty Finance";
        symbol = "MXF";
        decimals = 18;
        totalSupply = 20000*10**uint(decimals);
        balances[msg.sender] = totalSupply;
    }
       
    function transfer(address to, uint value) public returns(bool) {
        require(balances[msg.sender] >= value);
        balances[msg.sender] -= value;
        balances[to] += value;
        emit Transfer(msg.sender, to, value);
        return true;
    }
   
    function transferFrom(address from, address to, uint value) public returns(bool) {
        uint allowance = allowed[from][msg.sender];
        require(balances[msg.sender] >= value && allowance >= value);
        allowed[from][msg.sender] -= value;
        balances[msg.sender] -= value;
        balances[to] += value;
        emit Transfer(msg.sender, to, value);
        return true;
    }
   
    function approve(address spender, uint value) public returns(bool) {
        require(spender != msg.sender);
        allowed[msg.sender][spender] = value;
        emit Approval(msg.sender, spender, value);
        return true;
    }
    
    function TimeLockedWallet(address _creator, address _owner, uint _unlockDate) onlyOwner public {
        creator = _creator;
        owner = _owner;
        unlockDate = _unlockDate;
        createdAt = now;
    }
    
    function Recieved() payable public { 
        (msg.sender, msg.value);
    }
   
   function withdraw() onlyOwner public {
         require(now >= unlockDate);
         msg.sender.transfer(balance);
         withdraw();
    }
    

    function allowance(address owner, address spender) public view returns(uint) {
        return allowed[owner][spender];
    }
   
    function balanceOf(address owner) public view returns(uint) {
        return balances[owner];
    }
   
}


Please review our Terms & Conditions, Privacy Policy, and other legal information here. By using this site, you explicitly agree to these terms.