Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fuse Token contract needs further decentralization #9

Open
CrackerHax opened this issue Dec 29, 2019 · 0 comments
Open

Fuse Token contract needs further decentralization #9

CrackerHax opened this issue Dec 29, 2019 · 0 comments

Comments

@CrackerHax
Copy link

CrackerHax commented Dec 29, 2019

There are at least 2 functions in current Fuse Token contract that are anti-decentralization and could be abused to destroy the token. In light of this it is doubtful it will ever be worth anything as investors and exchanges alike refuse to deal with centralized tokens.

The Mint function as it is now allows whoever is in control of Fusenet to create as many tokens as they wish (and therefore making it a centralized non-trustless token which is bad news) which can be used to dump an infinite amount of tokens on the market thus destroying the value of Fuse token.

Mint function can be removed since we already know the inflation rate of the token (x % of tokens over y amount of time). Inflation can be hard-coded to be done internally rather then using a non-trustless function. The generated tokens can be sent to the bridge contract to hold in reserve for validators.

Current Mint function:

  /**
   * @dev Internal function that mints an amount of the token and assigns it to
   * an account. This encapsulates the modification of balances such that the
   * proper events are emitted.
   * @param account The account that will receive the created tokens.
   * @param value The amount that will be created.
   */
  function _mint(address account, uint256 value) internal {
    require(account != 0);
    _totalSupply = _totalSupply.add(value);
    _balances[account] = _balances[account].add(value);
    emit Transfer(address(0), account, value);
  }

The second function that needs to be talked about is the burn/burnFrom function. This function is used by whoever controls Fuse token to burn tokens from ANY address. There is absolutely no reason to have this function present in the contract as it can only be used for nefarious purposes. This should be removed in its entirety because it is BAD. Nobody wants their tokens burnt without their permission.

The only way this function should ever be implemented is if ONLY the hodler were able to burn their OWN tokens (nobody should ever be able to burn tokens from an address they do not own, and this includes whoever is in control the Fuse token contract).

Current burn function:

  /**
   * @dev Internal function that burns an amount of the token of a given
   * account.
   * @param account The account whose tokens will be burnt.
   * @param value The amount that will be burnt.
   */
  function _burn(address account, uint256 value) internal {
    require(account != 0);
    require(value <= _balances[account]);

    _totalSupply = _totalSupply.sub(value);
    _balances[account] = _balances[account].sub(value);
    emit Transfer(account, address(0), value);
  }

Current burnFrom function:

  /**
   * @dev Internal function that burns an amount of the token of a given
   * account, deducting from the sender's allowance for said account. Uses the
   * internal burn function.
   * @param account The account whose tokens will be burnt.
   * @param value The amount that will be burnt.
   */
  function _burnFrom(address account, uint256 value) internal {
    require(value <= _allowed[account][msg.sender]);

    // Should https://github.com/OpenZeppelin/zeppelin-solidity/issues/707 be accepted,
    // this function needs to emit an event with the updated approval.
    _allowed[account][msg.sender] = _allowed[account][msg.sender].sub(
      value);
    _burn(account, value);
  }
}

Fixing these functions would require a token swap. If inflation must be changed in the future then it should require another token swap (let hodlers decide whether to engage in a token swap or dump their holdings if they do not like it).

These functions can be found in the current Fuse token contract:
https://etherscan.io/address/0x970B9bB2C0444F5E81e9d0eFb84C8ccdcdcAf84d#code

@CrackerHax CrackerHax changed the title Fuse Token contract needs to be decentralized Fuse Token contract needs further decentralization Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant