Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 385 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Rebase | 21237626 | 91 days ago | IN | 0 ETH | 0.01136929 | ||||
Rebase | 21234037 | 91 days ago | IN | 0 ETH | 0.00828996 | ||||
Rebase | 21230550 | 92 days ago | IN | 0 ETH | 0.01262105 | ||||
Rebase | 21227002 | 92 days ago | IN | 0 ETH | 0.00657425 | ||||
Rebase | 21223375 | 93 days ago | IN | 0 ETH | 0.02069031 | ||||
Rebase | 19199237 | 376 days ago | IN | 0 ETH | 0.03139113 | ||||
Rebase | 19195649 | 376 days ago | IN | 0 ETH | 0.02547172 | ||||
Rebase | 19188538 | 377 days ago | IN | 0 ETH | 0.03697515 | ||||
Rebase | 19188509 | 377 days ago | IN | 0 ETH | 0.04105563 | ||||
Rebase | 19185005 | 378 days ago | IN | 0 ETH | 0.06575458 | ||||
Rebase | 19184948 | 378 days ago | IN | 0 ETH | 0.06817192 | ||||
Rebase | 19174252 | 379 days ago | IN | 0 ETH | 0.01977223 | ||||
Rebase | 19170716 | 380 days ago | IN | 0 ETH | 0.02880782 | ||||
Rebase | 19167138 | 380 days ago | IN | 0 ETH | 0.01245315 | ||||
Rebase | 19163563 | 381 days ago | IN | 0 ETH | 0.01995558 | ||||
Rebase | 19160021 | 381 days ago | IN | 0 ETH | 0.0097485 | ||||
Rebase | 19152897 | 382 days ago | IN | 0 ETH | 0.0138416 | ||||
Rebase | 12096499 | 1430 days ago | IN | 0 ETH | 0.19859806 | ||||
Rebase | 11950464 | 1452 days ago | IN | 0 ETH | 0.05810954 | ||||
Rebase | 11943991 | 1453 days ago | IN | 0 ETH | 0.10263403 | ||||
Rebase | 11937481 | 1454 days ago | IN | 0 ETH | 0.06707578 | ||||
Rebase | 11930939 | 1455 days ago | IN | 0 ETH | 0.09366744 | ||||
Rebase | 11924427 | 1456 days ago | IN | 0 ETH | 0.11394802 | ||||
Rebase | 11904973 | 1459 days ago | IN | 0 ETH | 0.11083176 | ||||
Rebase | 11898425 | 1460 days ago | IN | 0 ETH | 0.08494405 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Orchestrator
Compiler Version
v0.4.24+commit.e67f0147
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2020-09-22 */ // File: zos-lib/contracts/Initializable.sol pragma solidity >=0.4.24 <0.6.0; /** * @title Initializable * * @dev Helper contract to support initializer functions. To use it, replace * the constructor with a function that has the `initializer` modifier. * WARNING: Unlike constructors, initializer functions must be manually * invoked. This applies both to deploying an Initializable contract, as well * as extending an Initializable contract via inheritance. * WARNING: When used with inheritance, manual care must be taken to not invoke * a parent initializer twice, or ensure that all initializers are idempotent, * because this is not dealt with automatically as with constructors. */ contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private initializing; /** * @dev Modifier to use in the initializer function of a contract. */ modifier initializer() { require(initializing || isConstructor() || !initialized, "Contract instance has already been initialized"); bool isTopLevelCall = !initializing; if (isTopLevelCall) { initializing = true; initialized = true; } _; if (isTopLevelCall) { initializing = false; } } /// @dev Returns true if and only if the function is running in the constructor function isConstructor() private view returns (bool) { // extcodesize checks the size of the code stored in an address, and // address returns the current address. Since the code is still not // deployed when running a constructor, any checks on its code size will // yield zero, making it an effective way to detect if a contract is // under construction or not. uint256 cs; assembly { cs := extcodesize(address) } return cs == 0; } // Reserved storage space to allow for layout changes in the future. uint256[50] private ______gap; } // File: openzeppelin-eth/contracts/ownership/Ownable.sol pragma solidity ^0.4.24; /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable is Initializable { address private _owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function initialize(address sender) public initializer { _owner = sender; } /** * @return the address of the owner. */ function owner() public view returns(address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner()); _; } /** * @return true if `msg.sender` is the owner of the contract. */ function isOwner() public view returns(bool) { return msg.sender == _owner; } /** * @dev Allows the current owner to relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */ function renounceOwnership() public onlyOwner { emit OwnershipRenounced(_owner); _owner = address(0); } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0)); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } uint256[50] private ______gap; } // File: contracts/lib/SafeMathInt.sol /* MIT License Copyright (c) 2018 requestnetwork Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ pragma solidity >=0.4.24; /** * @title SafeMathInt * @dev Math operations for int256 with overflow safety checks. */ library SafeMathInt { int256 private constant MIN_INT256 = int256(1) << 255; int256 private constant MAX_INT256 = ~(int256(1) << 255); /** * @dev Multiplies two int256 variables and fails on overflow. */ function mul(int256 a, int256 b) internal pure returns (int256) { int256 c = a * b; // Detect overflow when multiplying MIN_INT256 with -1 require(c != MIN_INT256 || (a & MIN_INT256) != (b & MIN_INT256)); require((b == 0) || (c / b == a)); return c; } /** * @dev Division of two int256 variables and fails on overflow. */ function div(int256 a, int256 b) internal pure returns (int256) { // Prevent overflow when dividing MIN_INT256 by -1 require(b != -1 || a != MIN_INT256); // Solidity already throws when dividing by 0. return a / b; } /** * @dev Subtracts two int256 variables and fails on overflow. */ function sub(int256 a, int256 b) internal pure returns (int256) { int256 c = a - b; require((b >= 0 && c <= a) || (b < 0 && c > a)); return c; } /** * @dev Adds two int256 variables and fails on overflow. */ function add(int256 a, int256 b) internal pure returns (int256) { int256 c = a + b; require((b >= 0 && c >= a) || (b < 0 && c < a)); return c; } /** * @dev Converts to absolute value, and fails on overflow. */ function abs(int256 a) internal pure returns (int256) { require(a != MIN_INT256); return a < 0 ? -a : a; } } // File: contracts/lib/UInt256Lib.sol pragma solidity >=0.4.24; /** * @title Various utilities useful for uint256. */ library UInt256Lib { uint256 private constant MAX_INT256 = ~(uint256(1) << 255); /** * @dev Safely converts a uint256 to an int256. */ function toInt256Safe(uint256 a) internal pure returns (int256) { require(a <= MAX_INT256); return int256(a); } } // File: contracts/interface/ISeigniorageShares.sol pragma solidity >=0.4.24; interface ISeigniorageShares { function setDividendPoints(address account, uint256 totalDividends) external returns (bool); function mintShares(address account, uint256 amount) external returns (bool); function lastDividendPoints(address who) external view returns (uint256); function externalRawBalanceOf(address who) external view returns (uint256); function externalTotalSupply() external view returns (uint256); } // File: openzeppelin-eth/contracts/math/SafeMath.sol pragma solidity ^0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on 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-solidity/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b); return c; } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0); // Solidity only automatically asserts when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } /** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; } } // File: openzeppelin-eth/contracts/token/ERC20/IERC20.sol pragma solidity ^0.4.24; /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); event Transfer( address indexed from, address indexed to, uint256 value ); event Approval( address indexed owner, address indexed spender, uint256 value ); } // File: openzeppelin-eth/contracts/token/ERC20/ERC20Detailed.sol pragma solidity ^0.4.24; /** * @title ERC20Detailed token * @dev The decimals are only for visualization purposes. * All the operations are done using the smallest and indivisible token unit, * just as on Ethereum all the operations are done in wei. */ contract ERC20Detailed is Initializable, IERC20 { string private _name; string private _symbol; uint8 private _decimals; function initialize(string name, string symbol, uint8 decimals) public initializer { _name = name; _symbol = symbol; _decimals = decimals; } /** * @return the name of the token. */ function name() public view returns(string) { return _name; } /** * @return the symbol of the token. */ function symbol() public view returns(string) { return _symbol; } /** * @return the number of decimals of the token. */ function decimals() public view returns(uint8) { return _decimals; } uint256[50] private ______gap; } // File: contracts/dollars.sol pragma solidity >=0.4.24; interface IDollarPolicy { function getUsdSharePrice() external view returns (uint256 price); } /* * Dollar ERC20 */ contract Dollars is ERC20Detailed, Ownable { using SafeMath for uint256; using SafeMathInt for int256; event LogRebase(uint256 indexed epoch, uint256 totalSupply); event LogContraction(uint256 indexed epoch, uint256 dollarsToBurn); event LogRebasePaused(bool paused); event LogBurn(address indexed from, uint256 value); event LogClaim(address indexed from, uint256 value); event LogMonetaryPolicyUpdated(address monetaryPolicy); // Used for authentication address public monetaryPolicy; address public sharesAddress; modifier onlyMonetaryPolicy() { require(msg.sender == monetaryPolicy); _; } // Precautionary emergency controls. bool public rebasePaused; modifier whenRebaseNotPaused() { require(!rebasePaused); _; } // coins needing to be burned (9 decimals) uint256 private _remainingDollarsToBeBurned; modifier validRecipient(address to) { require(to != address(0x0)); require(to != address(this)); _; } uint256 private constant DECIMALS = 9; uint256 private constant MAX_UINT256 = ~uint256(0); uint256 private constant INITIAL_DOLLAR_SUPPLY = 1 * 10**6 * 10**DECIMALS; uint256 private _maxDiscount; modifier validDiscount(uint256 discount) { require(discount <= _maxDiscount, 'DISCOUNT_TOO_HIGH'); _; } uint256 private constant MAX_SUPPLY = ~uint128(0); // (2^128) - 1 uint256 private _totalSupply; uint256 private constant POINT_MULTIPLIER = 10 ** 9; uint256 private _totalDividendPoints; uint256 private _unclaimedDividends; ISeigniorageShares shares; mapping(address => uint256) private _dollarBalances; // This is denominated in Dollars, because the cents-dollars conversion might change before // it's fully paid. mapping (address => mapping (address => uint256)) private _allowedDollars; IDollarPolicy dollarPolicy; uint256 public burningDiscount; // percentage (10 ** 9 Decimals) uint256 public defaultDiscount; // discount on first negative rebase uint256 public defaultDailyBonusDiscount; // how much the discount increases per day for consecutive contractions uint256 public minimumBonusThreshold; bool reEntrancyMutex; bool reEntrancyRebaseMutex; address public uniswapV2Pool; modifier uniqueAddresses(address addr1, address addr2) { require(addr1 != addr2, "Addresses are not unique"); _; } /** * @param monetaryPolicy_ The address of the monetary policy contract to use for authentication. */ function setMonetaryPolicy(address monetaryPolicy_) external onlyOwner { monetaryPolicy = monetaryPolicy_; dollarPolicy = IDollarPolicy(monetaryPolicy_); emit LogMonetaryPolicyUpdated(monetaryPolicy_); } function setUniswapV2SyncAddress(address uniswapV2Pair_) external onlyOwner { uniswapV2Pool = uniswapV2Pair_; } function test() external onlyOwner { uniswapV2Pool.call(abi.encodeWithSignature('sync()')); } function setBurningDiscount(uint256 discount) external onlyOwner validDiscount(discount) { burningDiscount = discount; } // amount in is 10 ** 9 decimals function burn(uint256 amount) external updateAccount(msg.sender) { require(!reEntrancyMutex, "RE-ENTRANCY GUARD MUST BE FALSE"); reEntrancyMutex = true; require(amount != 0, 'AMOUNT_MUST_BE_POSITIVE'); require(_remainingDollarsToBeBurned != 0, 'COIN_BURN_MUST_BE_GREATER_THAN_ZERO'); require(amount <= _dollarBalances[msg.sender], 'INSUFFICIENT_DOLLAR_BALANCE'); require(amount <= _remainingDollarsToBeBurned, 'AMOUNT_MUST_BE_LESS_THAN_OR_EQUAL_TO_REMAINING_COINS'); _burn(msg.sender, amount); reEntrancyMutex = false; } function setDefaultDiscount(uint256 discount) external onlyOwner validDiscount(discount) { defaultDiscount = discount; } function setMaxDiscount(uint256 discount) external onlyOwner { _maxDiscount = discount; } function setDefaultDailyBonusDiscount(uint256 discount) external onlyOwner validDiscount(discount) { defaultDailyBonusDiscount = discount; } /** * @dev Pauses or unpauses the execution of rebase operations. * @param paused Pauses rebase operations if this is true. */ function setRebasePaused(bool paused) external onlyOwner { rebasePaused = paused; emit LogRebasePaused(paused); } // action of claiming funds function claimDividends(address account) external updateAccount(account) returns (uint256) { uint256 owing = dividendsOwing(account); return owing; } function setMinimumBonusThreshold(uint256 minimum) external onlyOwner { require(minimum < _totalSupply, 'MINIMUM_TOO_HIGH'); minimumBonusThreshold = minimum; } /** * @dev Notifies Dollars contract about a new rebase cycle. * @param supplyDelta The number of new dollar tokens to add into circulation via expansion. * @return The total number of dollars after the supply adjustment. */ function rebase(uint256 epoch, int256 supplyDelta) external onlyMonetaryPolicy whenRebaseNotPaused returns (uint256) { reEntrancyRebaseMutex = true; uint256 burningDefaultDiscount = burningDiscount.add(defaultDailyBonusDiscount); if (supplyDelta == 0) { if (_remainingDollarsToBeBurned > minimumBonusThreshold) { burningDiscount = burningDefaultDiscount > _maxDiscount ? _maxDiscount : burningDefaultDiscount; } else { burningDiscount = defaultDiscount; } emit LogRebase(epoch, _totalSupply); } else if (supplyDelta < 0) { uint256 dollarsToBurn = uint256(supplyDelta.abs()); uint256 tenPercent = _totalSupply.div(10); if (dollarsToBurn > tenPercent) { // maximum contraction is 10% of the total USD Supply dollarsToBurn = tenPercent; } if (dollarsToBurn.add(_remainingDollarsToBeBurned) > _totalSupply) { dollarsToBurn = _totalSupply.sub(_remainingDollarsToBeBurned); } if (_remainingDollarsToBeBurned > minimumBonusThreshold) { burningDiscount = burningDefaultDiscount > _maxDiscount ? _maxDiscount : burningDefaultDiscount; } else { burningDiscount = defaultDiscount; // default 1% } _remainingDollarsToBeBurned = _remainingDollarsToBeBurned.add(dollarsToBurn); emit LogContraction(epoch, dollarsToBurn); } else { disburse(uint256(supplyDelta)); uniswapV2Pool.call(abi.encodeWithSignature('sync()')); emit LogRebase(epoch, _totalSupply); if (_totalSupply > MAX_SUPPLY) { _totalSupply = MAX_SUPPLY; } } reEntrancyRebaseMutex = false; return _totalSupply; } function initialize(address owner_, address seigniorageAddress) public initializer { ERC20Detailed.initialize("Dollars", "USD", uint8(DECIMALS)); Ownable.initialize(owner_); rebasePaused = false; _totalSupply = INITIAL_DOLLAR_SUPPLY; sharesAddress = seigniorageAddress; shares = ISeigniorageShares(seigniorageAddress); _dollarBalances[owner_] = _totalSupply; _maxDiscount = 50 * 10 ** 9; // 50% defaultDiscount = 1 * 10 ** 9; // 1% burningDiscount = defaultDiscount; defaultDailyBonusDiscount = 1 * 10 ** 9; // 1% minimumBonusThreshold = 100 * 10 ** 9; // 100 dollars is the minimum threshold. Anything above warrants increased discount emit Transfer(address(0x0), owner_, _totalSupply); } function dividendsOwing(address account) public view returns (uint256) { if (_totalDividendPoints > shares.lastDividendPoints(account)) { uint256 newDividendPoints = _totalDividendPoints.sub(shares.lastDividendPoints(account)); uint256 sharesBalance = shares.externalRawBalanceOf(account); return sharesBalance.mul(newDividendPoints).div(POINT_MULTIPLIER); } else { return 0; } } // auto claim modifier // if user is owned, we pay out immedietly // if user is not owned, we prevent them from claiming until the next rebase modifier updateAccount(address account) { uint256 owing = dividendsOwing(account); if (owing != 0) { _unclaimedDividends = _unclaimedDividends.sub(owing); _dollarBalances[account] += owing; } shares.setDividendPoints(account, _totalDividendPoints); emit LogClaim(account, owing); _; } /** * @return The total number of dollars. */ function totalSupply() public view returns (uint256) { return _totalSupply; } /** * @param who The address to query. * @return The balance of the specified address. */ function balanceOf(address who) public view returns (uint256) { return _dollarBalances[who].add(dividendsOwing(who)); } function getRemainingDollarsToBeBurned() public view returns (uint256) { return _remainingDollarsToBeBurned; } /** * @dev Transfer tokens to a specified address. * @param to The address to transfer to. * @param value The amount to be transferred. * @return True on success, false otherwise. */ function transfer(address to, uint256 value) public uniqueAddresses(msg.sender, to) validRecipient(to) updateAccount(msg.sender) updateAccount(to) returns (bool) { require(!reEntrancyRebaseMutex, "RE-ENTRANCY GUARD MUST BE FALSE"); _dollarBalances[msg.sender] = _dollarBalances[msg.sender].sub(value); _dollarBalances[to] = _dollarBalances[to].add(value); emit Transfer(msg.sender, to, value); return true; } /** * @dev Function to check the amount of tokens that an owner has allowed to a spender. * @param owner_ The address which owns the funds. * @param spender The address which will spend the funds. * @return The number of tokens still available for the spender. */ function allowance(address owner_, address spender) public view returns (uint256) { return _allowedDollars[owner_][spender]; } /** * @dev Transfer tokens from one address to another. * @param from The address you want to send tokens from. * @param to The address you want to transfer to. * @param value The amount of tokens to be transferred. */ function transferFrom(address from, address to, uint256 value) public validRecipient(to) updateAccount(from) updateAccount(msg.sender) updateAccount(to) returns (bool) { require(!reEntrancyRebaseMutex, "RE-ENTRANCY GUARD MUST BE FALSE"); _allowedDollars[from][msg.sender] = _allowedDollars[from][msg.sender].sub(value); _dollarBalances[from] = _dollarBalances[from].sub(value); _dollarBalances[to] = _dollarBalances[to].add(value); emit Transfer(from, to, value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of * msg.sender. This method is included for ERC20 compatibility. * increaseAllowance and decreaseAllowance should be used instead. * Changing an allowance with this method brings the risk that someone may transfer both * the old and the new allowance - if they are both greater than zero - if a transfer * transaction is mined before the later approve() call is mined. * * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. */ function approve(address spender, uint256 value) public uniqueAddresses(msg.sender, spender) validRecipient(spender) updateAccount(msg.sender) updateAccount(spender) returns (bool) { _allowedDollars[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; } /** * @dev Increase the amount of tokens that an owner has allowed to a spender. * This method should be used instead of approve() to avoid the double approval vulnerability * described above. * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance(address spender, uint256 addedValue) public uniqueAddresses(msg.sender, spender) updateAccount(msg.sender) updateAccount(spender) returns (bool) { _allowedDollars[msg.sender][spender] = _allowedDollars[msg.sender][spender].add(addedValue); emit Approval(msg.sender, spender, _allowedDollars[msg.sender][spender]); return true; } /** * @dev Decrease the amount of tokens that an owner has allowed to a spender. * * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseAllowance(address spender, uint256 subtractedValue) public uniqueAddresses(msg.sender, spender) updateAccount(spender) updateAccount(msg.sender) returns (bool) { uint256 oldValue = _allowedDollars[msg.sender][spender]; if (subtractedValue >= oldValue) { _allowedDollars[msg.sender][spender] = 0; } else { _allowedDollars[msg.sender][spender] = oldValue.sub(subtractedValue); } emit Approval(msg.sender, spender, _allowedDollars[msg.sender][spender]); return true; } function consultBurn(uint256 amount) public returns (uint256) { require(amount > 0, 'AMOUNT_MUST_BE_POSITIVE'); require(burningDiscount >= 0, 'DISCOUNT_NOT_VALID'); require(_remainingDollarsToBeBurned > 0, 'COIN_BURN_MUST_BE_GREATER_THAN_ZERO'); require(amount <= _dollarBalances[msg.sender].add(dividendsOwing(msg.sender)), 'INSUFFICIENT_DOLLAR_BALANCE'); require(amount <= _remainingDollarsToBeBurned, 'AMOUNT_MUST_BE_LESS_THAN_OR_EQUAL_TO_REMAINING_COINS'); uint256 usdPerShare = dollarPolicy.getUsdSharePrice(); // 1 share = x dollars uint256 decimals = 10 ** 9; uint256 percentDenominator = 100; usdPerShare = usdPerShare.sub(usdPerShare.mul(burningDiscount).div(percentDenominator * decimals)); // 10^9 uint256 sharesToMint = amount.mul(decimals).div(usdPerShare); // 10^9 return sharesToMint; } function unclaimedDividends() public view returns (uint256) { return _unclaimedDividends; } function totalDividendPoints() public view returns (uint256) { return _totalDividendPoints; } function disburse(uint256 amount) internal returns (bool) { _totalDividendPoints = _totalDividendPoints.add(amount.mul(POINT_MULTIPLIER).div(shares.externalTotalSupply())); _totalSupply = _totalSupply.add(amount); _unclaimedDividends = _unclaimedDividends.add(amount); return true; } function _burn(address account, uint256 amount) internal { _totalSupply = _totalSupply.sub(amount); _dollarBalances[account] = _dollarBalances[account].sub(amount); uint256 usdPerShare = dollarPolicy.getUsdSharePrice(); // 1 share = x dollars uint256 decimals = 10 ** 9; uint256 percentDenominator = 100; usdPerShare = usdPerShare.sub(usdPerShare.mul(burningDiscount).div(percentDenominator * decimals)); // 10^9 uint256 sharesToMint = amount.mul(decimals).div(usdPerShare); // 10^9 _remainingDollarsToBeBurned = _remainingDollarsToBeBurned.sub(amount); shares.mintShares(account, sharesToMint); emit Transfer(account, address(0), amount); emit LogBurn(account, amount); } } // File: contracts/dollarsPolicy.sol pragma solidity >=0.4.24; /* * Dollar Policy */ interface IDecentralizedOracle { function update() external; function consult(address token, uint amountIn) external view returns (uint amountOut); } contract DollarsPolicy is Ownable { using SafeMath for uint256; using SafeMathInt for int256; using UInt256Lib for uint256; event LogRebase( uint256 indexed epoch, uint256 exchangeRate, uint256 cpi, int256 requestedSupplyAdjustment, uint256 timestampSec ); Dollars public dollars; // Provides the current CPI, as an 18 decimal fixed point number. IDecentralizedOracle public sharesPerUsdOracle; IDecentralizedOracle public ethPerUsdOracle; IDecentralizedOracle public ethPerUsdcOracle; uint256 public deviationThreshold; uint256 public rebaseLag; uint256 private cpi; uint256 public minRebaseTimeIntervalSec; uint256 public lastRebaseTimestampSec; uint256 public rebaseWindowOffsetSec; uint256 public rebaseWindowLengthSec; uint256 public epoch; address WETH_ADDRESS; address SHARE_ADDRESS; uint256 private constant DECIMALS = 18; uint256 private constant MAX_RATE = 10**6 * 10**DECIMALS; uint256 private constant MAX_SUPPLY = ~(uint256(1) << 255) / MAX_RATE; address public orchestrator; bool private initializedOracle; modifier onlyOrchestrator() { require(msg.sender == orchestrator); _; } uint256 public minimumDollarCirculation; function getUsdSharePrice() external view returns (uint256) { sharesPerUsdOracle.update(); uint256 shareDecimals = 10 ** 9; uint256 sharePrice = sharesPerUsdOracle.consult(SHARE_ADDRESS, 1 * shareDecimals); // 10^9 decimals return sharePrice; } function rebase() external onlyOrchestrator { require(inRebaseWindow(), "OUTISDE_REBASE"); require(initializedOracle, 'ORACLE_NOT_INITIALIZED'); require(lastRebaseTimestampSec.add(minRebaseTimeIntervalSec) < now, "MIN_TIME_NOT_MET"); lastRebaseTimestampSec = now.sub( now.mod(minRebaseTimeIntervalSec)).add(rebaseWindowOffsetSec); epoch = epoch.add(1); sharesPerUsdOracle.update(); ethPerUsdOracle.update(); ethPerUsdcOracle.update(); uint256 wethDecimals = 10 ** 18; uint256 shareDecimals = 10 ** 9; uint256 ethUsdcPrice = ethPerUsdcOracle.consult(WETH_ADDRESS, 1 * wethDecimals); // 10^18 decimals ropsten, 10^6 mainnet uint256 ethUsdPrice = ethPerUsdOracle.consult(WETH_ADDRESS, 1 * wethDecimals); // 10^9 decimals uint256 dollarCoinExchangeRate = ethUsdcPrice.mul(10 ** 21) // 10^18 decimals, 10**9 ropsten, 10**21 on mainnet .div(ethUsdPrice); uint256 sharePrice = sharesPerUsdOracle.consult(SHARE_ADDRESS, 1 * shareDecimals); // 10^9 decimals uint256 shareExchangeRate = sharePrice.mul(dollarCoinExchangeRate).div(shareDecimals); // 10^18 decimals uint256 targetRate = cpi; if (dollarCoinExchangeRate > MAX_RATE) { dollarCoinExchangeRate = MAX_RATE; } // dollarCoinExchangeRate & targetRate arre 10^18 decimals int256 supplyDelta = computeSupplyDelta(dollarCoinExchangeRate, targetRate); // supplyDelta = 10^9 decimals // Apply the Dampening factor. // supplyDelta = supplyDelta.mul(10 ** 9).div(rebaseLag.toInt256Safe()); uint256 algorithmicLag_ = getAlgorithmicRebaseLag(supplyDelta); require(algorithmicLag_ != 0, "algorithmic rate must be positive"); rebaseLag = algorithmicLag_; supplyDelta = supplyDelta.mul(10 ** 9).div(algorithmicLag_.toInt256Safe()); // v 0.0.1 // check on the expansionary side if (supplyDelta > 0 && dollars.totalSupply().add(uint256(supplyDelta)) > MAX_SUPPLY) { supplyDelta = (MAX_SUPPLY.sub(dollars.totalSupply())).toInt256Safe(); } // check on the contraction side if (supplyDelta < 0 && dollars.getRemainingDollarsToBeBurned().add(uint256(supplyDelta.abs())) > MAX_SUPPLY) { supplyDelta = (MAX_SUPPLY.sub(dollars.getRemainingDollarsToBeBurned())).toInt256Safe(); } // set minimum floor if (supplyDelta < 0 && dollars.totalSupply().sub(dollars.getRemainingDollarsToBeBurned().add(uint256(supplyDelta.abs()))) < minimumDollarCirculation) { supplyDelta = (dollars.totalSupply().sub(dollars.getRemainingDollarsToBeBurned()).sub(minimumDollarCirculation)).toInt256Safe(); } uint256 supplyAfterRebase; if (supplyDelta < 0) { // contraction, we send the amount of shares to mint uint256 dollarsToBurn = uint256(supplyDelta.abs()); supplyAfterRebase = dollars.rebase(epoch, (dollarsToBurn).toInt256Safe().mul(-1)); } else { // expansion, we send the amount of dollars to mint supplyAfterRebase = dollars.rebase(epoch, supplyDelta); } assert(supplyAfterRebase <= MAX_SUPPLY); emit LogRebase(epoch, dollarCoinExchangeRate, cpi, supplyDelta, now); } function setOrchestrator(address orchestrator_) external onlyOwner { orchestrator = orchestrator_; } function setDeviationThreshold(uint256 deviationThreshold_) external onlyOwner { deviationThreshold = deviationThreshold_; } function setCpi(uint256 cpi_) external onlyOwner { require(cpi_ != 0); cpi = cpi_; } function setRebaseLag(uint256 rebaseLag_) external onlyOwner { require(rebaseLag_ != 0); rebaseLag = rebaseLag_; } function initializeOracles( address sharesPerUsdOracleAddress, address ethPerUsdOracleAddress, address ethPerUsdcOracleAddress ) external onlyOwner { require(!initializedOracle, 'ALREADY_INITIALIZED_ORACLE'); sharesPerUsdOracle = IDecentralizedOracle(sharesPerUsdOracleAddress); ethPerUsdOracle = IDecentralizedOracle(ethPerUsdOracleAddress); ethPerUsdcOracle = IDecentralizedOracle(ethPerUsdcOracleAddress); initializedOracle = true; } function changeOracles( address sharesPerUsdOracleAddress, address ethPerUsdOracleAddress, address ethPerUsdcOracleAddress ) external onlyOwner { sharesPerUsdOracle = IDecentralizedOracle(sharesPerUsdOracleAddress); ethPerUsdOracle = IDecentralizedOracle(ethPerUsdOracleAddress); ethPerUsdcOracle = IDecentralizedOracle(ethPerUsdcOracleAddress); } function setWethAddress(address wethAddress) external onlyOwner { WETH_ADDRESS = wethAddress; } function setShareAddress(address shareAddress) external onlyOwner { SHARE_ADDRESS = shareAddress; } function setMinimumDollarCirculation(uint256 minimumDollarCirculation_) external onlyOwner { minimumDollarCirculation = minimumDollarCirculation_; } function setRebaseTimingParameters( uint256 minRebaseTimeIntervalSec_, uint256 rebaseWindowOffsetSec_, uint256 rebaseWindowLengthSec_) external onlyOwner { require(minRebaseTimeIntervalSec_ != 0); require(rebaseWindowOffsetSec_ < minRebaseTimeIntervalSec_); minRebaseTimeIntervalSec = minRebaseTimeIntervalSec_; rebaseWindowOffsetSec = rebaseWindowOffsetSec_; rebaseWindowLengthSec = rebaseWindowLengthSec_; } function initialize(address owner_, Dollars dollars_) public initializer { Ownable.initialize(owner_); deviationThreshold = 5 * 10 ** (DECIMALS-2); rebaseLag = 50 * 10 ** 9; minRebaseTimeIntervalSec = 1 days; rebaseWindowOffsetSec = 63000; // with stock market, 63000 for 1:30pm EST (debug) rebaseWindowLengthSec = 15 minutes; lastRebaseTimestampSec = 0; cpi = 1 * 10 ** 18; epoch = 0; minimumDollarCirculation = 1000000 * 10 ** 9; // 1M minimum dollar circulation dollars = dollars_; } // takes current marketcap of USD and calculates the algorithmic rebase lag // returns 10 ** 9 rebase lag factor function getAlgorithmicRebaseLag(int256 supplyDelta) public view returns (uint256) { if (dollars.totalSupply() >= 30000000 * 10 ** 9) { return 30 * 10 ** 9; } else { if (supplyDelta < 0) { uint256 dollarsToBurn = uint256(supplyDelta.abs()); // 1.238453076e15 return uint256(100 * 10 ** 9).sub((dollars.totalSupply().sub(1000000 * 10 ** 9)).div(500000)); } else { return uint256(29).mul(dollars.totalSupply().sub(1000000 * 10 ** 9)).div(35000000).add(1 * 10 ** 9); } } } function inRebaseWindow() public view returns (bool) { return ( now.mod(minRebaseTimeIntervalSec) >= rebaseWindowOffsetSec && now.mod(minRebaseTimeIntervalSec) < (rebaseWindowOffsetSec.add(rebaseWindowLengthSec)) ); } function computeSupplyDelta(uint256 rate, uint256 targetRate) private view returns (int256) { if (withinDeviationThreshold(rate, targetRate)) { return 0; } int256 targetRateSigned = targetRate.toInt256Safe(); return dollars.totalSupply().toInt256Safe() .mul(rate.toInt256Safe().sub(targetRateSigned)) .div(targetRateSigned); } function withinDeviationThreshold(uint256 rate, uint256 targetRate) private view returns (bool) { uint256 absoluteDeviationThreshold = targetRate.mul(deviationThreshold) .div(10 ** DECIMALS); return (rate >= targetRate && rate.sub(targetRate) < absoluteDeviationThreshold) || (rate < targetRate && targetRate.sub(rate) < absoluteDeviationThreshold); } } // File: contracts/orchestrator.sol pragma solidity >=0.4.24; /* * Orchestrator */ contract Orchestrator is Ownable { struct Transaction { bool enabled; address destination; bytes data; } event TransactionFailed(address indexed destination, uint index, bytes data); Transaction[] public transactions; DollarsPolicy public policy; constructor(address policy_) public { Ownable.initialize(msg.sender); policy = DollarsPolicy(policy_); } function rebase() external { require(msg.sender == tx.origin); // solhint-disable-line avoid-tx-origin policy.rebase(); for (uint i = 0; i < transactions.length; i++) { Transaction storage t = transactions[i]; if (t.enabled) { bool result = externalCall(t.destination, t.data); if (!result) { emit TransactionFailed(t.destination, i, t.data); revert("Transaction Failed"); } } } } function addTransaction(address destination, bytes data) external onlyOwner { transactions.push(Transaction({ enabled: true, destination: destination, data: data })); } function removeTransaction(uint index) external onlyOwner { require(index < transactions.length, "index out of bounds"); if (index < transactions.length - 1) { transactions[index] = transactions[transactions.length - 1]; } transactions.length--; } function setTransactionEnabled(uint index, bool enabled) external onlyOwner { require(index < transactions.length, "index must be in range of stored tx list"); transactions[index].enabled = enabled; } function transactionsSize() external view returns (uint256) { return transactions.length; } function externalCall(address destination, bytes data) internal returns (bool) { bool result; assembly { // solhint-disable-line no-inline-assembly // "Allocate" memory for output // (0x40 is where "free memory" pointer is stored by convention) let outputAddress := mload(0x40) // First 32 bytes are the padded length of data, so exclude that let dataAddress := add(data, 32) result := call( // 34710 is the value that solidity is currently emitting // It includes callGas (700) + callVeryLow (3, to pay for SUB) // + callValueTransferGas (9000) + callNewAccountGas // (25000, in case the destination address does not exist and needs creating) sub(gas, 34710), destination, 0, // transfer value in wei dataAddress, mload(data), // Size of the input, in bytes. Stored in position 0 of the array. outputAddress, 0 // Output is ignored, therefore the output size is zero ) } return result; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"policy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"destination","type":"address"},{"name":"data","type":"bytes"}],"name":"addTransaction","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"index","type":"uint256"}],"name":"removeTransaction","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"index","type":"uint256"},{"name":"enabled","type":"bool"}],"name":"setTransactionEnabled","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"transactionsSize","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"transactions","outputs":[{"name":"enabled","type":"bool"},{"name":"destination","type":"address"},{"name":"data","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"rebase","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"sender","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"policy_","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"destination","type":"address"},{"indexed":false,"name":"index","type":"uint256"},{"indexed":false,"name":"data","type":"bytes"}],"name":"TransactionFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"}],"name":"OwnershipRenounced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]
Contract Creation Code
608060405234801561001057600080fd5b50604051602080610f298339810160405251610038336401000000006109d861005d82021704565b60678054600160a060020a031916600160a060020a0392909216919091179055610184565b60008054610100900460ff1680610080575061008064010000000061017e810204565b8061008e575060005460ff16155b151561012157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560448201527f656e20696e697469616c697a6564000000000000000000000000000000000000606482015290519081900360840190fd5b50600054610100900460ff1615801561014d576000805460ff1961ff0019909116610100171660011790555b60338054600160a060020a031916600160a060020a038416179055801561017a576000805461ff00191690555b5050565b303b1590565b610d96806101936000396000f3006080604052600436106100b95763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630505c8c981146100be578063126e19be146100ef57806346c3bd1f1461011e5780636e9dde9914610136578063715018a6146101535780638da5cb5b146101685780638f32d59b1461017d57806391d4ec18146101a65780639ace38c2146101cd578063af14052c14610281578063c4d66de814610296578063f2fde38b146102b7575b600080fd5b3480156100ca57600080fd5b506100d36102d8565b60408051600160a060020a039092168252519081900360200190f35b3480156100fb57600080fd5b5061011c60048035600160a060020a031690602480359081019101356102e7565b005b34801561012a57600080fd5b5061011c6004356103d5565b34801561014257600080fd5b5061011c6004356024351515610518565b34801561015f57600080fd5b5061011c6105dd565b34801561017457600080fd5b506100d3610647565b34801561018957600080fd5b50610192610657565b604080519115158252519081900360200190f35b3480156101b257600080fd5b506101bb610668565b60408051918252519081900360200190f35b3480156101d957600080fd5b506101e560043561066e565b604051808415151515815260200183600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561024457818101518382015260200161022c565b50505050905090810190601f1680156102715780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b34801561028d57600080fd5b5061011c610734565b3480156102a257600080fd5b5061011c600160a060020a03600435166109d8565b3480156102c357600080fd5b5061011c600160a060020a0360043516610ae5565b606754600160a060020a031681565b6102ef610657565b15156102fa57600080fd5b606660606040519081016040528060011515815260200185600160a060020a0316815260200184848080601f0160208091040260200160405190810160405280939291908181526020018383808284375050509290935250508254600181810180865560009586526020958690208551600290940201805487870151600160a060020a03166101000274ffffffffffffffffffffffffffffffffffffffff001995151560ff1990921691909117949094169390931783556040850151805191969394506103cc93928501920190610baf565b50505050505050565b6103dd610657565b15156103e857600080fd5b6066548110610441576040805160e560020a62461bcd02815260206004820152601360248201527f696e646578206f7574206f6620626f756e647300000000000000000000000000604482015290519081900360640190fd5b606654600019018110156105015760668054600019810190811061046157fe5b906000526020600020906002020160668281548110151561047e57fe5b6000918252602090912082546002928302909101805460ff191660ff909216151591909117808255835474ffffffffffffffffffffffffffffffffffffffff001990911661010091829004600160a060020a031682021782556001808501805493946104fd948387019492938116159092026000190190911604610c29565b5050505b6066805490610514906000198301610c9e565b5050565b610520610657565b151561052b57600080fd5b60665482106105aa576040805160e560020a62461bcd02815260206004820152602860248201527f696e646578206d75737420626520696e2072616e6765206f662073746f72656460448201527f207478206c697374000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b806066838154811015156105ba57fe5b60009182526020909120600290910201805460ff19169115159190911790555050565b6105e5610657565b15156105f057600080fd5b603354604051600160a060020a03909116907ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482090600090a26033805473ffffffffffffffffffffffffffffffffffffffff19169055565b603354600160a060020a03165b90565b603354600160a060020a0316331490565b60665490565b606680548290811061067c57fe5b6000918252602091829020600291820201805460018083018054604080516101009483161585026000190190921696909604601f810188900488028201880190965285815260ff8416975091909204600160a060020a0316949293909283018282801561072a5780601f106106ff5761010080835404028352916020019161072a565b820191906000526020600020905b81548152906001019060200180831161070d57829003601f168201915b5050505050905083565b6000808033321461074457600080fd5b606760009054906101000a9004600160a060020a0316600160a060020a031663af14052c6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b1580156107b057600080fd5b505af11580156107c4573d6000803e3d6000fd5b50505050600092505b6066548310156109d35760668054849081106107e557fe5b60009182526020909120600290910201805490925060ff16156109c85781546001808401805460408051602060026101009685161587026000190190941693909304601f81018490048402820184019092528181526108a99594909404600160a060020a031693929183018282801561089f5780601f106108745761010080835404028352916020019161089f565b820191906000526020600020905b81548152906001019060200180831161088257829003601f168201915b5050505050610b04565b90508015156109c8578154604080518581526020810182815260018087018054600261010093821615840260001901909116049484018590529404600160a060020a0316937f8091ecaaa54ebb82e02d36c2c336528e0fcb9b3430fc1291ac88295032b9c2639388939192906060830190849080156109695780601f1061093e57610100808354040283529160200191610969565b820191906000526020600020905b81548152906001019060200180831161094c57829003601f168201915b5050935050505060405180910390a26040805160e560020a62461bcd02815260206004820152601260248201527f5472616e73616374696f6e204661696c65640000000000000000000000000000604482015290519081900360640190fd5b6001909201916107cd565b505050565b60008054610100900460ff16806109f257506109f2610b27565b80610a00575060005460ff16155b1515610a7c576040805160e560020a62461bcd02815260206004820152602e60248201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560448201527f656e20696e697469616c697a6564000000000000000000000000000000000000606482015290519081900360840190fd5b50600054610100900460ff16158015610aa8576000805460ff1961ff0019909116610100171660011790555b6033805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0384161790558015610514576000805461ff00191690555050565b610aed610657565b1515610af857600080fd5b610b0181610b31565b50565b6000806040516020840160008286518360008a6187965a03f19695505050505050565b303b8015905b5090565b600160a060020a0381161515610b4657600080fd5b603354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36033805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610bf057805160ff1916838001178555610c1d565b82800160010185558215610c1d579182015b82811115610c1d578251825591602001919060010190610c02565b50610b2d929150610cca565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610c625780548555610c1d565b82800160010185558215610c1d57600052602060002091601f016020900482015b82811115610c1d578254825591600101919060010190610c83565b8154818355818111156109d3576002028160020283600052602060002091820191016109d39190610ce4565b61065491905b80821115610b2d5760008155600101610cd0565b61065491905b80821115610b2d57805474ffffffffffffffffffffffffffffffffffffffffff191681556000610d1d6001830182610d26565b50600201610cea565b50805460018160011615610100020316600290046000825580601f10610d4c5750610b01565b601f016020900490600052602060002090810190610b019190610cca5600a165627a7a723058200942c77a2ab7e93400031e10c31c2baef60040cff11af9ba2f34e8b0c0d18f7c0029000000000000000000000000452a3f4a4e8e81b619d88c2b44bd160ce8b4fc03
Deployed Bytecode
0x6080604052600436106100b95763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630505c8c981146100be578063126e19be146100ef57806346c3bd1f1461011e5780636e9dde9914610136578063715018a6146101535780638da5cb5b146101685780638f32d59b1461017d57806391d4ec18146101a65780639ace38c2146101cd578063af14052c14610281578063c4d66de814610296578063f2fde38b146102b7575b600080fd5b3480156100ca57600080fd5b506100d36102d8565b60408051600160a060020a039092168252519081900360200190f35b3480156100fb57600080fd5b5061011c60048035600160a060020a031690602480359081019101356102e7565b005b34801561012a57600080fd5b5061011c6004356103d5565b34801561014257600080fd5b5061011c6004356024351515610518565b34801561015f57600080fd5b5061011c6105dd565b34801561017457600080fd5b506100d3610647565b34801561018957600080fd5b50610192610657565b604080519115158252519081900360200190f35b3480156101b257600080fd5b506101bb610668565b60408051918252519081900360200190f35b3480156101d957600080fd5b506101e560043561066e565b604051808415151515815260200183600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561024457818101518382015260200161022c565b50505050905090810190601f1680156102715780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b34801561028d57600080fd5b5061011c610734565b3480156102a257600080fd5b5061011c600160a060020a03600435166109d8565b3480156102c357600080fd5b5061011c600160a060020a0360043516610ae5565b606754600160a060020a031681565b6102ef610657565b15156102fa57600080fd5b606660606040519081016040528060011515815260200185600160a060020a0316815260200184848080601f0160208091040260200160405190810160405280939291908181526020018383808284375050509290935250508254600181810180865560009586526020958690208551600290940201805487870151600160a060020a03166101000274ffffffffffffffffffffffffffffffffffffffff001995151560ff1990921691909117949094169390931783556040850151805191969394506103cc93928501920190610baf565b50505050505050565b6103dd610657565b15156103e857600080fd5b6066548110610441576040805160e560020a62461bcd02815260206004820152601360248201527f696e646578206f7574206f6620626f756e647300000000000000000000000000604482015290519081900360640190fd5b606654600019018110156105015760668054600019810190811061046157fe5b906000526020600020906002020160668281548110151561047e57fe5b6000918252602090912082546002928302909101805460ff191660ff909216151591909117808255835474ffffffffffffffffffffffffffffffffffffffff001990911661010091829004600160a060020a031682021782556001808501805493946104fd948387019492938116159092026000190190911604610c29565b5050505b6066805490610514906000198301610c9e565b5050565b610520610657565b151561052b57600080fd5b60665482106105aa576040805160e560020a62461bcd02815260206004820152602860248201527f696e646578206d75737420626520696e2072616e6765206f662073746f72656460448201527f207478206c697374000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b806066838154811015156105ba57fe5b60009182526020909120600290910201805460ff19169115159190911790555050565b6105e5610657565b15156105f057600080fd5b603354604051600160a060020a03909116907ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482090600090a26033805473ffffffffffffffffffffffffffffffffffffffff19169055565b603354600160a060020a03165b90565b603354600160a060020a0316331490565b60665490565b606680548290811061067c57fe5b6000918252602091829020600291820201805460018083018054604080516101009483161585026000190190921696909604601f810188900488028201880190965285815260ff8416975091909204600160a060020a0316949293909283018282801561072a5780601f106106ff5761010080835404028352916020019161072a565b820191906000526020600020905b81548152906001019060200180831161070d57829003601f168201915b5050505050905083565b6000808033321461074457600080fd5b606760009054906101000a9004600160a060020a0316600160a060020a031663af14052c6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b1580156107b057600080fd5b505af11580156107c4573d6000803e3d6000fd5b50505050600092505b6066548310156109d35760668054849081106107e557fe5b60009182526020909120600290910201805490925060ff16156109c85781546001808401805460408051602060026101009685161587026000190190941693909304601f81018490048402820184019092528181526108a99594909404600160a060020a031693929183018282801561089f5780601f106108745761010080835404028352916020019161089f565b820191906000526020600020905b81548152906001019060200180831161088257829003601f168201915b5050505050610b04565b90508015156109c8578154604080518581526020810182815260018087018054600261010093821615840260001901909116049484018590529404600160a060020a0316937f8091ecaaa54ebb82e02d36c2c336528e0fcb9b3430fc1291ac88295032b9c2639388939192906060830190849080156109695780601f1061093e57610100808354040283529160200191610969565b820191906000526020600020905b81548152906001019060200180831161094c57829003601f168201915b5050935050505060405180910390a26040805160e560020a62461bcd02815260206004820152601260248201527f5472616e73616374696f6e204661696c65640000000000000000000000000000604482015290519081900360640190fd5b6001909201916107cd565b505050565b60008054610100900460ff16806109f257506109f2610b27565b80610a00575060005460ff16155b1515610a7c576040805160e560020a62461bcd02815260206004820152602e60248201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560448201527f656e20696e697469616c697a6564000000000000000000000000000000000000606482015290519081900360840190fd5b50600054610100900460ff16158015610aa8576000805460ff1961ff0019909116610100171660011790555b6033805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0384161790558015610514576000805461ff00191690555050565b610aed610657565b1515610af857600080fd5b610b0181610b31565b50565b6000806040516020840160008286518360008a6187965a03f19695505050505050565b303b8015905b5090565b600160a060020a0381161515610b4657600080fd5b603354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36033805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610bf057805160ff1916838001178555610c1d565b82800160010185558215610c1d579182015b82811115610c1d578251825591602001919060010190610c02565b50610b2d929150610cca565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610c625780548555610c1d565b82800160010185558215610c1d57600052602060002091601f016020900482015b82811115610c1d578254825591600101919060010190610c83565b8154818355818111156109d3576002028160020283600052602060002091820191016109d39190610ce4565b61065491905b80821115610b2d5760008155600101610cd0565b61065491905b80821115610b2d57805474ffffffffffffffffffffffffffffffffffffffffff191681556000610d1d6001830182610d26565b50600201610cea565b50805460018160011615610100020316600290046000825580601f10610d4c5750610b01565b601f016020900490600052602060002090810190610b019190610cca5600a165627a7a723058200942c77a2ab7e93400031e10c31c2baef60040cff11af9ba2f34e8b0c0d18f7c0029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000452a3f4a4e8e81b619d88c2b44bd160ce8b4fc03
-----Decoded View---------------
Arg [0] : policy_ (address): 0x452a3F4A4E8E81B619d88c2B44Bd160ce8B4fc03
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000452a3f4a4e8e81b619d88c2b44bd160ce8b4fc03
Deployed Bytecode Sourcemap
40266:3290:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;40544:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;40544:27:0;;;;;;;;-1:-1:-1;;;;;40544:27:0;;;;;;;;;;;;;;41316:253;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;41316:253:0;;;;-1:-1:-1;;;;;41316:253:0;;;;;;;;;;;;;;;41577:328;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;41577:328:0;;;;;41913:246;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;41913:246:0;;;;;;;;;3540:116;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3540:116:0;;;;2881:72;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2881:72:0;;;;3183:85;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3183:85:0;;;;;;;;;;;;;;;;;;;;;;42167:137;;8:9:-1;5:2;;;30:1;27;20:12;5:2;42167:137:0;;;;;;;;;;;;;;;;;;;;40502:33;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;40502:33:0;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;40502:33:0;-1:-1:-1;;;;;40502:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;40502:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;40715:593;;8:9:-1;5:2;;;30:1;27;20:12;5:2;40715:593:0;;;;2738:83;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2738:83:0;-1:-1:-1;;;;;2738:83:0;;;;;3823:103;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3823:103:0;-1:-1:-1;;;;;3823:103:0;;;;;40544:27;;;-1:-1:-1;;;;;40544:27:0;;:::o;41316:253::-;3074:9;:7;:9::i;:::-;3066:18;;;;;;;;41426:12;41444:116;;;;;;;;;41480:4;41444:116;;;;;;41512:11;-1:-1:-1;;;;;41444:116:0;;;;;41544:4;;41444:116;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;41444:116:0;;;;-1:-1:-1;;27:10;;39:1;23:18;;;45:23;;;-1:-1;41426:135:0;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;41426:135:0;;;-1:-1:-1;;41426:135:0;;;-1:-1:-1;;41426:135:0;;;;;;;;;;;;;;;;;;;;;;;23:18:-1;;41426:135:0;;-1:-1:-1;41426:135:0;;;;;;;;;:::i;:::-;;;;;41316:253;;;:::o;41577:328::-;3074:9;:7;:9::i;:::-;3066:18;;;;;;;;41685:12;:19;41677:27;;41669:59;;;;;-1:-1:-1;;;;;41669:59:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;41753:12;:19;-1:-1:-1;;41753:23:0;41745:31;;41741:123;;;41815:12;41828:19;;-1:-1:-1;;41828:23:0;;;41815:37;;;;;;;;;;;;;;;;41793:12;41806:5;41793:19;;;;;;;;;;;;;;;;;;:59;;:19;;;;;;;:59;;-1:-1:-1;;41793:59:0;;;;;;;;;;;;;;;;-1:-1:-1;;41793:59:0;;;;;;;;-1:-1:-1;;;;;41793:59:0;;;;;;-1:-1:-1;41793:59:0;;;;;:19;;:59;;;;;;;;;;;;;;-1:-1:-1;;41793:59:0;;;;;;:::i;:::-;-1:-1:-1;;;41741:123:0;41876:12;:21;;;;;-1:-1:-1;;41876:21:0;;;:::i;:::-;;41577:328;:::o;41913:246::-;3074:9;:7;:9::i;:::-;3066:18;;;;;;;;42039:12;:19;42031:27;;42023:80;;;;;-1:-1:-1;;;;;42023:80:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;42144:7;42114:12;42127:5;42114:19;;;;;;;;;;;;;;;;;;;;;;;:37;;-1:-1:-1;;42114:37:0;;;;;;;;;;-1:-1:-1;;41913:246:0:o;3540:116::-;3074:9;:7;:9::i;:::-;3066:18;;;;;;;;3617:6;;3598:26;;-1:-1:-1;;;;;3617:6:0;;;;3598:26;;3617:6;;3598:26;3631:6;:19;;-1:-1:-1;;3631:19:0;;;3540:116::o;2881:72::-;2941:6;;-1:-1:-1;;;;;2941:6:0;2881:72;;:::o;3183:85::-;3256:6;;-1:-1:-1;;;;;3256:6:0;3242:10;:20;;3183:85::o;42167:137::-;42277:12;:19;42167:137;:::o;40502:33::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;40502:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;40502:33:0;;;;-1:-1:-1;;;;;40502:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;40715:593::-;40886:6;;;40775:10;40789:9;40775:23;40767:32;;;;;;40853:6;;;;;;;;;-1:-1:-1;;;;;40853:6:0;-1:-1:-1;;;;;40853:13:0;;:15;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;40853:15:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;40853:15:0;;;;40895:1;40886:10;;40881:420;40902:12;:19;40898:23;;40881:420;;;40967:12;:15;;40980:1;;40967:15;;;;;;;;;;;;;;;;;;;41001:9;;40967:15;;-1:-1:-1;41001:9:0;;40997:293;;;41079:13;;;41094:6;;;41066:35;;;;;;;41079:13;41066:35;;;;;;-1:-1:-1;;41066:35:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;41079:13;;;;-1:-1:-1;;;;;41079:13:0;;41066:35;41094:6;41066:35;;41094:6;41066:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:12;:35::i;:::-;41031:70;;41125:6;41124:7;41120:155;;;41179:13;;41161:43;;;;;;;;;;;;41179:13;41197:6;;;41161:43;;;41179:13;41161:43;;;;;;-1:-1:-1;;41161:43:0;;;;;;;;;;;41179:13;;-1:-1:-1;;;;;41179:13:0;;41161:43;;;;41197:6;;41161:43;;;;;41197:6;;41161:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;41227:28;;;-1:-1:-1;;;;;41227:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;41120:155;40923:3;;;;;40881:420;;;40715:593;;;:::o;2738:83::-;1210:19;1103:12;;;;;;;;:31;;;1119:15;:13;:15::i;:::-;1103:47;;;-1:-1:-1;1139:11:0;;;;1138:12;1103:47;1095:106;;;;;;;-1:-1:-1;;;;;1095:106:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1233:12:0;;;;;;;1232:13;1252:83;;;;1281:12;:19;;-1:-1:-1;;;;1281:19:0;;;;;1309:18;1296:4;1309:18;;;1252:83;2800:6;:15;;-1:-1:-1;;2800:15:0;-1:-1:-1;;;;;2800:15:0;;;;;1353:57;;;;1397:5;1382:20;;-1:-1:-1;;1382:20:0;;;2738:83;;:::o;3823:103::-;3074:9;:7;:9::i;:::-;3066:18;;;;;;;;3892:28;3911:8;3892:18;:28::i;:::-;3823:103;:::o;42312:1241::-;42403:4;42425:11;42665:4;42659:11;42793:2;42787:4;42783:13;43438:1;43406:13;43314:4;43308:11;43278;43233:1;43203:11;43174:5;43169:3;43165:15;42822:689;42812:699;42312:1241;-1:-1:-1;;;;;;42312:1241:0:o;1504:476::-;1944:7;1932:20;1967:7;;;1504:476;;;:::o;4066:173::-;-1:-1:-1;;;;;4136:22:0;;;;4128:31;;;;;;4192:6;;4171:38;;-1:-1:-1;;;;;4171:38:0;;;;4192:6;;4171:38;;4192:6;;4171:38;4216:6;:17;;-1:-1:-1;;4216:17:0;-1:-1:-1;;;;;4216:17:0;;;;;;;;;;4066:173::o;40266:3290::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;40266:3290:0;;;-1:-1:-1;40266:3290:0;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;40266:3290:0;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i
Swarm Source
bzzr://0942c77a2ab7e93400031e10c31c2baef60040cff11af9ba2f34e8b0c0d18f7c
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.