ETH Price: $3,559.48 (+2.54%)

Contract

0xA997BD647AEe62Ef03b41e6fBFAdaB43d8E57535
 

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Token Holdings

More Info

Private Name Tags

ContractCreator:

GENESIS at txn GENESIS_a997bd647aee62ef03b41e6fbfadab43d8e57535

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Redeem1204808332024-05-24 14:20:4326 days ago1716560443IN
Synthetix: Synth Redeemer
0 ETH0.000013560.06147629
Redeem1193488592024-04-28 9:28:1552 days ago1714296495IN
Synthetix: Synth Redeemer
0 ETH0.000012480.06134125
Redeem1193488192024-04-28 9:26:5552 days ago1714296415IN
Synthetix: Synth Redeemer
0 ETH0.000012390.06092042
Redeem1192805002024-04-26 19:29:3754 days ago1714159777IN
Synthetix: Synth Redeemer
0 ETH0.00001240.06095289
Redeem1191817112024-04-24 12:36:3956 days ago1713962199IN
Synthetix: Synth Redeemer
0 ETH0.000013560.06147509
Redeem1184411462024-04-07 9:11:0973 days ago1712481069IN
Synthetix: Synth Redeemer
0 ETH0.000001830.00832569
Redeem1176271822024-03-19 12:59:0192 days ago1710853141IN
Synthetix: Synth Redeemer
0 ETH0.000001180.00580901
Redeem All1176237972024-03-19 11:06:1192 days ago1710846371IN
Synthetix: Synth Redeemer
0 ETH0.000001340.00624777
Redeem All1176233672024-03-19 10:51:5192 days ago1710845511IN
Synthetix: Synth Redeemer
0 ETH0.000001720.00802914
Redeem1170469612024-03-06 2:38:19105 days ago1709692699IN
Synthetix: Synth Redeemer
0 ETH0.000000120.00061501
Redeem1170469242024-03-06 2:37:05105 days ago1709692625IN
Synthetix: Synth Redeemer
0 ETH0.000000110.00058615
Redeem1169947032024-03-04 21:36:23106 days ago1709588183IN
Synthetix: Synth Redeemer
0 ETH0.000001350.00666816
Redeem1167033802024-02-27 3:45:37113 days ago1709005537IN
Synthetix: Synth Redeemer
0 ETH0.000002560.10337845
Redeem All1167033642024-02-27 3:45:05113 days ago1709005505IN
Synthetix: Synth Redeemer
0 ETH0.000002640.10266956
Redeem All1167033232024-02-27 3:43:43113 days ago1709005423IN
Synthetix: Synth Redeemer
0 ETH0.000002540.098731
Redeem All1167032952024-02-27 3:42:47113 days ago1709005367IN
Synthetix: Synth Redeemer
0 ETH0.00000270.10480892
Redeem1165091782024-02-22 15:52:13118 days ago1708617133IN
Synthetix: Synth Redeemer
0 ETH0.000001050.00477826
Redeem1164619832024-02-21 13:39:03119 days ago1708522743IN
Synthetix: Synth Redeemer
0 ETH0.000000870.00428098
Redeem1164598702024-02-21 12:28:37119 days ago1708518517IN
Synthetix: Synth Redeemer
0 ETH0.000000890.004413
Redeem1162943372024-02-17 16:30:51123 days ago1708187451IN
Synthetix: Synth Redeemer
0 ETH0.000001390.0068712
Redeem1162942542024-02-17 16:28:05123 days ago1708187285IN
Synthetix: Synth Redeemer
0 ETH0.000000190.0055634
Redeem1160637272024-02-12 8:23:51128 days ago1707726231IN
Synthetix: Synth Redeemer
0 ETH0.000000930.0042509
Redeem1157966002024-02-06 3:59:37134 days ago1707191977IN
Synthetix: Synth Redeemer
0 ETH0.000001130.0051548
Redeem1145370402024-01-08 0:14:17163 days ago1704672857IN
Synthetix: Synth Redeemer
0 ETH0.00000020.0085159
Redeem1145112032024-01-07 9:53:03164 days ago1704621183IN
Synthetix: Synth Redeemer
0 ETH0.000001520.00747406
View all transactions

Latest 6 internal transactions

Advanced mode:
Parent Transaction Hash Block From To Value
1071286892023-07-20 12:29:15335 days ago1689856155
Synthetix: Synth Redeemer
0 ETH
1071286892023-07-20 12:29:15335 days ago1689856155
Synthetix: Synth Redeemer
0 ETH
1071286892023-07-20 12:29:15335 days ago1689856155
Synthetix: Synth Redeemer
0 ETH
1055490682023-06-13 22:55:13371 days ago1686696913
Synthetix: Synth Redeemer
0 ETH
1055490682023-06-13 22:55:13371 days ago1686696913
Synthetix: Synth Redeemer
0 ETH
1055490682023-06-13 22:55:13371 days ago1686696913
Synthetix: Synth Redeemer
0 ETH

Latest 7 Deposits

L2 Txn Hash L1 Deposit Txn Value Token
0xa617ddd691e3f3b9b1c51a14077e09ed738d606986db6093c38a8d459c5d53aa2024-01-30 11:39:31141 days ago170661477123.736460105513037544 Synth sUSD (sUSD)
0x70e28b2473945683c0f18567ffa043673b82000b3dd71b8cd10db24f461a2d652023-02-03 2:10:40502 days ago16753902404,026.677351176103942067 Synth sUSD (sUSD)
0x70e28b2473945683c0f18567ffa043673b82000b3dd71b8cd10db24f461a2d652023-02-03 2:10:40502 days ago1675390240583,512.336492543849710506 Synth sUSD (sUSD)
0x70e28b2473945683c0f18567ffa043673b82000b3dd71b8cd10db24f461a2d652023-02-03 2:10:40502 days ago167539024098,388.708030839488061212 Synth sUSD (sUSD)
0x70e28b2473945683c0f18567ffa043673b82000b3dd71b8cd10db24f461a2d652023-02-03 2:10:40502 days ago16753902402,877.612299542596861876 Synth sUSD (sUSD)
0x70e28b2473945683c0f18567ffa043673b82000b3dd71b8cd10db24f461a2d652023-02-03 2:10:40502 days ago167539024028,898.483548547716124249 Synth sUSD (sUSD)
0x70e28b2473945683c0f18567ffa043673b82000b3dd71b8cd10db24f461a2d652023-02-03 2:10:40502 days ago16753902404,814.8915612891970023 Synth sUSD (sUSD)

Loading...
Loading

Contract Source Code Verified (Genesis Bytecode Match Only)

Contract Name:
SynthRedeemer

Compiler Version
v0.5.16

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at optimistic.etherscan.io on 2021-10-12
*/

/*
   ____            __   __        __   _
  / __/__ __ ___  / /_ / /  ___  / /_ (_)__ __
 _\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ /
/___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\
     /___/

* Synthetix: SynthRedeemer.sol
*
* Latest source (may be newer): https://github.com/Synthetixio/synthetix/blob/master/contracts/SynthRedeemer.sol
* Docs: https://docs.synthetix.io/contracts/SynthRedeemer
*
* Contract Dependencies: 
*	- IAddressResolver
*	- ISynthRedeemer
*	- MixinResolver
*	- Owned
* Libraries: 
*	- SafeDecimalMath
*	- SafeMath
*
* MIT License
* ===========
*
* Copyright (c) 2021 Synthetix
*
* 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
*/



pragma solidity ^0.5.16;

// https://docs.synthetix.io/contracts/source/contracts/owned
contract Owned {
    address public owner;
    address public nominatedOwner;

    constructor(address _owner) public {
        require(_owner != address(0), "Owner address cannot be 0");
        owner = _owner;
        emit OwnerChanged(address(0), _owner);
    }

    function nominateNewOwner(address _owner) external onlyOwner {
        nominatedOwner = _owner;
        emit OwnerNominated(_owner);
    }

    function acceptOwnership() external {
        require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership");
        emit OwnerChanged(owner, nominatedOwner);
        owner = nominatedOwner;
        nominatedOwner = address(0);
    }

    modifier onlyOwner {
        _onlyOwner();
        _;
    }

    function _onlyOwner() private view {
        require(msg.sender == owner, "Only the contract owner may perform this action");
    }

    event OwnerNominated(address newOwner);
    event OwnerChanged(address oldOwner, address newOwner);
}


// https://docs.synthetix.io/contracts/source/interfaces/iaddressresolver
interface IAddressResolver {
    function getAddress(bytes32 name) external view returns (address);

    function getSynth(bytes32 key) external view returns (address);

    function requireAndGetAddress(bytes32 name, string calldata reason) external view returns (address);
}


// https://docs.synthetix.io/contracts/source/interfaces/isynth
interface ISynth {
    // Views
    function currencyKey() external view returns (bytes32);

    function transferableSynths(address account) external view returns (uint);

    // Mutative functions
    function transferAndSettle(address to, uint value) external returns (bool);

    function transferFromAndSettle(
        address from,
        address to,
        uint value
    ) external returns (bool);

    // Restricted: used internally to Synthetix
    function burn(address account, uint amount) external;

    function issue(address account, uint amount) external;
}


// https://docs.synthetix.io/contracts/source/interfaces/iissuer
interface IIssuer {
    // Views
    function anySynthOrSNXRateIsInvalid() external view returns (bool anyRateInvalid);

    function availableCurrencyKeys() external view returns (bytes32[] memory);

    function availableSynthCount() external view returns (uint);

    function availableSynths(uint index) external view returns (ISynth);

    function canBurnSynths(address account) external view returns (bool);

    function collateral(address account) external view returns (uint);

    function collateralisationRatio(address issuer) external view returns (uint);

    function collateralisationRatioAndAnyRatesInvalid(address _issuer)
        external
        view
        returns (uint cratio, bool anyRateIsInvalid);

    function debtBalanceOf(address issuer, bytes32 currencyKey) external view returns (uint debtBalance);

    function issuanceRatio() external view returns (uint);

    function lastIssueEvent(address account) external view returns (uint);

    function maxIssuableSynths(address issuer) external view returns (uint maxIssuable);

    function minimumStakeTime() external view returns (uint);

    function remainingIssuableSynths(address issuer)
        external
        view
        returns (
            uint maxIssuable,
            uint alreadyIssued,
            uint totalSystemDebt
        );

    function synths(bytes32 currencyKey) external view returns (ISynth);

    function getSynths(bytes32[] calldata currencyKeys) external view returns (ISynth[] memory);

    function synthsByAddress(address synthAddress) external view returns (bytes32);

    function totalIssuedSynths(bytes32 currencyKey, bool excludeOtherCollateral) external view returns (uint);

    function transferableSynthetixAndAnyRateIsInvalid(address account, uint balance)
        external
        view
        returns (uint transferable, bool anyRateIsInvalid);

    // Restricted: used internally to Synthetix
    function issueSynths(address from, uint amount) external;

    function issueSynthsOnBehalf(
        address issueFor,
        address from,
        uint amount
    ) external;

    function issueMaxSynths(address from) external;

    function issueMaxSynthsOnBehalf(address issueFor, address from) external;

    function burnSynths(address from, uint amount) external;

    function burnSynthsOnBehalf(
        address burnForAddress,
        address from,
        uint amount
    ) external;

    function burnSynthsToTarget(address from) external;

    function burnSynthsToTargetOnBehalf(address burnForAddress, address from) external;

    function burnForRedemption(
        address deprecatedSynthProxy,
        address account,
        uint balance
    ) external;

    function liquidateDelinquentAccount(
        address account,
        uint susdAmount,
        address liquidator
    ) external returns (uint totalRedeemed, uint amountToLiquidate);
}


// Inheritance


// Internal references


// https://docs.synthetix.io/contracts/source/contracts/addressresolver
contract AddressResolver is Owned, IAddressResolver {
    mapping(bytes32 => address) public repository;

    constructor(address _owner) public Owned(_owner) {}

    /* ========== RESTRICTED FUNCTIONS ========== */

    function importAddresses(bytes32[] calldata names, address[] calldata destinations) external onlyOwner {
        require(names.length == destinations.length, "Input lengths must match");

        for (uint i = 0; i < names.length; i++) {
            bytes32 name = names[i];
            address destination = destinations[i];
            repository[name] = destination;
            emit AddressImported(name, destination);
        }
    }

    /* ========= PUBLIC FUNCTIONS ========== */

    function rebuildCaches(MixinResolver[] calldata destinations) external {
        for (uint i = 0; i < destinations.length; i++) {
            destinations[i].rebuildCache();
        }
    }

    /* ========== VIEWS ========== */

    function areAddressesImported(bytes32[] calldata names, address[] calldata destinations) external view returns (bool) {
        for (uint i = 0; i < names.length; i++) {
            if (repository[names[i]] != destinations[i]) {
                return false;
            }
        }
        return true;
    }

    function getAddress(bytes32 name) external view returns (address) {
        return repository[name];
    }

    function requireAndGetAddress(bytes32 name, string calldata reason) external view returns (address) {
        address _foundAddress = repository[name];
        require(_foundAddress != address(0), reason);
        return _foundAddress;
    }

    function getSynth(bytes32 key) external view returns (address) {
        IIssuer issuer = IIssuer(repository["Issuer"]);
        require(address(issuer) != address(0), "Cannot find Issuer address");
        return address(issuer.synths(key));
    }

    /* ========== EVENTS ========== */

    event AddressImported(bytes32 name, address destination);
}


// Internal references


// https://docs.synthetix.io/contracts/source/contracts/mixinresolver
contract MixinResolver {
    AddressResolver public resolver;

    mapping(bytes32 => address) private addressCache;

    constructor(address _resolver) internal {
        resolver = AddressResolver(_resolver);
    }

    /* ========== INTERNAL FUNCTIONS ========== */

    function combineArrays(bytes32[] memory first, bytes32[] memory second)
        internal
        pure
        returns (bytes32[] memory combination)
    {
        combination = new bytes32[](first.length + second.length);

        for (uint i = 0; i < first.length; i++) {
            combination[i] = first[i];
        }

        for (uint j = 0; j < second.length; j++) {
            combination[first.length + j] = second[j];
        }
    }

    /* ========== PUBLIC FUNCTIONS ========== */

    // Note: this function is public not external in order for it to be overridden and invoked via super in subclasses
    function resolverAddressesRequired() public view returns (bytes32[] memory addresses) {}

    function rebuildCache() public {
        bytes32[] memory requiredAddresses = resolverAddressesRequired();
        // The resolver must call this function whenver it updates its state
        for (uint i = 0; i < requiredAddresses.length; i++) {
            bytes32 name = requiredAddresses[i];
            // Note: can only be invoked once the resolver has all the targets needed added
            address destination =
                resolver.requireAndGetAddress(name, string(abi.encodePacked("Resolver missing target: ", name)));
            addressCache[name] = destination;
            emit CacheUpdated(name, destination);
        }
    }

    /* ========== VIEWS ========== */

    function isResolverCached() external view returns (bool) {
        bytes32[] memory requiredAddresses = resolverAddressesRequired();
        for (uint i = 0; i < requiredAddresses.length; i++) {
            bytes32 name = requiredAddresses[i];
            // false if our cache is invalid or if the resolver doesn't have the required address
            if (resolver.getAddress(name) != addressCache[name] || addressCache[name] == address(0)) {
                return false;
            }
        }

        return true;
    }

    /* ========== INTERNAL FUNCTIONS ========== */

    function requireAndGetAddress(bytes32 name) internal view returns (address) {
        address _foundAddress = addressCache[name];
        require(_foundAddress != address(0), string(abi.encodePacked("Missing address: ", name)));
        return _foundAddress;
    }

    /* ========== EVENTS ========== */

    event CacheUpdated(bytes32 name, address destination);
}


// https://docs.synthetix.io/contracts/source/interfaces/ierc20
interface IERC20 {
    // ERC20 Optional Views
    function name() external view returns (string memory);

    function symbol() external view returns (string memory);

    function decimals() external view returns (uint8);

    // Views
    function totalSupply() external view returns (uint);

    function balanceOf(address owner) external view returns (uint);

    function allowance(address owner, address spender) external view returns (uint);

    // Mutative functions
    function transfer(address to, uint value) external returns (bool);

    function approve(address spender, uint value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint value
    ) external returns (bool);

    // Events
    event Transfer(address indexed from, address indexed to, uint value);

    event Approval(address indexed owner, address indexed spender, uint value);
}


interface ISynthRedeemer {
    // Rate of redemption - 0 for none
    function redemptions(address synthProxy) external view returns (uint redeemRate);

    // sUSD balance of deprecated token holder
    function balanceOf(IERC20 synthProxy, address account) external view returns (uint balanceOfInsUSD);

    // Full sUSD supply of token
    function totalSupply(IERC20 synthProxy) external view returns (uint totalSupplyInsUSD);

    function redeem(IERC20 synthProxy) external;

    function redeemAll(IERC20[] calldata synthProxies) external;

    function redeemPartial(IERC20 synthProxy, uint amountOfSynth) external;

    // Restricted to Issuer
    function deprecate(IERC20 synthProxy, uint rateToRedeem) external;
}


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

        return c;
    }

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

        return c;
    }

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

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

        return c;
    }

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

        return c;
    }

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


// Libraries


// https://docs.synthetix.io/contracts/source/libraries/safedecimalmath
library SafeDecimalMath {
    using SafeMath for uint;

    /* Number of decimal places in the representations. */
    uint8 public constant decimals = 18;
    uint8 public constant highPrecisionDecimals = 27;

    /* The number representing 1.0. */
    uint public constant UNIT = 10**uint(decimals);

    /* The number representing 1.0 for higher fidelity numbers. */
    uint public constant PRECISE_UNIT = 10**uint(highPrecisionDecimals);
    uint private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR = 10**uint(highPrecisionDecimals - decimals);

    /**
     * @return Provides an interface to UNIT.
     */
    function unit() external pure returns (uint) {
        return UNIT;
    }

    /**
     * @return Provides an interface to PRECISE_UNIT.
     */
    function preciseUnit() external pure returns (uint) {
        return PRECISE_UNIT;
    }

    /**
     * @return The result of multiplying x and y, interpreting the operands as fixed-point
     * decimals.
     *
     * @dev A unit factor is divided out after the product of x and y is evaluated,
     * so that product must be less than 2**256. As this is an integer division,
     * the internal division always rounds down. This helps save on gas. Rounding
     * is more expensive on gas.
     */
    function multiplyDecimal(uint x, uint y) internal pure returns (uint) {
        /* Divide by UNIT to remove the extra factor introduced by the product. */
        return x.mul(y) / UNIT;
    }

    /**
     * @return The result of safely multiplying x and y, interpreting the operands
     * as fixed-point decimals of the specified precision unit.
     *
     * @dev The operands should be in the form of a the specified unit factor which will be
     * divided out after the product of x and y is evaluated, so that product must be
     * less than 2**256.
     *
     * Unlike multiplyDecimal, this function rounds the result to the nearest increment.
     * Rounding is useful when you need to retain fidelity for small decimal numbers
     * (eg. small fractions or percentages).
     */
    function _multiplyDecimalRound(
        uint x,
        uint y,
        uint precisionUnit
    ) private pure returns (uint) {
        /* Divide by UNIT to remove the extra factor introduced by the product. */
        uint quotientTimesTen = x.mul(y) / (precisionUnit / 10);

        if (quotientTimesTen % 10 >= 5) {
            quotientTimesTen += 10;
        }

        return quotientTimesTen / 10;
    }

    /**
     * @return The result of safely multiplying x and y, interpreting the operands
     * as fixed-point decimals of a precise unit.
     *
     * @dev The operands should be in the precise unit factor which will be
     * divided out after the product of x and y is evaluated, so that product must be
     * less than 2**256.
     *
     * Unlike multiplyDecimal, this function rounds the result to the nearest increment.
     * Rounding is useful when you need to retain fidelity for small decimal numbers
     * (eg. small fractions or percentages).
     */
    function multiplyDecimalRoundPrecise(uint x, uint y) internal pure returns (uint) {
        return _multiplyDecimalRound(x, y, PRECISE_UNIT);
    }

    /**
     * @return The result of safely multiplying x and y, interpreting the operands
     * as fixed-point decimals of a standard unit.
     *
     * @dev The operands should be in the standard unit factor which will be
     * divided out after the product of x and y is evaluated, so that product must be
     * less than 2**256.
     *
     * Unlike multiplyDecimal, this function rounds the result to the nearest increment.
     * Rounding is useful when you need to retain fidelity for small decimal numbers
     * (eg. small fractions or percentages).
     */
    function multiplyDecimalRound(uint x, uint y) internal pure returns (uint) {
        return _multiplyDecimalRound(x, y, UNIT);
    }

    /**
     * @return The result of safely dividing x and y. The return value is a high
     * precision decimal.
     *
     * @dev y is divided after the product of x and the standard precision unit
     * is evaluated, so the product of x and UNIT must be less than 2**256. As
     * this is an integer division, the result is always rounded down.
     * This helps save on gas. Rounding is more expensive on gas.
     */
    function divideDecimal(uint x, uint y) internal pure returns (uint) {
        /* Reintroduce the UNIT factor that will be divided out by y. */
        return x.mul(UNIT).div(y);
    }

    /**
     * @return The result of safely dividing x and y. The return value is as a rounded
     * decimal in the precision unit specified in the parameter.
     *
     * @dev y is divided after the product of x and the specified precision unit
     * is evaluated, so the product of x and the specified precision unit must
     * be less than 2**256. The result is rounded to the nearest increment.
     */
    function _divideDecimalRound(
        uint x,
        uint y,
        uint precisionUnit
    ) private pure returns (uint) {
        uint resultTimesTen = x.mul(precisionUnit * 10).div(y);

        if (resultTimesTen % 10 >= 5) {
            resultTimesTen += 10;
        }

        return resultTimesTen / 10;
    }

    /**
     * @return The result of safely dividing x and y. The return value is as a rounded
     * standard precision decimal.
     *
     * @dev y is divided after the product of x and the standard precision unit
     * is evaluated, so the product of x and the standard precision unit must
     * be less than 2**256. The result is rounded to the nearest increment.
     */
    function divideDecimalRound(uint x, uint y) internal pure returns (uint) {
        return _divideDecimalRound(x, y, UNIT);
    }

    /**
     * @return The result of safely dividing x and y. The return value is as a rounded
     * high precision decimal.
     *
     * @dev y is divided after the product of x and the high precision unit
     * is evaluated, so the product of x and the high precision unit must
     * be less than 2**256. The result is rounded to the nearest increment.
     */
    function divideDecimalRoundPrecise(uint x, uint y) internal pure returns (uint) {
        return _divideDecimalRound(x, y, PRECISE_UNIT);
    }

    /**
     * @dev Convert a standard decimal representation to a high precision one.
     */
    function decimalToPreciseDecimal(uint i) internal pure returns (uint) {
        return i.mul(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR);
    }

    /**
     * @dev Convert a high precision decimal to a standard decimal representation.
     */
    function preciseDecimalToDecimal(uint i) internal pure returns (uint) {
        uint quotientTimesTen = i / (UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR / 10);

        if (quotientTimesTen % 10 >= 5) {
            quotientTimesTen += 10;
        }

        return quotientTimesTen / 10;
    }

    // Computes `a - b`, setting the value to 0 if b > a.
    function floorsub(uint a, uint b) internal pure returns (uint) {
        return b >= a ? 0 : a - b;
    }
}


// Inheritence


// Libraries


// Internal references


contract SynthRedeemer is ISynthRedeemer, MixinResolver {
    using SafeDecimalMath for uint;

    bytes32 public constant CONTRACT_NAME = "SynthRedeemer";

    mapping(address => uint) public redemptions;

    bytes32 private constant CONTRACT_ISSUER = "Issuer";
    bytes32 private constant CONTRACT_SYNTHSUSD = "SynthsUSD";

    constructor(address _resolver) public MixinResolver(_resolver) {}

    function resolverAddressesRequired() public view returns (bytes32[] memory addresses) {
        addresses = new bytes32[](2);
        addresses[0] = CONTRACT_ISSUER;
        addresses[1] = CONTRACT_SYNTHSUSD;
    }

    function issuer() internal view returns (IIssuer) {
        return IIssuer(requireAndGetAddress(CONTRACT_ISSUER));
    }

    function sUSD() internal view returns (IERC20) {
        return IERC20(requireAndGetAddress(CONTRACT_SYNTHSUSD));
    }

    function totalSupply(IERC20 synthProxy) public view returns (uint supplyInsUSD) {
        supplyInsUSD = synthProxy.totalSupply().multiplyDecimal(redemptions[address(synthProxy)]);
    }

    function balanceOf(IERC20 synthProxy, address account) external view returns (uint balanceInsUSD) {
        balanceInsUSD = synthProxy.balanceOf(account).multiplyDecimal(redemptions[address(synthProxy)]);
    }

    function redeemAll(IERC20[] calldata synthProxies) external {
        for (uint i = 0; i < synthProxies.length; i++) {
            _redeem(synthProxies[i], synthProxies[i].balanceOf(msg.sender));
        }
    }

    function redeem(IERC20 synthProxy) external {
        _redeem(synthProxy, synthProxy.balanceOf(msg.sender));
    }

    function redeemPartial(IERC20 synthProxy, uint amountOfSynth) external {
        // technically this check isn't necessary - Synth.burn would fail due to safe sub,
        // but this is a useful error message to the user
        require(synthProxy.balanceOf(msg.sender) >= amountOfSynth, "Insufficient balance");
        _redeem(synthProxy, amountOfSynth);
    }

    function _redeem(IERC20 synthProxy, uint amountOfSynth) internal {
        uint rateToRedeem = redemptions[address(synthProxy)];
        require(rateToRedeem > 0, "Synth not redeemable");
        require(amountOfSynth > 0, "No balance of synth to redeem");
        issuer().burnForRedemption(address(synthProxy), msg.sender, amountOfSynth);
        uint amountInsUSD = amountOfSynth.multiplyDecimal(rateToRedeem);
        sUSD().transfer(msg.sender, amountInsUSD);
        emit SynthRedeemed(address(synthProxy), msg.sender, amountOfSynth, amountInsUSD);
    }

    function deprecate(IERC20 synthProxy, uint rateToRedeem) external onlyIssuer {
        address synthProxyAddress = address(synthProxy);
        require(redemptions[synthProxyAddress] == 0, "Synth is already deprecated");
        require(rateToRedeem > 0, "No rate for synth to redeem");
        uint totalSynthSupply = synthProxy.totalSupply();
        uint supplyInsUSD = totalSynthSupply.multiplyDecimal(rateToRedeem);
        require(sUSD().balanceOf(address(this)) >= supplyInsUSD, "sUSD must first be supplied");
        redemptions[synthProxyAddress] = rateToRedeem;
        emit SynthDeprecated(address(synthProxy), rateToRedeem, totalSynthSupply, supplyInsUSD);
    }

    function requireOnlyIssuer() internal view {
        require(msg.sender == address(issuer()), "Restricted to Issuer contract");
    }

    modifier onlyIssuer() {
        requireOnlyIssuer();
        _;
    }

    event SynthRedeemed(address synth, address account, uint amountOfSynth, uint amountInsUSD);
    event SynthDeprecated(address synth, uint rateToRedeem, uint totalSynthSupply, uint supplyInsUSD);
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_resolver","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"name","type":"bytes32"},{"indexed":false,"internalType":"address","name":"destination","type":"address"}],"name":"CacheUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"synth","type":"address"},{"indexed":false,"internalType":"uint256","name":"rateToRedeem","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalSynthSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"supplyInsUSD","type":"uint256"}],"name":"SynthDeprecated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"synth","type":"address"},{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountOfSynth","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountInsUSD","type":"uint256"}],"name":"SynthRedeemed","type":"event"},{"constant":true,"inputs":[],"name":"CONTRACT_NAME","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"contract IERC20","name":"synthProxy","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"balanceInsUSD","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"contract IERC20","name":"synthProxy","type":"address"},{"internalType":"uint256","name":"rateToRedeem","type":"uint256"}],"name":"deprecate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isResolverCached","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"rebuildCache","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"contract IERC20","name":"synthProxy","type":"address"}],"name":"redeem","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"contract IERC20[]","name":"synthProxies","type":"address[]"}],"name":"redeemAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"contract IERC20","name":"synthProxy","type":"address"},{"internalType":"uint256","name":"amountOfSynth","type":"uint256"}],"name":"redeemPartial","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"redemptions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"resolver","outputs":[{"internalType":"contract AddressResolver","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"resolverAddressesRequired","outputs":[{"internalType":"bytes32[]","name":"addresses","type":"bytes32[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"contract IERC20","name":"synthProxy","type":"address"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"supplyInsUSD","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}]

60806040523480156200001c576000806200001962000099565b50505b506040516200194738038062001947833981810160405260208110156200004d576000806200004a62000099565b50505b810190808051925082915081905060006001816200006a62000106565b816001600160a01b0302191690836001600160a01b03160217906200008e62000168565b5050505050620001b7565b632a2a7adb598160e01b8152600481016020815285602082015260005b86811015620000d3578086015182820160400152602001620000b6565b506020828760640184336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b505050565b6303daa959598160e01b8152836004820152602081602483336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b8051935060005b604081101562000163576000828201526020016200014a565b505050565b6322bd64c0598160e01b8152836004820152846024820152600081604483336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b6000815260206200014a565b61178080620001c76000396000f3fe608060405234801561001957600080610016611407565b50505b50600436106100bd5760003560e01c806395a2251f1161007a57806395a2251f146101bf5780639bc3f269146101ee578063b915ece01461021d578063d6232e8914610252578063e4dc2aa4146102e6578063f7888aec14610315576100bd565b806304f3bcec146100cb5780632af64bd3146100ef5780633a70599c1461010b578063614d08f814610142578063741853601461015c578063899ffef414610164575b6000806100c8611407565b50505b6100d361034c565b6040516001600160a01b03909116815260200160405180910390f35b6100f761036a565b604051901515815260200160405180910390f35b6101406004803603604081101561012a57600080610127611407565b50505b506001600160a01b0381351690602001356104f9565b005b61014a61088e565b60405190815260200160405180910390f35b6101406108a2565b61016c610ad4565b60405160208082528190810183818151815260200191508051906020019060200280838360005b838110156101ab578082015183820152602001610193565b505050509050019250505060405180910390f35b610140600480360360208110156101de576000806101db611407565b50505b50356001600160a01b0316610b50565b61014a6004803603602081101561020d5760008061020a611407565b50505b50356001600160a01b0316610c16565b6101406004803603604081101561023c57600080610239611407565b50505b506001600160a01b038135169060200135610c31565b610140600480360360208110156102715760008061026e611407565b50505b81019060208101813564010000000081111561029557600080610292611407565b50505b8201836020820111156102b0576000806102ad611407565b50505b803590602001918460208302840111640100000000831117156102db576000806102d8611407565b50505b509092509050610d4b565b61014a6004803603602081101561030557600080610302611407565b50505b50356001600160a01b0316610db5565b61014a6004803603604081101561033457600080610331611407565b50505b506001600160a01b0381358116916020013516610e86565b600080610357611472565b906101000a90046001600160a01b031681565b60006060610376610ad4565b905060005b81518110156104ef57600082828151811061039257fe5b602002602001015160008181526001602052909150604090206000906103b6611472565b6001600160a01b036101009290920a9004166000806103d3611472565b906101000a90046001600160a01b03166001600160a01b03166321f8a721836040516001600160e01b031960e084901b168152600481019190915260240160206040518083038186806104246114cd565b15801561043957600080610436611407565b50505b505a610443611519565b5050505050158015610462573d6000803e3d600061045f611407565b50505b505050506040513d60208110156104815760008061047e611407565b50505b8101908080516001600160a01b0316939093141592508291506104d59050575060008181526001602052604081206000906104ba611472565b906101000a90046001600160a01b03166001600160a01b0316145b156104e657600093505050506104f6565b5060010161037b565b5060019150505b90565b610501610efa565b6001600160a01b03821660009081526002602052829060409020610523611472565b1561057d5760405162461bcd60e51b815260206004820152601b60248201527f53796e746820697320616c72656164792064657072656361746564000000000060448201526064016040518091039061057a611407565b50505b600082116105da5760405162461bcd60e51b815260206004820152601b60248201527f4e6f207261746520666f722073796e746820746f2072656465656d00000000006044820152606401604051809103906105d7611407565b50505b6000836001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186806106106114cd565b15801561062557600080610622611407565b50505b505a61062f611519565b505050505015801561064e573d6000803e3d600061064b611407565b50505b505050506040513d602081101561066d5760008061066a611407565b50505b81019080805193506000925061068d91508390508563ffffffff610f7616565b905080610698610fa0565b6001600160a01b03166370a082315a63996d79a5598160e01b8152602081600483336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b8051925060005b60408110156106fc576000828201526020016106e5565b5050506040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186806107396114cd565b15801561074e5760008061074b611407565b50505b505a610758611519565b5050505050158015610777573d6000803e3d6000610774611407565b50505b505050506040513d602081101561079657600080610793611407565b50505b810190808051939093101592506107ff9150505760405162461bcd60e51b815260206004820152601b60248201527f73555344206d75737420666972737420626520737570706c69656400000000006044820152606401604051809103906107fc611407565b50505b6001600160a01b038316600090815260026020528490604090208190610823611604565b5050507f729d5d4b6f2f5105eb1f707c4929870479e07c211953ef7014da9463fb15d88a8585848460405180856001600160a01b03166001600160a01b0316815260200184815260200183815260200182815260200194505050505060405180910390a15050505050565b6c29bcb73a342932b232b2b6b2b960991b81565b60606108ac610ad4565b905060005b8151811015610ad05760008282815181106108c857fe5b60200260200101519050600080806108de611472565b906101000a90046001600160a01b03166001600160a01b031663dacb2d0183846040517f5265736f6c766572206d697373696e67207461726765743a2000000000000000602082015260398101919091526059016040516020818303038152906040526040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561099357808201518382015260200161097b565b50505050905090810190601f1680156109c05780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186806109d96114cd565b1580156109ee576000806109eb611407565b50505b505a6109f8611519565b5050505050158015610a17573d6000803e3d6000610a14611407565b50505b505050506040513d6020811015610a3657600080610a33611407565b50505b8101908080516000868152600160205290945084935060409250905020600181610a5e611472565b816001600160a01b0302191690836001600160a01b0316021790610a80611604565b5050507f88a93678a3692f6789d9546fc621bf7234b101ddb7d4fe479455112831b8aa6882826040519182526001600160a01b031660208201526040908101905180910390a150506001016108b1565b5050565b60606002604051908082528060200260200182016040528015610b01578160200160208202803883390190505b5090506524b9b9bab2b960d11b81600081518110610b1b57fe5b6020026020010181815250506814de5b9d1a1cd554d160ba1b81600181518110610b4157fe5b60200260200101818152505090565b610c1381826001600160a01b03166370a082315a610b6c611652565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024016020604051808303818680610ba66114cd565b158015610bbb57600080610bb8611407565b50505b505a610bc5611519565b5050505050158015610be4573d6000803e3d6000610be1611407565b50505b505050506040513d6020811015610c0357600080610c00611407565b50505b8101908080519250610fbc915050565b50565b60026020528060005260406000209050610c2e611472565b81565b80826001600160a01b03166370a082315a610c4a611652565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024016020604051808303818680610c846114cd565b158015610c9957600080610c96611407565b50505b505a610ca3611519565b5050505050158015610cc2573d6000803e3d6000610cbf611407565b50505b505050506040513d6020811015610ce157600080610cde611407565b50505b81019080805193909310159250610d419150505760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b604482015260640160405180910390610d3e611407565b50505b610ad08282610fbc565b60005b81811015610db057610da8838383818110610d6557fe5b905060200201356001600160a01b0316848484818110610d8157fe5b905060200201356001600160a01b03166001600160a01b03166370a082315a610b6c611652565b600101610d4e565b505050565b6001600160a01b03811660009081526002602052610e8060408220610dd8611472565b836001600160a01b03166318160ddd6040518163ffffffff1660e01b81526004016020604051808303818680610e0c6114cd565b158015610e2157600080610e1e611407565b50505b505a610e2b611519565b5050505050158015610e4a573d6000803e3d6000610e47611407565b50505b505050506040513d6020811015610e6957600080610e66611407565b50505b8101908080519392505063ffffffff610f76169050565b92915050565b6001600160a01b03821660009081526002602052610ef360408220610ea9611472565b846001600160a01b03166370a08231856040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024016020604051808303818680610e0c6114cd565b9392505050565b610f02611289565b6001600160a01b03165a610f14611652565b6001600160a01b031614610f745760405162461bcd60e51b815260206004820152601d60248201527f5265737472696374656420746f2049737375657220636f6e7472616374000000604482015260640160405180910390610ad0611407565b565b6000670de0b6b3a7640000610f91848463ffffffff61129d16565b81610f9857fe5b049392505050565b6000610fb76814de5b9d1a1cd554d160ba1b611305565b905090565b6001600160a01b0382166000908152600260205260408120610fdc611472565b9050600081116110325760405162461bcd60e51b815260206004820152601460248201527353796e7468206e6f742072656465656d61626c6560601b60448201526064016040518091039061102f611407565b50505b6000821161108f5760405162461bcd60e51b815260206004820152601d60248201527f4e6f2062616c616e6365206f662073796e746820746f2072656465656d00000060448201526064016040518091039061108c611407565b50505b611097611289565b6001600160a01b031663d686c06c845a6110af611652565b856040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529190921660248201526044810191909152606401600060405180830381600087806110fd6114cd565b1580156111125760008061110f611407565b50505b505a61111c611698565b50505050505015801561113c573d6000803e3d6000611139611407565b50505b5050505060006111558284610f7690919063ffffffff16565b905061115f610fa0565b6001600160a01b031663a9059cbb5a611176611652565b836040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087806111b86114cd565b1580156111cd576000806111ca611407565b50505b505a6111d7611698565b5050505050501580156111f7573d6000803e3d60006111f4611407565b50505b505050506040513d602081101561121657600080611213611407565b50505b810190808051507f8734fd5c7511ef698c61bce7dd8eefb212edea08cf7d9d4694e223c6f6121aef9250869150505a61124d611652565b85846040516001600160a01b0394851681529290931660208301526040808301919091526060820192909252608001905180910390a150505050565b6000610fb76524b9b9bab2b960d11b611305565b6000826112ac57506000610e80565b828202828482816112b957fe5b0414610ef35760405162461bcd60e51b815260040180806020018281038252602181526020018061175f60219139604001915050604051809103906112fc611407565b50509392505050565b60008181526001602052806040812060009061131f611472565b6001600160a01b036101009290920a90041690508015158360405170026b4b9b9b4b7339030b2323932b9b99d1607d1b60208201526031810191909152605101604051602081830303815290604052906114005760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156113bc5780820151838201526020016113a4565b50505050905090810190601f1680156113e95780820380516001836020036101000a031916815260200191505b5092505050604051809103906113fd611407565b50505b5092915050565b632a2a7adb598160e01b8152600481016020815285602082015260005b8681101561143f578086015182820160400152602001611424565b506020828760640184336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b505050565b6303daa959598160e01b8152836004820152602081602483336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b8051935060005b6040811015610db0576000828201526020016114b6565b638435035b598160e01b8152836004820152602081602483336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b805160008252935060206114b6565b638540661f598160e01b815261154a565b8080831115610e80575090919050565b8080831015610e80575090919050565b836004820152846024820152606060448201528660648201526084810160005b8881101561158257808801518282015260200161156a565b506060828960a40184336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b815160408301513d6000853e8b8b82606087013350600060045af150596115d78d3d61153a565b8c016115e3818761152a565b5b828110156115f857600081526020016115e4565b50929c50505050505050565b6322bd64c0598160e01b8152836004820152846024820152600081604483336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b6000815260206114b6565b6373509064598160e01b8152602081600483336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b805160008252935060206114b6565b6385979f76598160e01b8152836004820152846024820152606060448201528760648201526084810160005b898110156116dc5780890151828201526020016116c4565b506060828a60a40184336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b815160408301513d6000853e8c8c82606087013350600060045af150596117318e3d61153a565b8d0161173d818761152a565b5b82811015611752576000815260200161173e565b50929d5050505050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f770000000000000000000000001cb059b7e74fd21665968c908806143e744d5f30

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806395a2251f1161007157806395a2251f146101a15780639bc3f269146101c7578063b915ece0146101ed578063d6232e8914610219578063e4dc2aa414610289578063f7888aec146102af576100b4565b806304f3bcec146100b95780632af64bd3146100dd5780633a70599c146100f9578063614d08f8146101275780637418536014610141578063899ffef414610149575b600080fd5b6100c16102dd565b604080516001600160a01b039092168252519081900360200190f35b6100e56102ec565b604080519115158252519081900360200190f35b6101256004803603604081101561010f57600080fd5b506001600160a01b0381351690602001356103f6565b005b61012f610685565b60408051918252519081900360200190f35b610125610699565b610151610864565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561018d578181015183820152602001610175565b505050509050019250505060405180910390f35b610125600480360360208110156101b757600080fd5b50356001600160a01b03166108d0565b61012f600480360360208110156101dd57600080fd5b50356001600160a01b0316610950565b6101256004803603604081101561020357600080fd5b506001600160a01b038135169060200135610962565b6101256004803603602081101561022f57600080fd5b81019060208101813564010000000081111561024a57600080fd5b82018360208201111561025c57600080fd5b8035906020019184602083028401116401000000008311171561027e57600080fd5b509092509050610a2b565b61012f6004803603602081101561029f57600080fd5b50356001600160a01b0316610aba565b61012f600480360360408110156102c557600080fd5b506001600160a01b0381358116916020013516610b5c565b6000546001600160a01b031681565b600060606102f8610864565b905060005b81518110156103ec57600082828151811061031457fe5b602090810291909101810151600081815260018352604080822054915481516321f8a72160e01b81526004810185905291519395506001600160a01b03928316949216926321f8a72192602480840193919291829003018186803b15801561037b57600080fd5b505afa15801561038f573d6000803e3d6000fd5b505050506040513d60208110156103a557600080fd5b50516001600160a01b03161415806103d257506000818152600160205260409020546001600160a01b0316155b156103e357600093505050506103f3565b506001016102fd565b5060019150505b90565b6103fe610bc0565b6001600160a01b03821660009081526002602052604090205482901561046b576040805162461bcd60e51b815260206004820152601b60248201527f53796e746820697320616c726561647920646570726563617465640000000000604482015290519081900360640190fd5b600082116104c0576040805162461bcd60e51b815260206004820152601b60248201527f4e6f207261746520666f722073796e746820746f2072656465656d0000000000604482015290519081900360640190fd5b6000836001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156104fb57600080fd5b505afa15801561050f573d6000803e3d6000fd5b505050506040513d602081101561052557600080fd5b50519050600061053b828563ffffffff610c2f16565b905080610546610c59565b6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561059b57600080fd5b505afa1580156105af573d6000803e3d6000fd5b505050506040513d60208110156105c557600080fd5b5051101561061a576040805162461bcd60e51b815260206004820152601b60248201527f73555344206d75737420666972737420626520737570706c6965640000000000604482015290519081900360640190fd5b6001600160a01b0380841660009081526002602090815260409182902087905581519288168352820186905281810184905260608201839052517f729d5d4b6f2f5105eb1f707c4929870479e07c211953ef7014da9463fb15d88a9181900360800190a15050505050565b6c29bcb73a342932b232b2b6b2b960991b81565b60606106a3610864565b905060005b81518110156108605760008282815181106106bf57fe5b60209081029190910181015160008054604080517f5265736f6c766572206d697373696e67207461726765743a2000000000000000818701526039808201869052825180830390910181526059820180845263dacb2d0160e01b9052605d8201868152607d83019384528151609d840152815196985094966001600160a01b039094169563dacb2d0195899592949093909260bd90910191908501908083838c5b83811015610778578181015183820152602001610760565b50505050905090810190601f1680156107a55780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156107c357600080fd5b505afa1580156107d7573d6000803e3d6000fd5b505050506040513d60208110156107ed57600080fd5b505160008381526001602090815260409182902080546001600160a01b0319166001600160a01b03851690811790915582518681529182015281519293507f88a93678a3692f6789d9546fc621bf7234b101ddb7d4fe479455112831b8aa68929081900390910190a150506001016106a8565b5050565b60408051600280825260608083018452926020830190803883390190505090506524b9b9bab2b960d11b8160008151811061089b57fe5b6020026020010181815250506814de5b9d1a1cd554d160ba1b816001815181106108c157fe5b60200260200101818152505090565b604080516370a0823160e01b8152336004820152905161094d9183916001600160a01b038316916370a08231916024808301926020929190829003018186803b15801561091c57600080fd5b505afa158015610930573d6000803e3d6000fd5b505050506040513d602081101561094657600080fd5b5051610c75565b50565b60026020526000908152604090205481565b604080516370a0823160e01b8152336004820152905182916001600160a01b038516916370a0823191602480820192602092909190829003018186803b1580156109ab57600080fd5b505afa1580156109bf573d6000803e3d6000fd5b505050506040513d60208110156109d557600080fd5b50511015610a21576040805162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b604482015290519081900360640190fd5b6108608282610c75565b60005b81811015610ab557610aad838383818110610a4557fe5b905060200201356001600160a01b0316848484818110610a6157fe5b604080516370a0823160e01b81523360048201529051602092830294909401356001600160a01b0316936370a08231935060248083019392829003018186803b15801561091c57600080fd5b600101610a2e565b505050565b6000610b5660026000846001600160a01b03166001600160a01b0316815260200190815260200160002054836001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b1e57600080fd5b505afa158015610b32573d6000803e3d6000fd5b505050506040513d6020811015610b4857600080fd5b50519063ffffffff610c2f16565b92915050565b6001600160a01b0380831660008181526002602090815260408083205481516370a0823160e01b8152958716600487015290519294610bb994919391926370a0823192602480840193829003018186803b158015610b1e57600080fd5b9392505050565b610bc8610ea4565b6001600160a01b0316336001600160a01b031614610c2d576040805162461bcd60e51b815260206004820152601d60248201527f5265737472696374656420746f2049737375657220636f6e7472616374000000604482015290519081900360640190fd5b565b6000670de0b6b3a7640000610c4a848463ffffffff610eb816565b81610c5157fe5b049392505050565b6000610c706814de5b9d1a1cd554d160ba1b610f11565b905090565b6001600160a01b03821660009081526002602052604090205480610cd7576040805162461bcd60e51b815260206004820152601460248201527353796e7468206e6f742072656465656d61626c6560601b604482015290519081900360640190fd5b60008211610d2c576040805162461bcd60e51b815260206004820152601d60248201527f4e6f2062616c616e6365206f662073796e746820746f2072656465656d000000604482015290519081900360640190fd5b610d34610ea4565b604080516335a1b01b60e21b81526001600160a01b038681166004830152336024830152604482018690529151929091169163d686c06c9160648082019260009290919082900301818387803b158015610d8d57600080fd5b505af1158015610da1573d6000803e3d6000fd5b505050506000610dba8284610c2f90919063ffffffff16565b9050610dc4610c59565b6001600160a01b031663a9059cbb33836040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610e2357600080fd5b505af1158015610e37573d6000803e3d6000fd5b505050506040513d6020811015610e4d57600080fd5b5050604080516001600160a01b03861681523360208201528082018590526060810183905290517f8734fd5c7511ef698c61bce7dd8eefb212edea08cf7d9d4694e223c6f6121aef9181900360800190a150505050565b6000610c706524b9b9bab2b960d11b610f11565b600082610ec757506000610b56565b82820282848281610ed457fe5b0414610bb95760405162461bcd60e51b8152600401808060200182810382526021815260200180610ff66021913960400191505060405180910390fd5b600081815260016020908152604080832054815170026b4b9b9b4b7339030b2323932b9b99d1607d1b9381019390935260318084018690528251808503909101815260519093019091526001600160a01b03169081610fee5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610fb3578181015183820152602001610f9b565b50505050905090810190601f168015610fe05780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b509291505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a723158208c6464b50049d8b711b8d1409dc4320aa36cf037bd81f9145de4b5e016470a1664736f6c63430005100032

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000001cb059b7e74fd21665968c908806143e744d5f30

-----Decoded View---------------
Arg [0] : _resolver (address): 0x1Cb059b7e74fD21665968C908806143E744D5F30

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000001cb059b7e74fd21665968c908806143e744d5f30


Library Used


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ Download: CSV Export  ]
[ 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.