Contract 0xde5618cfbbdc4319c42bc585646b795f0f249a68

 
Txn Hash
Block
From
To
Value [Txn Fee]
0xef8f9dd4ca5f6741f632410f73fdca85d6775e2a532f87812455836af41c134c10044292020-10-03 0:31:07156 days 14 hrs ago0x20f74357d936f3eb5ba7a4e87fc253608b97557f IN  Contract Creation0 BNB0.00719576
[ Download CSV Export 
Latest 2 internal transactions
Parent Txn Hash Block From To Value
0x6331e06fffbc7eb6b3724f2337663c3d7a583d2d0d2ac3652f62b695a2db103d21281312020-11-11 1:12:34117 days 13 hrs ago 0xde5618cfbbdc4319c42bc585646b795f0f249a68 Thugs: THUGS Token0 BNB
0x6331e06fffbc7eb6b3724f2337663c3d7a583d2d0d2ac3652f62b695a2db103d21281312020-11-11 1:12:34117 days 13 hrs ago 0xfdbddf3f8f1bbf6df210b27fde12f4b886307b63 0xde5618cfbbdc4319c42bc585646b795f0f249a680 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ThugsInfo

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, None license
/**
 *Submitted for verification at BscScan.com on 2020-10-03
*/

pragma solidity ^0.6.6;
pragma solidity ^0.6.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: 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
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}
pragma solidity ^0.6.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}
interface IThugs is IERC20{
    function getLastTwap() external view returns (uint256);
}

contract ThugsInfo{
    using SafeMath for uint256;

    IThugs constant thugsToken = IThugs(0xE10e9822A5de22F8761919310DDA35CD997d63c0);
    //References from thugs token contract
    uint256 constant InitialThugsSupply = 1098420000000000000000000;
    address constant burnVaultAddr = 0x586ACB4bE6cC93aA5C399888B255C7E864Ea508E;
    uint256 constant BURN_RESERVE_PCT = 49;
    uint256 constant INITIAL_TOKENS_PER_BNB =  75 * 1 ether;
    /// @notice min burn percentage
    uint256 constant MIN_BURN_PCT = 5;

    //Return total burnt in totalamount * 10^18
    function totalBurnt() public view returns (uint256) {
        return InitialThugsSupply - thugsToken.totalSupply();
    }
    
    function BurnVaultBalance() public view returns (uint256) {
         return thugsToken.balanceOf(burnVaultAddr);
    }
    //Return approx burn percentage from contract calc
    function currentBurnPercent() public view returns (uint256) {
        uint256 scaleFactor = 1e18;
        uint256 currentAmountOutPerEth = thugsToken.getLastTwap();
        uint256 currentBurnPct = BURN_RESERVE_PCT.mul(scaleFactor);
        
        if (currentAmountOutPerEth < INITIAL_TOKENS_PER_BNB) {
            // 50 / (INITIAL_TOKENS_PER_BNB / currentAmountOutPerEth)
            scaleFactor = 1e9;
            currentBurnPct = currentBurnPct.mul(scaleFactor)
            .div(INITIAL_TOKENS_PER_BNB.mul(1e18)
            .div(currentAmountOutPerEth));
            uint256 minBurnPct = MIN_BURN_PCT * scaleFactor / 10;
            currentBurnPct = currentBurnPct > minBurnPct ? currentBurnPct : minBurnPct;
        }
        return currentBurnPct.div(scaleFactor);
    }

}

Contract ABI

[{"inputs":[],"name":"BurnVaultBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentBurnPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBurnt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5061058f806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806331bdda99146100465780633a2a7e9014610064578063966ff65014610082575b600080fd5b61004e6100a0565b6040518082815260200191505060405180910390f35b61006c610213565b6040518082815260200191505060405180910390f35b61008a6102fa565b6040518082815260200191505060405180910390f35b600080670de0b6b3a76400009050600073e10e9822a5de22f8761919310dda35cd997d63c073ffffffffffffffffffffffffffffffffffffffff1663cfc2d3d26040518163ffffffff1660e01b815260040160206040518083038186803b15801561010a57600080fd5b505afa15801561011e573d6000803e3d6000fd5b505050506040513d602081101561013457600080fd5b81019080805190602001909291905050509050600061015d8360316103a290919063ffffffff16565b9050680410d586a20a4c00008210156101f857633b9aca0092506101d16101b0836101a2670de0b6b3a7640000680410d586a20a4c00006103a290919063ffffffff16565b61042890919063ffffffff16565b6101c385846103a290919063ffffffff16565b61042890919063ffffffff16565b90506000600a84600502816101e257fe5b0490508082116101f257806101f4565b815b9150505b61020b838261042890919063ffffffff16565b935050505090565b600073e10e9822a5de22f8761919310dda35cd997d63c073ffffffffffffffffffffffffffffffffffffffff166370a0823173586acb4be6cc93aa5c399888b255c7e864ea508e6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156102ba57600080fd5b505afa1580156102ce573d6000803e3d6000fd5b505050506040513d60208110156102e457600080fd5b8101908080519060200190929190505050905090565b600073e10e9822a5de22f8761919310dda35cd997d63c073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561035657600080fd5b505afa15801561036a573d6000803e3d6000fd5b505050506040513d602081101561038057600080fd5b810190808051906020019092919050505069e89977af116b7a50000003905090565b6000808314156103b55760009050610422565b60008284029050828482816103c657fe5b041461041d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806105396021913960400191505060405180910390fd5b809150505b92915050565b600061046a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610472565b905092915050565b6000808311829061051e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104e35780820151818401526020810190506104c8565b50505050905090810190601f1680156105105780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161052a57fe5b04905080915050939250505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220e22adb6952b68cc1ebc60ca80640c3fc2a86f3c31133ec03e84da30b6702d74f64736f6c63430006060033

Deployed ByteCode Sourcemap

8186:1691:0:-:0;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;8186:1691:0;;;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;9;2:12;9080:792:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;8898:120;;;:::i;:::-;;;;;;;;;;;;;;;;;;;8763:123;;;:::i;:::-;;;;;;;;;;;;;;;;;;;9080:792;9131:7;9151:19;9173:4;9151:26;;9188:30;8282:42;9221:22;;;:24;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;9221:24:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9221:24:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;9221:24:0;;;;;;;;;;;;;;;;9188:57;;9256:22;9281:33;9302:11;8564:2;9281:20;;:33;;;;:::i;:::-;9256:58;;8616:12;9339:22;:47;9335:481;;;9488:3;9474:17;;9523:125;9573:74;9624:22;9573:32;9600:4;8616:12;9573:26;;:32;;;;:::i;:::-;:50;;:74;;;;:::i;:::-;9523:31;9542:11;9523:14;:18;;:31;;;;:::i;:::-;:49;;:125;;;;:::i;:::-;9506:142;;9663:18;9713:2;9699:11;8704:1;9684:26;:31;;;;;;9663:52;;9764:10;9747:14;:27;:57;;9794:10;9747:57;;;9777:14;9747:57;9730:74;;9335:481;;9833:31;9852:11;9833:14;:18;;:31;;;;:::i;:::-;9826:38;;;;;9080:792;:::o;8898:120::-;8947:7;8282:42;8975:20;;;8479:42;8975:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;8975:35:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;8975:35:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;8975:35:0;;;;;;;;;;;;;;;;8968:42;;8898:120;:::o;8763:123::-;8806:7;8282:42;8854:22;;;:24;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;8854:24:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;8854:24:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;8854:24:0;;;;;;;;;;;;;;;;8414:25;8833:45;8826:52;;8763:123;:::o;4952:471::-;5010:7;5260:1;5255;:6;5251:47;;;5285:1;5278:8;;;;5251:47;5310:9;5326:1;5322;:5;5310:17;;5355:1;5350;5346;:5;;;;;;:10;5338:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5414:1;5407:8;;;4952:471;;;;;:::o;5891:132::-;5949:7;5976:39;5980:1;5983;5976:39;;;;;;;;;;;;;;;;;:3;:39::i;:::-;5969:46;;5891:132;;;;:::o;6511:345::-;6597:7;6696:1;6692;:5;6699:12;6684:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;6684:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6723:9;6739:1;6735;:5;;;;;;6723:17;;6847:1;6840:8;;;6511:345;;;;;:::o

Swarm Source

ipfs://e22adb6952b68cc1ebc60ca80640c3fc2a86f3c31133ec03e84da30b6702d74f
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.