contract DSTokenBase is ERC20, DSMath {
    uint256                                            _supply;
    mapping (address => uint256)                       _balances;
    mapping (address => mapping (address => uint256))  _approvals;

    constructor(uint supply) public {
        _balances[msg.sender] = supply;
        _supply = supply;
    }

 /**
  * @dev Total number of tokens in existence
  */
    function totalSupply() public view returns (uint) {
        return _supply;
    }

 /**
  * @dev Gets the balance of the specified address.
  * @param src The address to query the balance of.
  * @return An uint256 representing the amount owned by the passed address.
  */

    function balanceOf(address src) public view returns (uint) {
        return _balances[src];
    }

 /**
   * @dev Function to check the amount of tokens that an owner allowed to a spender.
   * @param src address The address which owns the funds.
   * @param guy address The address which will spend the funds.
   */
    function allowance(address src, address guy) public view returns (uint) {
        return _approvals[src][guy];
    }

  /**
   * @dev Transfer token for a specified address
   * @param dst The address to transfer to.
   * @param wad The amount to be transferred.
   */

    function transfer(address dst, uint wad) public returns (bool) {
        return transferFrom(msg.sender, dst, wad);
    }

 /**
   * @dev Transfer tokens from one address to another
   * @param src address The address which you want to send tokens from
   * @param dst address The address which you want to transfer to
   * @param wad uint256 the amount of tokens to be transferred
   */

    function transferFrom(address src, address dst, uint wad)
        public
        returns (bool)
    {
        if (src != msg.sender) {
            _approvals[src][msg.sender] = sub(_approvals[src][msg.sender], wad);
        }

        _balances[src] = sub(_balances[src], wad);
        _balances[dst] = add(_balances[dst], wad);

        emit Transfer(src, dst, wad);

        return true;
    }


 /**
   * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
   * Beware that changing an allowance with this method brings the risk that someone may use both the old
   * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
   * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
   * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
   * @param guy The address which will spend the funds.
   * @param wad The amount of tokens to be spent.
   */

    function approve(address guy, uint wad) public returns (bool) {
        _approvals[msg.sender][guy] = wad;

        emit Approval(msg.sender, guy, wad);

        return true;
    }

 /**
   * @dev Increase the amount of tokens that an owner allowed to a spender.
   * approve should be called when allowed_[_spender] == 0. To increment
   * allowed value is better to use this function to avoid 2 calls (and wait until
   * the first transaction is mined)
   * From MonolithDAO Token.sol
   * @param src The address which will spend the funds.
   * @param wad The amount of tokens to increase the allowance by.
   */
  function increaseAllowance(
    address src,
    uint256 wad
  )
    public
    returns (bool)
  {
    require(src != address(0));

    _approvals[src][msg.sender] = add(_approvals[src][msg.sender], wad);
    emit Approval(msg.sender, src, _approvals[msg.sender][src]);
    return true;
  }

 /**
   * @dev Decrese the amount of tokens that an owner allowed to a spender.
   * approve should be called when allowed_[_spender] == 0. To increment
   * allowed value is better to use this function to avoid 2 calls (and wait until
   * the first transaction is mined)
   * From MonolithDAO Token.sol
   * @param src The address which will spend the funds.
   * @param wad The amount of tokens to increase the allowance by.
   */
  function decreaseAllowance(
    address src,
    uint256 wad
  )
    public
    returns (bool)
  {
    require(src != address(0));
    _approvals[src][msg.sender] = sub(_approvals[src][msg.sender], wad);
    emit Approval(msg.sender, src, _approvals[msg.sender][src]);
    return true;
  }

}
function balanceOf(address src) public view returns (uint) {
        return _balances[src];
    }
/**
 * @dev Gets the balance of the specified address.
 * @param src The address to query the balance of.
 * @return An uint256 representing the amount owned by the passed address.
 */