contract GoldIssueBurnFee is CreatorEnabled, StringMover {

    string gmUserId = "";

    // Functions:
    function GoldIssueBurnFee(string _gmUserId) public {
        creator = msg.sender;
        gmUserId = _gmUserId;
    }

    function getGoldmintFeeAccount() public constant returns(bytes32) {
        bytes32 userBytes = stringToBytes32(gmUserId);
        return userBytes;
    }

    function setGoldmintFeeAccount(string _gmUserId) public onlyCreator {
        gmUserId = _gmUserId;
    }

    function calculateIssueGoldFee(uint _mntpBalance, uint _value, bool _forFiat) public constant returns(uint) {
        return 0;
    }

    function calculateBurnGoldFee(uint _mntpBalance, uint _value, bool _forFiat) public constant returns(uint) {

        // if burn is for crypocurrencies, then fee is 0.1%
        if (!_forFiat) return (1 * _value / 1000);


        // If the sender holds 0 MNTP, then the fee is 3%,
        // If the sender holds at least 10 MNTP, then the fee is 2%,
        // If the sender holds at least 1000 MNTP, then the fee is 1.5%,
        // If the sender holds at least 10000 MNTP, then the fee is 1%,
        if (_mntpBalance >= (10000 * 1 ether)) {
             return (75 * _value / 10000);
        }

        if (_mntpBalance >= (1000 * 1 ether)) {
             return (15 * _value / 1000);
        }

        if (_mntpBalance >= (10 * 1 ether)) {
             return (25 * _value / 1000);
        }

        // 3%
        return (3 * _value / 100);
    }
}
function GoldIssueBurnFee(string _gmUserId) public {
    creator = msg.sender;
    gmUserId = _gmUserId;
}

// Functions: