Token ArbiTen
Overview ERC20
Price
$6.14 @ 0.003851 ETH
Fully Diluted Market Cap
Total Supply:
2,681.59733 ArbiTen
Holders:
118 addresses
Transfers:
-
Contract:
Decimals:
18
Official Site:
[ Download CSV Export ]
[ Download CSV Export ]
OVERVIEW
ArbiTen is an algorithmic stablecoin pegged to 0.1 ETH by two different mechanisms: Seignorage and Fractional Collateralization.Update? Click here to update the token ICO / general information
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ArbiTen
Compiler Version
v0.8.15+commit.e14f2714
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, _allowances[owner][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = _allowances[owner][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Spend `amount` form the allowance of `owner` toward `spender`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol) pragma solidity ^0.8.0; import "../ERC20.sol"; import "../../../utils/Context.sol"; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { _spendAllowance(account, _msgSender(), amount); _burn(account, amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a / b + (a % b == 0 ? 0 : 1); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // 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 (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @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) { return a + b; } /** * @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 a - b; } /** * @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) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting 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 a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting 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) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * 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) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT pragma solidity >0.6.12; interface IOracle { function update() external; function consult(address _token, uint _amountIn) external view returns (uint144 amountOut); function twap(address _token, uint _amountIn) external view returns (uint144 _amountOut); }
// SPDX-License-Identifier: MIT pragma solidity >0.6.12; interface ITreasury { function epoch() external view returns (uint); function startTime() external view returns (uint); function redeemStartTime() external view returns (uint); function nextEpochPoint() external view returns (uint); function getArbiTenPrice() external view returns (uint); function getArbiTenUpdatedPrice() external view returns (uint); function buyBonds(uint amount, uint targetPrice) external; function redeemBonds(uint amount, uint targetPrice) external; function treasuryUpdates() external; function _updateArbiTenPrice() external; function _update10SHAREPrice() external; function refreshCollateralRatio() external; function allocateSeigniorage() external; function hasPool(address _address) external view returns (bool); function info() external view returns ( uint, uint, uint, uint, uint, uint, uint, uint ); function epochInfo() external view returns ( uint, uint, uint, uint ); }
// SPDX-License-Identifier: MIT pragma solidity >0.6.12; /** * @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 SafeMath8 { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint8 a, uint8 b) internal pure returns (uint8) { uint8 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(uint8 a, uint8 b) internal pure returns (uint8) { 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(uint8 a, uint8 b, string memory errorMessage) internal pure returns (uint8) { require(b <= a, errorMessage); uint8 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(uint8 a, uint8 b) internal pure returns (uint8) { // 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; } uint8 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(uint8 a, uint8 b) internal pure returns (uint8) { 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(uint8 a, uint8 b, string memory errorMessage) internal pure returns (uint8) { require(b > 0, errorMessage); uint8 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(uint8 a, uint8 b) internal pure returns (uint8) { 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(uint8 a, uint8 b, string memory errorMessage) internal pure returns (uint8) { require(b != 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity >0.6.12; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "../lib/SafeMath8.sol"; import "../interfaces/IOracle.sol"; import "../interfaces/ITreasury.sol"; contract ArbiTen is ERC20Burnable, Ownable { using SafeMath8 for uint8; using SafeMath for uint; mapping(address => bool) public operators; /* ================= Taxation =============== */ // Address of the Oracle address public oracle; // Address of the Tax Office address public taxOffice; ITreasury public treasury; // Current tax rate uint public taxRate; // Price threshold below which taxes will get burned uint public burnThreshold = 0;//1.10e18; // Address of the tax collector wallet address public taxCollectorAddress; // Should the taxes be calculated using the tax tiers bool public autoCalculateTax = false; // turn on at the end of deploy script // Tax Tiers uint[] public taxTiersTwaps = [0, 5e16, 6e16, 7e16, 8e16, 9e16, 9.5e16, 1e17, 1.05e17, 1.10e17, 1.20e17, 1.30e17, 1.40e17, 1.50e17]; uint[] public taxTiersRates = [2000, 1500, 1500, 1500, 1000, 500, 200, 20, 20, 20, 20, 20, 20, 20]; // Sender addresses excluded from Tax mapping(address => bool) public excludedAddresses; event TaxOfficeTransferred(address oldAddress, address newAddress); // Track DOLLAR burned event DollarBurned(address indexed from, address indexed to, uint amount); // Track DOLLAR minted event DollarMinted(address indexed from, address indexed to, uint amount); event SetTaxTiersTwap(uint indexed index, uint value); event SetTaxTiersRates(uint indexed from, uint value); modifier onlyPools() { require(ITreasury(treasury).hasPool(msg.sender), "!pools"); _; } modifier onlyOperator() { require(operators[msg.sender], "Caller is not operator"); _; } modifier onlyTaxOffice() { require(taxOffice == msg.sender, "Caller is not the tax office"); _; } modifier onlyOperatorOrTaxOffice() { require(operators[msg.sender] || taxOffice == msg.sender, "Caller is not the operator or the tax office"); _; } /** * @notice Constructs the ArbiTen ERC-20 contract. */ constructor(ITreasury _treasury, uint _taxRate, address _taxCollectorAddress) public ERC20("ArbiTen", "ArbiTen") { require(_taxRate <= 2000, "tax equal or less than 20%"); require(_taxCollectorAddress != address(0), "tax collector address must be non-zero address"); operators[msg.sender] = true; excludeAddress(address(this)); _mint(msg.sender, 1440 ether); taxRate = _taxRate; taxCollectorAddress = _taxCollectorAddress; treasury = _treasury; } /* ============= Taxation ============= */ function getTaxTiersTwapsCount() public view returns (uint count) { return taxTiersTwaps.length; } function getTaxTiersRatesCount() public view returns (uint count) { return taxTiersRates.length; } function isAddressExcluded(address _address) public view returns (bool) { return excludedAddresses[_address]; } function setTaxTiersTwap(uint8 _index, uint _value) public onlyTaxOffice returns (bool) { require(_index >= 0, "Index has to be higher than 0"); require(_value <= 2000, "tax equal or less than 20%"); require(_index < getTaxTiersTwapsCount(), "Index has to lower than count of tax tiers"); if (_index > 0) { require(_value > taxTiersTwaps[_index - 1]); } if (_index < getTaxTiersTwapsCount().sub(1)) { require(_value < taxTiersTwaps[_index + 1]); } taxTiersTwaps[_index] = _value; emit SetTaxTiersTwap(_index, _value); return true; } function setTaxTiersRate(uint8 _index, uint _value) public onlyTaxOffice returns (bool) { require(_index >= 0, "Index has to be higher than 0"); require(_index < getTaxTiersRatesCount(), "Index has to lower than count of tax tiers"); taxTiersRates[_index] = _value; emit SetTaxTiersRates(_index, _value); return true; } function setBurnThreshold(uint _burnThreshold) public onlyTaxOffice returns (bool) { burnThreshold = _burnThreshold; } function _getArbiTenPrice() internal view returns (uint _ArbiTenPrice) { try IOracle(oracle).consult(address(this), 1e18) returns (uint144 _price) { return uint(_price); } catch { revert("ArbiTen: failed to fetch ArbiTen price from Oracle"); } } function _updateTaxRate(uint _ArbiTenPrice) internal returns (uint){ if (autoCalculateTax) { for (uint8 tierId = uint8(getTaxTiersTwapsCount()).sub(1); tierId >= 0; --tierId) { if (_ArbiTenPrice >= taxTiersTwaps[tierId]) { require(taxTiersRates[tierId] < 10000, "tax equal or bigger to 100%"); taxRate = taxTiersRates[tierId]; return taxTiersRates[tierId]; } } } } function enableAutoCalculateTax() public onlyTaxOffice { autoCalculateTax = true; } function disableAutoCalculateTax() public onlyTaxOffice { autoCalculateTax = false; } function setOperator(address operator, bool isOperator) public onlyOwner { require(operator != address(0), "operator address cannot be 0 address"); operators[operator] = isOperator; } function setArbiTenOracle(address _oracle) public onlyOperatorOrTaxOffice { require(_oracle != address(0), "oracle address cannot be 0 address"); oracle = _oracle; } function setTaxOffice(address _taxOffice) public onlyOperatorOrTaxOffice { require(_taxOffice != address(0), "tax office address cannot be 0 address"); emit TaxOfficeTransferred(taxOffice, _taxOffice); taxOffice = _taxOffice; } function setTaxCollectorAddress(address _taxCollectorAddress) public onlyTaxOffice { require(_taxCollectorAddress != address(0), "tax collector address must be non-zero address"); taxCollectorAddress = _taxCollectorAddress; } function setTaxRate(uint _taxRate) public onlyTaxOffice { require(!autoCalculateTax, "cannot set if auto calculate tax is enabled"); require(_taxRate <= 2000, "tax equal or less than 20%"); taxRate = _taxRate; } function excludeAddress(address _address) public onlyOperatorOrTaxOffice returns (bool) { require(!excludedAddresses[_address], "address can't be excluded"); excludedAddresses[_address] = true; return true; } function includeAddress(address _address) public onlyOperatorOrTaxOffice returns (bool) { require(excludedAddresses[_address], "address can't be included"); excludedAddresses[_address] = false; return true; } /** * @notice Operator mints ArbiTen to a recipient * @param recipient_ The address of recipient * @param amount_ The amount of ArbiTen to mint to */ function mint(address recipient_, uint amount_) public onlyOperator { _mint(recipient_, amount_); } function burnFrom(address account, uint amount) public override onlyOperator { super.burnFrom(account, amount); } // Burn DOLLAR. Can be used by Pool only function poolBurnFrom(address _address, uint _amount) external onlyPools { super.burnFrom(_address, _amount); emit DollarBurned(_address, msg.sender, _amount); } // Mint DOLLAR. Can be used by Pool only function poolMint(address _address, uint _amount) external onlyPools { _mint(_address, _amount); emit DollarMinted(msg.sender, _address, _amount); } function transferFrom( address sender, address recipient, uint amount ) public override returns (bool) { uint currentTaxRate = 0; bool burnTax = false; if (autoCalculateTax) { uint currentArbiTenPrice = _getArbiTenPrice(); currentTaxRate = _updateTaxRate(currentArbiTenPrice); if (currentArbiTenPrice < burnThreshold) { burnTax = true; } } if (currentTaxRate == 0 || excludedAddresses[sender]) { _transfer(sender, recipient, amount); } else { _transferWithTax(sender, recipient, amount, burnTax); } _approve(sender, _msgSender(), allowance(sender, _msgSender()).sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function _transferWithTax( address sender, address recipient, uint amount, bool burnTax ) internal returns (bool) { uint taxAmount = amount.mul(taxRate).div(10000); uint amountAfterTax = amount.sub(taxAmount); if (burnTax) { // Burn tax super.burnFrom(sender, taxAmount); } else { // Transfer tax to tax collector _transfer(sender, taxCollectorAddress, taxAmount); } // Transfer amount after tax to recipient _transfer(sender, recipient, amountAfterTax); return true; } function amIOperator() public view returns (bool) { if (operators[msg.sender]) return true; return false; } function setTreasuryAddress(ITreasury _treasury) public onlyOperator { require(address(_treasury) != address(0), "treasury address can't be 0!"); treasury = _treasury; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract ITreasury","name":"_treasury","type":"address"},{"internalType":"uint256","name":"_taxRate","type":"uint256"},{"internalType":"address","name":"_taxCollectorAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"DollarBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"DollarMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"from","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"SetTaxTiersRates","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"SetTaxTiersTwap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"TaxOfficeTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"amIOperator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"autoCalculateTax","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burnThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableAutoCalculateTax","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableAutoCalculateTax","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"excludeAddress","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"excludedAddresses","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTaxTiersRatesCount","outputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTaxTiersTwapsCount","outputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"includeAddress","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"isAddressExcluded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"operators","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"poolBurnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"poolMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oracle","type":"address"}],"name":"setArbiTenOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_burnThreshold","type":"uint256"}],"name":"setBurnThreshold","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"isOperator","type":"bool"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_taxCollectorAddress","type":"address"}],"name":"setTaxCollectorAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_taxOffice","type":"address"}],"name":"setTaxOffice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_taxRate","type":"uint256"}],"name":"setTaxRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_index","type":"uint8"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setTaxTiersRate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_index","type":"uint8"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setTaxTiersTwap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ITreasury","name":"_treasury","type":"address"}],"name":"setTreasuryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"taxCollectorAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"taxOffice","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"taxRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"taxTiersRates","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"taxTiersTwaps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"contract ITreasury","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6000600b819055600c805460ff60a01b19169055610240604052608090815266b1a2bc2ec5000060a05266d529ae9e86000060c05266f8b0a10e47000060e05267011c37937e0800006101005267013fbe85edc900006101205267015181ff25a980006101405267016345785d8a00006101605267017508f1956a800061018052670186cc6acd4b00006101a0526701aa535d3d0c00006101c0526701cdda4faccd00006101e0526701f161421c8e000061020052670214e8348c4f000061022052620000d190600d90600e62000590565b50604080516101c0810182526107d081526105dc6020820181905291810182905260608101919091526103e860808201526101f460a082015260c860c0820152601460e08201819052610100820181905261012082018190526101408201819052610160820181905261018082018190526101a08201526200015790600e9081620005eb565b503480156200016557600080fd5b5060405162002c4238038062002c4283398101604081905262000188916200065f565b60408051808201825260078082526620b93134aa32b760c91b6020808401829052845180860190955291845290830152906003620001c783826200074b565b506004620001d682826200074b565b505050620001f3620001ed6200033060201b60201c565b62000334565b6107d08211156200024b5760405162461bcd60e51b815260206004820152601a60248201527f74617820657175616c206f72206c657373207468616e2032302500000000000060448201526064015b60405180910390fd5b6001600160a01b038116620002ba5760405162461bcd60e51b815260206004820152602e60248201527f74617820636f6c6c6563746f722061646472657373206d757374206265206e6f60448201526d6e2d7a65726f206164647265737360901b606482015260840162000242565b336000908152600660205260409020805460ff19166001179055620002df3062000386565b50620002f533684e1003b28d92800000620004a6565b600a91909155600c80546001600160a01b039283166001600160a01b031991821617909155600980549390921692169190911790556200083e565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b3360009081526006602052604081205460ff1680620003af57506008546001600160a01b031633145b620004125760405162461bcd60e51b815260206004820152602c60248201527f43616c6c6572206973206e6f7420746865206f70657261746f72206f7220746860448201526b6520746178206f666669636560a01b606482015260840162000242565b6001600160a01b0382166000908152600f602052604090205460ff16156200047d5760405162461bcd60e51b815260206004820152601960248201527f616464726573732063616e2774206265206578636c7564656400000000000000604482015260640162000242565b506001600160a01b03166000908152600f60205260409020805460ff1916600190811790915590565b6001600160a01b038216620004fe5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640162000242565b806002600082825462000512919062000817565b90915550506001600160a01b038216600090815260208190526040812080548392906200054190849062000817565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b505050565b828054828255906000526020600020908101928215620005d9579160200282015b82811115620005d957825182906001600160401b0316905591602001919060010190620005b1565b50620005e79291506200062f565b5090565b828054828255906000526020600020908101928215620005d9579160200282015b82811115620005d9578251829061ffff169055916020019190600101906200060c565b5b80821115620005e7576000815560010162000630565b6001600160a01b03811681146200065c57600080fd5b50565b6000806000606084860312156200067557600080fd5b8351620006828162000646565b6020850151604086015191945092506200069c8162000646565b809150509250925092565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620006d257607f821691505b602082108103620006f357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200058b57600081815260208120601f850160051c81016020861015620007225750805b601f850160051c820191505b8181101562000743578281556001016200072e565b505050505050565b81516001600160401b03811115620007675762000767620006a7565b6200077f81620007788454620006bd565b84620006f9565b602080601f831160018114620007b757600084156200079e5750858301515b600019600386901b1c1916600185901b17855562000743565b600085815260208120601f198616915b82811015620007e857888601518255948401946001909101908401620007c7565b5085821015620008075787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600082198211156200083957634e487b7160e01b600052601160045260246000fd5b500190565b6123f4806200084e6000396000f3fe608060405234801561001057600080fd5b50600436106102955760003560e01c806366206ce911610167578063a457c2d7116100ce578063cf011b2611610087578063cf011b26146105af578063dd62ed3e146105d2578063ebca1bd91461060b578063ee2a953514610637578063f2fde38b1461063f578063ff87fc7c1461065257600080fd5b8063a457c2d714610548578063a6431bba1461055b578063a9059cbb14610563578063b87c5a4a14610576578063c3bdf61314610589578063c6d69a301461059c57600080fd5b80637dc0d1d0116101205780637dc0d1d0146104e25780638d3cc818146104f55780638da5cb5b1461050957806393995d4b1461051a57806395d89b411461052d5780639d6b5f211461053557600080fd5b806366206ce91461046f57806369356d471461048257806370a0823114610495578063715018a6146104be578063771a3a1d146104c657806379cc6790146104cf57600080fd5b8063395093511161020b5780634f6d38d0116101c45780634f6d38d014610412578063558a72971461041b5780635c29908d1461042e57806361d027b31461044157806365bbacd9146104545780636605bfda1461045c57600080fd5b806339509351146103885780633e5f13d41461039b5780633f07d76a146103c657806340c10f19146103d957806342966c68146103ec57806342c6b4f1146103ff57600080fd5b806318160ddd1161025d57806318160ddd1461032657806323b872dd1461033857806327fec20a1461034b57806330e37a911461035e578063313ce567146103665780633758e6ce1461037557600080fd5b806306fdde031461029a578063095ea7b3146102b85780630a0c165a146102db5780630c407d56146102f057806313e7c9d814610303575b600080fd5b6102a261065a565b6040516102af9190611f43565b60405180910390f35b6102cb6102c6366004611fad565b6106ec565b60405190151581526020016102af565b6102ee6102e9366004611fad565b610704565b005b6102ee6102fe366004611fad565b6107f9565b6102cb610311366004611fd9565b60066020526000908152604090205460ff1681565b6002545b6040519081526020016102af565b6102cb610346366004611ff6565b6108e1565b6102ee610359366004611fd9565b6109ae565b6102cb610a75565b604051601281526020016102af565b6102cb610383366004611fd9565b610a99565b6102cb610396366004611fad565b610b73565b6008546103ae906001600160a01b031681565b6040516001600160a01b0390911681526020016102af565b6102ee6103d4366004611fd9565b610bad565b6102ee6103e7366004611fad565b610cbf565b6102ee6103fa366004612037565b610cfc565b61032a61040d366004612037565b610d09565b61032a600b5481565b6102ee61042936600461205e565b610d2a565b61032a61043c366004612037565b610de1565b6009546103ae906001600160a01b031681565b6102ee610df1565b6102ee61046a366004611fd9565b610e2a565b6102cb61047d366004612097565b610ed1565b6102ee610490366004611fd9565b611072565b61032a6104a3366004611fd9565b6001600160a01b031660009081526020819052604090205490565b6102ee61112b565b61032a600a5481565b6102ee6104dd366004611fad565b611161565b6007546103ae906001600160a01b031681565b600c546102cb90600160a01b900460ff1681565b6005546001600160a01b03166103ae565b6102cb610528366004611fd9565b61119a565b6102a261126b565b6102cb610543366004612037565b61127a565b6102cb610556366004611fad565b6112b0565b600d5461032a565b6102cb610571366004611fad565b61134d565b6102cb610584366004612097565b61135b565b600c546103ae906001600160a01b031681565b6102ee6105aa366004612037565b611406565b6102cb6105bd366004611fd9565b600f6020526000908152604090205460ff1681565b61032a6105e03660046120bb565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6102cb610619366004611fd9565b6001600160a01b03166000908152600f602052604090205460ff1690565b600e5461032a565b6102ee61064d366004611fd9565b6114f5565b6102ee61158d565b606060038054610669906120e9565b80601f0160208091040260200160405190810160405280929190818152602001828054610695906120e9565b80156106e25780601f106106b7576101008083540402835291602001916106e2565b820191906000526020600020905b8154815290600101906020018083116106c557829003601f168201915b5050505050905090565b6000336106fa8185856115cc565b5060019392505050565b600954604051631246dbf560e01b81523360048201526001600160a01b0390911690631246dbf590602401602060405180830381865afa15801561074c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610770919061211d565b6107aa5760405162461bcd60e51b815260206004820152600660248201526521706f6f6c7360d01b60448201526064015b60405180910390fd5b6107b482826116f1565b60405181815233906001600160a01b038416907fb53a8a5aa66e96b4627a60632ff728cd6991e142988ea8f28215fae565fe8ad0906020015b60405180910390a35050565b600954604051631246dbf560e01b81523360048201526001600160a01b0390911690631246dbf590602401602060405180830381865afa158015610841573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610865919061211d565b61089a5760405162461bcd60e51b815260206004820152600660248201526521706f6f6c7360d01b60448201526064016107a1565b6108a48282611706565b6040518181526001600160a01b0383169033907f0c0f5df55f02a0601bce877b4f87152a1e95aa77aa55a08f16a8852fcf1f2bf9906020016107ed565b600c5460009081908190600160a01b900460ff16156109225760006109046117e5565b905061090f816118cd565b9250600b5481101561092057600191505b505b81158061094757506001600160a01b0386166000908152600f602052604090205460ff165b1561095c576109578686866119fc565b61096a565b61096886868684611bcc565b505b6109a2863361099d87604051806060016040528060288152602001612397602891396109968c336105e0565b9190611c45565b6115cc565b50600195945050505050565b3360009081526006602052604090205460ff16806109d657506008546001600160a01b031633145b6109f25760405162461bcd60e51b81526004016107a19061213a565b6001600160a01b038116610a535760405162461bcd60e51b815260206004820152602260248201527f6f7261636c6520616464726573732063616e6e6f742062652030206164647265604482015261737360f01b60648201526084016107a1565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081526006602052604081205460ff1615610a935750600190565b50600090565b3360009081526006602052604081205460ff1680610ac157506008546001600160a01b031633145b610add5760405162461bcd60e51b81526004016107a19061213a565b6001600160a01b0382166000908152600f602052604090205460ff1615610b465760405162461bcd60e51b815260206004820152601960248201527f616464726573732063616e2774206265206578636c756465640000000000000060448201526064016107a1565b506001600160a01b0381166000908152600f60205260409020805460ff191660019081179091555b919050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091906106fa908290869061099d90879061219c565b3360009081526006602052604090205460ff1680610bd557506008546001600160a01b031633145b610bf15760405162461bcd60e51b81526004016107a19061213a565b6001600160a01b038116610c565760405162461bcd60e51b815260206004820152602660248201527f746178206f666669636520616464726573732063616e6e6f742062652030206160448201526564647265737360d01b60648201526084016107a1565b600854604080516001600160a01b03928316815291831660208301527f75237613d1cfb394eb7979839ecbeacaca4592ef0cf96791979625803948a601910160405180910390a1600880546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081526006602052604090205460ff16610cee5760405162461bcd60e51b81526004016107a1906121b4565b610cf88282611706565b5050565b610d063382611c71565b50565b600d8181548110610d1957600080fd5b600091825260209091200154905081565b6005546001600160a01b03163314610d545760405162461bcd60e51b81526004016107a1906121e4565b6001600160a01b038216610db65760405162461bcd60e51b8152602060048201526024808201527f6f70657261746f7220616464726573732063616e6e6f742062652030206164646044820152637265737360e01b60648201526084016107a1565b6001600160a01b03919091166000908152600660205260409020805460ff1916911515919091179055565b600e8181548110610d1957600080fd5b6008546001600160a01b03163314610e1b5760405162461bcd60e51b81526004016107a190612219565b600c805460ff60a01b19169055565b3360009081526006602052604090205460ff16610e595760405162461bcd60e51b81526004016107a1906121b4565b6001600160a01b038116610eaf5760405162461bcd60e51b815260206004820152601c60248201527f747265617375727920616464726573732063616e27742062652030210000000060448201526064016107a1565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6008546000906001600160a01b03163314610efe5760405162461bcd60e51b81526004016107a190612219565b6107d0821115610f505760405162461bcd60e51b815260206004820152601a60248201527f74617820657175616c206f72206c657373207468616e2032302500000000000060448201526064016107a1565b600d548360ff1610610f745760405162461bcd60e51b81526004016107a190612250565b60ff831615610fb357600d610f8a60018561229a565b60ff1681548110610f9d57610f9d6122bd565b90600052602060002001548211610fb357600080fd5b610fc76001610fc1600d5490565b90611db7565b8360ff16101561100757600d610fde8460016122d3565b60ff1681548110610ff157610ff16122bd565b9060005260206000200154821061100757600080fd5b81600d8460ff168154811061101e5761101e6122bd565b90600052602060002001819055508260ff167ff8b83902d6c8579ff700fbd4f32eac3a14e70d5620fa6b781f204dba84d1ad358360405161106191815260200190565b60405180910390a250600192915050565b6008546001600160a01b0316331461109c5760405162461bcd60e51b81526004016107a190612219565b6001600160a01b0381166111095760405162461bcd60e51b815260206004820152602e60248201527f74617820636f6c6c6563746f722061646472657373206d757374206265206e6f60448201526d6e2d7a65726f206164647265737360901b60648201526084016107a1565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b031633146111555760405162461bcd60e51b81526004016107a1906121e4565b61115f6000611dca565b565b3360009081526006602052604090205460ff166111905760405162461bcd60e51b81526004016107a1906121b4565b610cf882826116f1565b3360009081526006602052604081205460ff16806111c257506008546001600160a01b031633145b6111de5760405162461bcd60e51b81526004016107a19061213a565b6001600160a01b0382166000908152600f602052604090205460ff166112465760405162461bcd60e51b815260206004820152601960248201527f616464726573732063616e277420626520696e636c756465640000000000000060448201526064016107a1565b506001600160a01b03166000908152600f60205260409020805460ff19169055600190565b606060048054610669906120e9565b6008546000906001600160a01b031633146112a75760405162461bcd60e51b81526004016107a190612219565b600b9190915590565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156113355760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016107a1565b61134282868684036115cc565b506001949350505050565b6000336106fa8185856119fc565b6008546000906001600160a01b031633146113885760405162461bcd60e51b81526004016107a190612219565b600e548360ff16106113ac5760405162461bcd60e51b81526004016107a190612250565b81600e8460ff16815481106113c3576113c36122bd565b90600052602060002001819055508260ff167f928b65ceafb94528671a69ce610f88fe966fb93882ae0baf969367d63440d4898360405161106191815260200190565b6008546001600160a01b031633146114305760405162461bcd60e51b81526004016107a190612219565b600c54600160a01b900460ff161561149e5760405162461bcd60e51b815260206004820152602b60248201527f63616e6e6f7420736574206966206175746f2063616c63756c6174652074617860448201526a081a5cc8195b98589b195960aa1b60648201526084016107a1565b6107d08111156114f05760405162461bcd60e51b815260206004820152601a60248201527f74617820657175616c206f72206c657373207468616e2032302500000000000060448201526064016107a1565b600a55565b6005546001600160a01b0316331461151f5760405162461bcd60e51b81526004016107a1906121e4565b6001600160a01b0381166115845760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107a1565b610d0681611dca565b6008546001600160a01b031633146115b75760405162461bcd60e51b81526004016107a190612219565b600c805460ff60a01b1916600160a01b179055565b6001600160a01b03831661162e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016107a1565b6001600160a01b03821661168f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016107a1565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6116fc823383611e1c565b610cf88282611c71565b6001600160a01b03821661175c5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016107a1565b806002600082825461176e919061219c565b90915550506001600160a01b0382166000908152602081905260408120805483929061179b90849061219c565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600754604051633ddac95360e01b8152306004820152670de0b6b3a764000060248201526000916001600160a01b031690633ddac95390604401602060405180830381865afa925050508015611858575060408051601f3d908101601f19168201909252611855918101906122f8565b60015b6118bf5760405162461bcd60e51b815260206004820152603260248201527f4172626954656e3a206661696c656420746f206665746368204172626954656e6044820152712070726963652066726f6d204f7261636c6560701b60648201526084016107a1565b6001600160901b0316919050565b600c54600090600160a01b900460ff1615610b6e5760006118fb60016118f2600d5490565b60ff1690611ea8565b90505b600d8160ff1681548110611914576119146122bd565b906000526020600020015483106119e657612710600e8260ff168154811061193e5761193e6122bd565b9060005260206000200154106119965760405162461bcd60e51b815260206004820152601b60248201527f74617820657175616c206f722062696767657220746f2031303025000000000060448201526064016107a1565b600e8160ff16815481106119ac576119ac6122bd565b9060005260206000200154600a81905550600e8160ff16815481106119d3576119d36122bd565b9060005260206000200154915050919050565b6119ef81612321565b90506118fe565b50919050565b6001600160a01b038316611a605760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016107a1565b6001600160a01b038216611ac25760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016107a1565b6001600160a01b03831660009081526020819052604090205481811015611b3a5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016107a1565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290611b7190849061219c565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611bbd91815260200190565b60405180910390a35b50505050565b600080611bf0612710611bea600a5487611eea90919063ffffffff16565b90611ef6565b90506000611bfe8583611db7565b90508315611c1557611c1087836116f1565b611c2d565b600c54611c2d9088906001600160a01b0316846119fc565b611c388787836119fc565b5060019695505050505050565b60008184841115611c695760405162461bcd60e51b81526004016107a19190611f43565b505050900390565b6001600160a01b038216611cd15760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016107a1565b6001600160a01b03821660009081526020819052604090205481811015611d455760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016107a1565b6001600160a01b0383166000908152602081905260408120838303905560028054849290611d7490849061233e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016116e4565b6000611dc3828461233e565b9392505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114611bc65781811015611e9b5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016107a1565b611bc684848484036115cc565b6000611dc383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611f02565b6000611dc38284612355565b6000611dc38284612374565b60008360ff168360ff1611158290611f2d5760405162461bcd60e51b81526004016107a19190611f43565b506000611f3a848661229a565b95945050505050565b600060208083528351808285015260005b81811015611f7057858101830151858201604001528201611f54565b81811115611f82576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b0381168114610d0657600080fd5b60008060408385031215611fc057600080fd5b8235611fcb81611f98565b946020939093013593505050565b600060208284031215611feb57600080fd5b8135611dc381611f98565b60008060006060848603121561200b57600080fd5b833561201681611f98565b9250602084013561202681611f98565b929592945050506040919091013590565b60006020828403121561204957600080fd5b5035919050565b8015158114610d0657600080fd5b6000806040838503121561207157600080fd5b823561207c81611f98565b9150602083013561208c81612050565b809150509250929050565b600080604083850312156120aa57600080fd5b823560ff81168114611fcb57600080fd5b600080604083850312156120ce57600080fd5b82356120d981611f98565b9150602083013561208c81611f98565b600181811c908216806120fd57607f821691505b6020821081036119f657634e487b7160e01b600052602260045260246000fd5b60006020828403121561212f57600080fd5b8151611dc381612050565b6020808252602c908201527f43616c6c6572206973206e6f7420746865206f70657261746f72206f7220746860408201526b6520746178206f666669636560a01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600082198211156121af576121af612186565b500190565b60208082526016908201527521b0b63632b91034b9903737ba1037b832b930ba37b960511b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601c908201527f43616c6c6572206973206e6f742074686520746178206f666669636500000000604082015260600190565b6020808252602a908201527f496e6465782068617320746f206c6f776572207468616e20636f756e74206f666040820152692074617820746965727360b01b606082015260800190565b600060ff821660ff8416808210156122b4576122b4612186565b90039392505050565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff84168060ff038211156122f0576122f0612186565b019392505050565b60006020828403121561230a57600080fd5b81516001600160901b0381168114611dc357600080fd5b600060ff82168061233457612334612186565b6000190192915050565b60008282101561235057612350612186565b500390565b600081600019048311821515161561236f5761236f612186565b500290565b60008261239157634e487b7160e01b600052601260045260246000fd5b50049056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212200e925188d5c9f001fe293d199f188c6e964aa32ac7053dc9a138e9574527c9eb64736f6c634300080f0033000000000000000000000000ff71e8910fe9b1c7e6c4f926b696b7ac30f74daa0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000c4cb95e1a49f072febc0b039482b7e71fe86a4a6
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000ff71e8910fe9b1c7e6c4f926b696b7ac30f74daa0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000c4cb95e1a49f072febc0b039482b7e71fe86a4a6
-----Decoded View---------------
Arg [0] : _treasury (address): 0xff71e8910fe9b1c7e6c4f926b696b7ac30f74daa
Arg [1] : _taxRate (uint256): 20
Arg [2] : _taxCollectorAddress (address): 0xc4cb95e1a49f072febc0b039482b7e71fe86a4a6
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000ff71e8910fe9b1c7e6c4f926b696b7ac30f74daa
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000014
Arg [2] : 000000000000000000000000c4cb95e1a49f072febc0b039482b7e71fe86a4a6