ETH Price: $3,146.36 (-1.27%)

Contract

0x57813e8D1E77c069e66d0BCE3729288Ac4d6f0c8
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040108225712020-09-08 18:10:271524 days ago1599588627IN
 Create: MainnetUsdtToUsdtAssimilator
0 ETH0.10902252120

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
211463262024-11-08 23:51:472 days ago1731109907
0x57813e8D...Ac4d6f0c8
0 ETH
211463262024-11-08 23:51:472 days ago1731109907
0x57813e8D...Ac4d6f0c8
0 ETH
211413532024-11-08 7:13:233 days ago1731050003
0x57813e8D...Ac4d6f0c8
0 ETH
211309582024-11-06 20:19:594 days ago1730924399
0x57813e8D...Ac4d6f0c8
0 ETH
211309582024-11-06 20:19:594 days ago1730924399
0x57813e8D...Ac4d6f0c8
0 ETH
211309582024-11-06 20:19:594 days ago1730924399
0x57813e8D...Ac4d6f0c8
0 ETH
211308032024-11-06 19:48:594 days ago1730922539
0x57813e8D...Ac4d6f0c8
0 ETH
211308032024-11-06 19:48:594 days ago1730922539
0x57813e8D...Ac4d6f0c8
0 ETH
211308032024-11-06 19:48:594 days ago1730922539
0x57813e8D...Ac4d6f0c8
0 ETH
211290712024-11-06 14:01:354 days ago1730901695
0x57813e8D...Ac4d6f0c8
0 ETH
211290712024-11-06 14:01:354 days ago1730901695
0x57813e8D...Ac4d6f0c8
0 ETH
211290712024-11-06 14:01:354 days ago1730901695
0x57813e8D...Ac4d6f0c8
0 ETH
211285842024-11-06 12:23:114 days ago1730895791
0x57813e8D...Ac4d6f0c8
0 ETH
211285842024-11-06 12:23:114 days ago1730895791
0x57813e8D...Ac4d6f0c8
0 ETH
211285842024-11-06 12:23:114 days ago1730895791
0x57813e8D...Ac4d6f0c8
0 ETH
211257702024-11-06 2:57:235 days ago1730861843
0x57813e8D...Ac4d6f0c8
0 ETH
211257702024-11-06 2:57:235 days ago1730861843
0x57813e8D...Ac4d6f0c8
0 ETH
211252232024-11-06 1:07:355 days ago1730855255
0x57813e8D...Ac4d6f0c8
0 ETH
211252232024-11-06 1:07:355 days ago1730855255
0x57813e8D...Ac4d6f0c8
0 ETH
211206912024-11-05 9:56:235 days ago1730800583
0x57813e8D...Ac4d6f0c8
0 ETH
211206912024-11-05 9:56:235 days ago1730800583
0x57813e8D...Ac4d6f0c8
0 ETH
210705492024-10-29 9:58:5912 days ago1730195939
0x57813e8D...Ac4d6f0c8
0 ETH
210705492024-10-29 9:58:5912 days ago1730195939
0x57813e8D...Ac4d6f0c8
0 ETH
210696202024-10-29 6:52:1113 days ago1730184731
0x57813e8D...Ac4d6f0c8
0 ETH
210696202024-10-29 6:52:1113 days ago1730184731
0x57813e8D...Ac4d6f0c8
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MainnetUsdtToUsdtAssimilator

Compiler Version
v0.5.15+commit.6a57276f

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, GNU AGPLv3 license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-09-08
*/

// hevm: flattened sources of src/assimilators/mainnet/usdtReserves/mainnetUsdtToUsdtAssimilator.sol
pragma solidity >0.4.13 >=0.4.23 >=0.5.0 <0.6.0 >=0.5.7 <0.6.0;

////// lib/abdk-libraries-solidity/src/ABDKMath64x64.sol
/*
 * ABDK Math 64.64 Smart Contract Library.  Copyright © 2019 by ABDK Consulting.
 * Author: Mikhail Vladimirov <[email protected]>
 */
/* pragma solidity ^0.5.7; */

/**
 * Smart contract library of mathematical functions operating with signed
 * 64.64-bit fixed point numbers.  Signed 64.64-bit fixed point number is
 * basically a simple fraction whose numerator is signed 128-bit integer and
 * denominator is 2^64.  As long as denominator is always the same, there is no
 * need to store it, thus in Solidity signed 64.64-bit fixed point numbers are
 * represented by int128 type holding only the numerator.
 */
library ABDKMath64x64 {
  /**
   * Minimum value signed 64.64-bit fixed point number may have. 
   */
  int128 private constant MIN_64x64 = -0x80000000000000000000000000000000;

  /**
   * Maximum value signed 64.64-bit fixed point number may have. 
   */
  int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;

  /**
   * Convert signed 256-bit integer number into signed 64.64-bit fixed point
   * number.  Revert on overflow.
   *
   * @param x signed 256-bit integer number
   * @return signed 64.64-bit fixed point number
   */
  function fromInt (int256 x) internal pure returns (int128) {
    require (x >= -0x8000000000000000 && x <= 0x7FFFFFFFFFFFFFFF);
    return int128 (x << 64);
  }

  /**
   * Convert signed 64.64 fixed point number into signed 64-bit integer number
   * rounding down.
   *
   * @param x signed 64.64-bit fixed point number
   * @return signed 64-bit integer number
   */
  function toInt (int128 x) internal pure returns (int64) {
    return int64 (x >> 64);
  }

  /**
   * Convert unsigned 256-bit integer number into signed 64.64-bit fixed point
   * number.  Revert on overflow.
   *
   * @param x unsigned 256-bit integer number
   * @return signed 64.64-bit fixed point number
   */
  function fromUInt (uint256 x) internal pure returns (int128) {
    require (x <= 0x7FFFFFFFFFFFFFFF);
    return int128 (x << 64);
  }

  /**
   * Convert signed 64.64 fixed point number into unsigned 64-bit integer
   * number rounding down.  Revert on underflow.
   *
   * @param x signed 64.64-bit fixed point number
   * @return unsigned 64-bit integer number
   */
  function toUInt (int128 x) internal pure returns (uint64) {
    require (x >= 0);
    return uint64 (x >> 64);
  }

  /**
   * Convert signed 128.128 fixed point number into signed 64.64-bit fixed point
   * number rounding down.  Revert on overflow.
   *
   * @param x signed 128.128-bin fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function from128x128 (int256 x) internal pure returns (int128) {
    int256 result = x >> 64;
    require (result >= MIN_64x64 && result <= MAX_64x64);
    return int128 (result);
  }

  /**
   * Convert signed 64.64 fixed point number into signed 128.128 fixed point
   * number.
   *
   * @param x signed 64.64-bit fixed point number
   * @return signed 128.128 fixed point number
   */
  function to128x128 (int128 x) internal pure returns (int256) {
    return int256 (x) << 64;
  }

  /**
   * Calculate x + y.  Revert on overflow.
   *
   * @param x signed 64.64-bit fixed point number
   * @param y signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function add (int128 x, int128 y) internal pure returns (int128) {
    int256 result = int256(x) + y;
    require (result >= MIN_64x64 && result <= MAX_64x64);
    return int128 (result);
  }

  /**
   * Calculate x - y.  Revert on overflow.
   *
   * @param x signed 64.64-bit fixed point number
   * @param y signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function sub (int128 x, int128 y) internal pure returns (int128) {
    int256 result = int256(x) - y;
    require (result >= MIN_64x64 && result <= MAX_64x64);
    return int128 (result);
  }

  /**
   * Calculate x * y rounding down.  Revert on overflow.
   *
   * @param x signed 64.64-bit fixed point number
   * @param y signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function mul (int128 x, int128 y) internal pure returns (int128) {
    int256 result = int256(x) * y >> 64;
    require (result >= MIN_64x64 && result <= MAX_64x64);
    return int128 (result);
  }

  /**
   * Calculate x * y rounding towards zero, where x is signed 64.64 fixed point
   * number and y is signed 256-bit integer number.  Revert on overflow.
   *
   * @param x signed 64.64 fixed point number
   * @param y signed 256-bit integer number
   * @return signed 256-bit integer number
   */
  function muli (int128 x, int256 y) internal pure returns (int256) {
    if (x == MIN_64x64) {
      require (y >= -0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF &&
        y <= 0x1000000000000000000000000000000000000000000000000);
      return -y << 63;
    } else {
      bool negativeResult = false;
      if (x < 0) {
        x = -x;
        negativeResult = true;
      }
      if (y < 0) {
        y = -y; // We rely on overflow behavior here
        negativeResult = !negativeResult;
      }
      uint256 absoluteResult = mulu (x, uint256 (y));
      if (negativeResult) {
        require (absoluteResult <=
          0x8000000000000000000000000000000000000000000000000000000000000000);
        return -int256 (absoluteResult); // We rely on overflow behavior here
      } else {
        require (absoluteResult <=
          0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);
        return int256 (absoluteResult);
      }
    }
  }

  /**
   * Calculate x * y rounding down, where x is signed 64.64 fixed point number
   * and y is unsigned 256-bit integer number.  Revert on overflow.
   *
   * @param x signed 64.64 fixed point number
   * @param y unsigned 256-bit integer number
   * @return unsigned 256-bit integer number
   */
  function mulu (int128 x, uint256 y) internal pure returns (uint256) {
    if (y == 0) return 0;

    require (x >= 0);

    uint256 lo = (uint256 (x) * (y & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)) >> 64;
    uint256 hi = uint256 (x) * (y >> 128);

    require (hi <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);
    hi <<= 64;

    require (hi <=
      0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - lo);
    return hi + lo;
  }

  /**
   * Calculate x / y rounding towards zero.  Revert on overflow or when y is
   * zero.
   *
   * @param x signed 64.64-bit fixed point number
   * @param y signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function div (int128 x, int128 y) internal pure returns (int128) {
    require (y != 0);
    int256 result = (int256 (x) << 64) / y;
    require (result >= MIN_64x64 && result <= MAX_64x64);
    return int128 (result);
  }

  /**
   * Calculate x / y rounding towards zero, where x and y are signed 256-bit
   * integer numbers.  Revert on overflow or when y is zero.
   *
   * @param x signed 256-bit integer number
   * @param y signed 256-bit integer number
   * @return signed 64.64-bit fixed point number
   */
  function divi (int256 x, int256 y) internal pure returns (int128) {
    require (y != 0);

    bool negativeResult = false;
    if (x < 0) {
      x = -x; // We rely on overflow behavior here
      negativeResult = true;
    }
    if (y < 0) {
      y = -y; // We rely on overflow behavior here
      negativeResult = !negativeResult;
    }
    uint128 absoluteResult = divuu (uint256 (x), uint256 (y));
    if (negativeResult) {
      require (absoluteResult <= 0x80000000000000000000000000000000);
      return -int128 (absoluteResult); // We rely on overflow behavior here
    } else {
      require (absoluteResult <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);
      return int128 (absoluteResult); // We rely on overflow behavior here
    }
  }

  /**
   * Calculate x / y rounding towards zero, where x and y are unsigned 256-bit
   * integer numbers.  Revert on overflow or when y is zero.
   *
   * @param x unsigned 256-bit integer number
   * @param y unsigned 256-bit integer number
   * @return signed 64.64-bit fixed point number
   */
  function divu (uint256 x, uint256 y) internal pure returns (int128) {
    require (y != 0);
    uint128 result = divuu (x, y);
    require (result <= uint128 (MAX_64x64));
    return int128 (result);
  }

  /**
   * Calculate -x.  Revert on overflow.
   *
   * @param x signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function neg (int128 x) internal pure returns (int128) {
    require (x != MIN_64x64);
    return -x;
  }

  /**
   * Calculate |x|.  Revert on overflow.
   *
   * @param x signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function abs (int128 x) internal pure returns (int128) {
    require (x != MIN_64x64);
    return x < 0 ? -x : x;
  }

  /**
   * Calculate 1 / x rounding towards zero.  Revert on overflow or when x is
   * zero.
   *
   * @param x signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function inv (int128 x) internal pure returns (int128) {
    require (x != 0);
    int256 result = int256 (0x100000000000000000000000000000000) / x;
    require (result >= MIN_64x64 && result <= MAX_64x64);
    return int128 (result);
  }

  /**
   * Calculate arithmetics average of x and y, i.e. (x + y) / 2 rounding down.
   *
   * @param x signed 64.64-bit fixed point number
   * @param y signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function avg (int128 x, int128 y) internal pure returns (int128) {
    return int128 ((int256 (x) + int256 (y)) >> 1);
  }

  /**
   * Calculate geometric average of x and y, i.e. sqrt (x * y) rounding down.
   * Revert on overflow or in case x * y is negative.
   *
   * @param x signed 64.64-bit fixed point number
   * @param y signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function gavg (int128 x, int128 y) internal pure returns (int128) {
    int256 m = int256 (x) * int256 (y);
    require (m >= 0);
    require (m <
        0x4000000000000000000000000000000000000000000000000000000000000000);
    return int128 (sqrtu (uint256 (m), uint256 (x) + uint256 (y) >> 1));
  }

  /**
   * Calculate x^y assuming 0^0 is 1, where x is signed 64.64 fixed point number
   * and y is unsigned 256-bit integer number.  Revert on overflow.
   *
   * @param x signed 64.64-bit fixed point number
   * @param y uint256 value
   * @return signed 64.64-bit fixed point number
   */
  function pow (int128 x, uint256 y) internal pure returns (int128) {
    uint256 absoluteResult;
    bool negativeResult = false;
    if (x >= 0) {
      absoluteResult = powu (uint256 (x) << 63, y);
    } else {
      // We rely on overflow behavior here
      absoluteResult = powu (uint256 (uint128 (-x)) << 63, y);
      negativeResult = y & 1 > 0;
    }

    absoluteResult >>= 63;

    if (negativeResult) {
      require (absoluteResult <= 0x80000000000000000000000000000000);
      return -int128 (absoluteResult); // We rely on overflow behavior here
    } else {
      require (absoluteResult <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);
      return int128 (absoluteResult); // We rely on overflow behavior here
    }
  }

  /**
   * Calculate sqrt (x) rounding down.  Revert if x < 0.
   *
   * @param x signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function sqrt (int128 x) internal pure returns (int128) {
    require (x >= 0);
    return int128 (sqrtu (uint256 (x) << 64, 0x10000000000000000));
  }

  /**
   * Calculate binary logarithm of x.  Revert if x <= 0.
   *
   * @param x signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function log_2 (int128 x) internal pure returns (int128) {
    require (x > 0);

    int256 msb = 0;
    int256 xc = x;
    if (xc >= 0x10000000000000000) { xc >>= 64; msb += 64; }
    if (xc >= 0x100000000) { xc >>= 32; msb += 32; }
    if (xc >= 0x10000) { xc >>= 16; msb += 16; }
    if (xc >= 0x100) { xc >>= 8; msb += 8; }
    if (xc >= 0x10) { xc >>= 4; msb += 4; }
    if (xc >= 0x4) { xc >>= 2; msb += 2; }
    if (xc >= 0x2) msb += 1;  // No need to shift xc anymore

    int256 result = msb - 64 << 64;
    uint256 ux = uint256 (x) << 127 - msb;
    for (int256 bit = 0x8000000000000000; bit > 0; bit >>= 1) {
      ux *= ux;
      uint256 b = ux >> 255;
      ux >>= 127 + b;
      result += bit * int256 (b);
    }

    return int128 (result);
  }

  /**
   * Calculate natural logarithm of x.  Revert if x <= 0.
   *
   * @param x signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function ln (int128 x) internal pure returns (int128) {
    require (x > 0);

    return int128 (
        uint256 (log_2 (x)) * 0xB17217F7D1CF79ABC9E3B39803F2F6AF >> 128);
  }

  /**
   * Calculate binary exponent of x.  Revert on overflow.
   *
   * @param x signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function exp_2 (int128 x) internal pure returns (int128) {
    require (x < 0x400000000000000000); // Overflow

    if (x < -0x400000000000000000) return 0; // Underflow

    uint256 result = 0x80000000000000000000000000000000;

    if (x & 0x8000000000000000 > 0)
      result = result * 0x16A09E667F3BCC908B2FB1366EA957D3E >> 128;
    if (x & 0x4000000000000000 > 0)
      result = result * 0x1306FE0A31B7152DE8D5A46305C85EDEC >> 128;
    if (x & 0x2000000000000000 > 0)
      result = result * 0x1172B83C7D517ADCDF7C8C50EB14A791F >> 128;
    if (x & 0x1000000000000000 > 0)
      result = result * 0x10B5586CF9890F6298B92B71842A98363 >> 128;
    if (x & 0x800000000000000 > 0)
      result = result * 0x1059B0D31585743AE7C548EB68CA417FD >> 128;
    if (x & 0x400000000000000 > 0)
      result = result * 0x102C9A3E778060EE6F7CACA4F7A29BDE8 >> 128;
    if (x & 0x200000000000000 > 0)
      result = result * 0x10163DA9FB33356D84A66AE336DCDFA3F >> 128;
    if (x & 0x100000000000000 > 0)
      result = result * 0x100B1AFA5ABCBED6129AB13EC11DC9543 >> 128;
    if (x & 0x80000000000000 > 0)
      result = result * 0x10058C86DA1C09EA1FF19D294CF2F679B >> 128;
    if (x & 0x40000000000000 > 0)
      result = result * 0x1002C605E2E8CEC506D21BFC89A23A00F >> 128;
    if (x & 0x20000000000000 > 0)
      result = result * 0x100162F3904051FA128BCA9C55C31E5DF >> 128;
    if (x & 0x10000000000000 > 0)
      result = result * 0x1000B175EFFDC76BA38E31671CA939725 >> 128;
    if (x & 0x8000000000000 > 0)
      result = result * 0x100058BA01FB9F96D6CACD4B180917C3D >> 128;
    if (x & 0x4000000000000 > 0)
      result = result * 0x10002C5CC37DA9491D0985C348C68E7B3 >> 128;
    if (x & 0x2000000000000 > 0)
      result = result * 0x1000162E525EE054754457D5995292026 >> 128;
    if (x & 0x1000000000000 > 0)
      result = result * 0x10000B17255775C040618BF4A4ADE83FC >> 128;
    if (x & 0x800000000000 > 0)
      result = result * 0x1000058B91B5BC9AE2EED81E9B7D4CFAB >> 128;
    if (x & 0x400000000000 > 0)
      result = result * 0x100002C5C89D5EC6CA4D7C8ACC017B7C9 >> 128;
    if (x & 0x200000000000 > 0)
      result = result * 0x10000162E43F4F831060E02D839A9D16D >> 128;
    if (x & 0x100000000000 > 0)
      result = result * 0x100000B1721BCFC99D9F890EA06911763 >> 128;
    if (x & 0x80000000000 > 0)
      result = result * 0x10000058B90CF1E6D97F9CA14DBCC1628 >> 128;
    if (x & 0x40000000000 > 0)
      result = result * 0x1000002C5C863B73F016468F6BAC5CA2B >> 128;
    if (x & 0x20000000000 > 0)
      result = result * 0x100000162E430E5A18F6119E3C02282A5 >> 128;
    if (x & 0x10000000000 > 0)
      result = result * 0x1000000B1721835514B86E6D96EFD1BFE >> 128;
    if (x & 0x8000000000 > 0)
      result = result * 0x100000058B90C0B48C6BE5DF846C5B2EF >> 128;
    if (x & 0x4000000000 > 0)
      result = result * 0x10000002C5C8601CC6B9E94213C72737A >> 128;
    if (x & 0x2000000000 > 0)
      result = result * 0x1000000162E42FFF037DF38AA2B219F06 >> 128;
    if (x & 0x1000000000 > 0)
      result = result * 0x10000000B17217FBA9C739AA5819F44F9 >> 128;
    if (x & 0x800000000 > 0)
      result = result * 0x1000000058B90BFCDEE5ACD3C1CEDC823 >> 128;
    if (x & 0x400000000 > 0)
      result = result * 0x100000002C5C85FE31F35A6A30DA1BE50 >> 128;
    if (x & 0x200000000 > 0)
      result = result * 0x10000000162E42FF0999CE3541B9FFFCF >> 128;
    if (x & 0x100000000 > 0)
      result = result * 0x100000000B17217F80F4EF5AADDA45554 >> 128;
    if (x & 0x80000000 > 0)
      result = result * 0x10000000058B90BFBF8479BD5A81B51AD >> 128;
    if (x & 0x40000000 > 0)
      result = result * 0x1000000002C5C85FDF84BD62AE30A74CC >> 128;
    if (x & 0x20000000 > 0)
      result = result * 0x100000000162E42FEFB2FED257559BDAA >> 128;
    if (x & 0x10000000 > 0)
      result = result * 0x1000000000B17217F7D5A7716BBA4A9AE >> 128;
    if (x & 0x8000000 > 0)
      result = result * 0x100000000058B90BFBE9DDBAC5E109CCE >> 128;
    if (x & 0x4000000 > 0)
      result = result * 0x10000000002C5C85FDF4B15DE6F17EB0D >> 128;
    if (x & 0x2000000 > 0)
      result = result * 0x1000000000162E42FEFA494F1478FDE05 >> 128;
    if (x & 0x1000000 > 0)
      result = result * 0x10000000000B17217F7D20CF927C8E94C >> 128;
    if (x & 0x800000 > 0)
      result = result * 0x1000000000058B90BFBE8F71CB4E4B33D >> 128;
    if (x & 0x400000 > 0)
      result = result * 0x100000000002C5C85FDF477B662B26945 >> 128;
    if (x & 0x200000 > 0)
      result = result * 0x10000000000162E42FEFA3AE53369388C >> 128;
    if (x & 0x100000 > 0)
      result = result * 0x100000000000B17217F7D1D351A389D40 >> 128;
    if (x & 0x80000 > 0)
      result = result * 0x10000000000058B90BFBE8E8B2D3D4EDE >> 128;
    if (x & 0x40000 > 0)
      result = result * 0x1000000000002C5C85FDF4741BEA6E77E >> 128;
    if (x & 0x20000 > 0)
      result = result * 0x100000000000162E42FEFA39FE95583C2 >> 128;
    if (x & 0x10000 > 0)
      result = result * 0x1000000000000B17217F7D1CFB72B45E1 >> 128;
    if (x & 0x8000 > 0)
      result = result * 0x100000000000058B90BFBE8E7CC35C3F0 >> 128;
    if (x & 0x4000 > 0)
      result = result * 0x10000000000002C5C85FDF473E242EA38 >> 128;
    if (x & 0x2000 > 0)
      result = result * 0x1000000000000162E42FEFA39F02B772C >> 128;
    if (x & 0x1000 > 0)
      result = result * 0x10000000000000B17217F7D1CF7D83C1A >> 128;
    if (x & 0x800 > 0)
      result = result * 0x1000000000000058B90BFBE8E7BDCBE2E >> 128;
    if (x & 0x400 > 0)
      result = result * 0x100000000000002C5C85FDF473DEA871F >> 128;
    if (x & 0x200 > 0)
      result = result * 0x10000000000000162E42FEFA39EF44D91 >> 128;
    if (x & 0x100 > 0)
      result = result * 0x100000000000000B17217F7D1CF79E949 >> 128;
    if (x & 0x80 > 0)
      result = result * 0x10000000000000058B90BFBE8E7BCE544 >> 128;
    if (x & 0x40 > 0)
      result = result * 0x1000000000000002C5C85FDF473DE6ECA >> 128;
    if (x & 0x20 > 0)
      result = result * 0x100000000000000162E42FEFA39EF366F >> 128;
    if (x & 0x10 > 0)
      result = result * 0x1000000000000000B17217F7D1CF79AFA >> 128;
    if (x & 0x8 > 0)
      result = result * 0x100000000000000058B90BFBE8E7BCD6D >> 128;
    if (x & 0x4 > 0)
      result = result * 0x10000000000000002C5C85FDF473DE6B2 >> 128;
    if (x & 0x2 > 0)
      result = result * 0x1000000000000000162E42FEFA39EF358 >> 128;
    if (x & 0x1 > 0)
      result = result * 0x10000000000000000B17217F7D1CF79AB >> 128;

    result >>= 63 - (x >> 64);
    require (result <= uint256 (MAX_64x64));

    return int128 (result);
  }

  /**
   * Calculate natural exponent of x.  Revert on overflow.
   *
   * @param x signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function exp (int128 x) internal pure returns (int128) {
    require (x < 0x400000000000000000); // Overflow

    if (x < -0x400000000000000000) return 0; // Underflow

    return exp_2 (
        int128 (int256 (x) * 0x171547652B82FE1777D0FFDA0D23A7D12 >> 128));
  }

  /**
   * Calculate x / y rounding towards zero, where x and y are unsigned 256-bit
   * integer numbers.  Revert on overflow or when y is zero.
   *
   * @param x unsigned 256-bit integer number
   * @param y unsigned 256-bit integer number
   * @return unsigned 64.64-bit fixed point number
   */
  function divuu (uint256 x, uint256 y) private pure returns (uint128) {
    require (y != 0);

    uint256 result;

    if (x <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)
      result = (x << 64) / y;
    else {
      uint256 msb = 192;
      uint256 xc = x >> 192;
      if (xc >= 0x100000000) { xc >>= 32; msb += 32; }
      if (xc >= 0x10000) { xc >>= 16; msb += 16; }
      if (xc >= 0x100) { xc >>= 8; msb += 8; }
      if (xc >= 0x10) { xc >>= 4; msb += 4; }
      if (xc >= 0x4) { xc >>= 2; msb += 2; }
      if (xc >= 0x2) msb += 1;  // No need to shift xc anymore

      result = (x << 255 - msb) / ((y - 1 >> msb - 191) + 1);
      require (result <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);

      uint256 hi = result * (y >> 128);
      uint256 lo = result * (y & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);

      uint256 xh = x >> 192;
      uint256 xl = x << 64;

      if (xl < lo) xh -= 1;
      xl -= lo; // We rely on overflow behavior here
      lo = hi << 128;
      if (xl < lo) xh -= 1;
      xl -= lo; // We rely on overflow behavior here

      assert (xh == hi >> 128);

      result += xl / y;
    }

    require (result <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);
    return uint128 (result);
  }

  /**
   * Calculate x^y assuming 0^0 is 1, where x is unsigned 129.127 fixed point
   * number and y is unsigned 256-bit integer number.  Revert on overflow.
   *
   * @param x unsigned 129.127-bit fixed point number
   * @param y uint256 value
   * @return unsigned 129.127-bit fixed point number
   */
  function powu (uint256 x, uint256 y) private pure returns (uint256) {
    if (y == 0) return 0x80000000000000000000000000000000;
    else if (x == 0) return 0;
    else {
      int256 msb = 0;
      uint256 xc = x;
      if (xc >= 0x100000000000000000000000000000000) { xc >>= 128; msb += 128; }
      if (xc >= 0x10000000000000000) { xc >>= 64; msb += 64; }
      if (xc >= 0x100000000) { xc >>= 32; msb += 32; }
      if (xc >= 0x10000) { xc >>= 16; msb += 16; }
      if (xc >= 0x100) { xc >>= 8; msb += 8; }
      if (xc >= 0x10) { xc >>= 4; msb += 4; }
      if (xc >= 0x4) { xc >>= 2; msb += 2; }
      if (xc >= 0x2) msb += 1;  // No need to shift xc anymore

      int256 xe = msb - 127;
      if (xe > 0) x >>= xe;
      else x <<= -xe;

      uint256 result = 0x80000000000000000000000000000000;
      int256 re = 0;

      while (y > 0) {
        if (y & 1 > 0) {
          result = result * x;
          y -= 1;
          re += xe;
          if (result >=
            0x8000000000000000000000000000000000000000000000000000000000000000) {
            result >>= 128;
            re += 1;
          } else result >>= 127;
          if (re < -127) return 0; // Underflow
          require (re < 128); // Overflow
        } else {
          x = x * x;
          y >>= 1;
          xe <<= 1;
          if (x >=
            0x8000000000000000000000000000000000000000000000000000000000000000) {
            x >>= 128;
            xe += 1;
          } else x >>= 127;
          if (xe < -127) return 0; // Underflow
          require (xe < 128); // Overflow
        }
      }

      if (re > 0) result <<= re;
      else if (re < 0) result >>= -re;

      return result;
    }
  }

  /**
   * Calculate sqrt (x) rounding down, where x is unsigned 256-bit integer
   * number.
   *
   * @param x unsigned 256-bit integer number
   * @return unsigned 128-bit integer number
   */
  function sqrtu (uint256 x, uint256 r) private pure returns (uint128) {
    if (x == 0) return 0;
    else {
      require (r > 0);
      while (true) {
        uint256 rr = x / r;
        if (r == rr || r + 1 == rr) return uint128 (r);
        else if (r == rr + 1) return uint128 (rr);
        r = r + rr + 1 >> 1;
      }
    }
  }
}

////// src/interfaces/IAssimilator.sol
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

/* pragma solidity ^0.5.0; */

interface IAssimilator {
    function intakeRaw (uint256 amount) external returns (int128);
    function intakeRawAndGetBalance (uint256 amount) external returns (int128, int128);
    function intakeNumeraire (int128 amount) external returns (uint256);
    function outputRaw (address dst, uint256 amount) external returns (int128);
    function outputRawAndGetBalance (address dst, uint256 amount) external returns (int128, int128);
    function outputNumeraire (address dst, int128 amount) external returns (uint256);
    function viewRawAmount (int128) external view returns (uint256);
    function viewNumeraireAmount (uint256) external view returns (int128);
    function viewNumeraireBalance (address) external view returns (int128);
    function viewNumeraireAmountAndBalance (address, uint256) external view returns (int128, int128);
}
////// src/interfaces/IERC20NoBool.sol
/* pragma solidity ^0.5.0; */

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
interface IERC20NoBool {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external;

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

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

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

////// src/assimilators/mainnet/usdtReserves/mainnetUsdtToUsdtAssimilator.sol
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

/* pragma solidity ^0.5.0; */

/* import "abdk-libraries-solidity/ABDKMath64x64.sol"; */

/* import "../../../interfaces/IERC20NoBool.sol"; */

/* import "../../../interfaces/IAssimilator.sol"; */

contract MainnetUsdtToUsdtAssimilator is IAssimilator {

    using ABDKMath64x64 for int128;
    using ABDKMath64x64 for uint256;

    IERC20NoBool constant usdt = IERC20NoBool(0xdAC17F958D2ee523a2206206994597C13D831ec7);

    constructor () public { }

    // takes raw amount, transfers it in, wraps that in aUsdt, returns numeraire amount
    function intakeRawAndGetBalance (uint256 _amount) public returns (int128 amount_, int128 balance_) {

        safeTransferFrom(usdt, msg.sender, address(this), _amount);

        uint256 _balance = usdt.balanceOf(address(this));

        amount_ = _amount.divu(1e6);

        balance_ = _balance.divu(1e6);

    }

    // takes raw amount, transfers it in, wraps that in aUsdt, returns numeraire amount
    function intakeRaw (uint256 _amount) public returns (int128 amount_) {

        safeTransferFrom(usdt, msg.sender, address(this), _amount);

        amount_ = _amount.divu(1e6);

    }

    // takes numeraire amount, calculates raw amount, transfers that in, wraps it in aUsdt, returns raw amount
    function intakeNumeraire (int128 _amount) public returns (uint256 amount_) {

        amount_ = _amount.mulu(1e6);

        safeTransferFrom(usdt, msg.sender, address(this), amount_);

    }

    // takes raw amount, redeems that from aUsdt, transfers it out, returns numeraire amount
    function outputRawAndGetBalance (address _dst, uint256 _amount) public returns (int128 amount_, int128 balance_) {

        safeTransfer(usdt, _dst, _amount);

        uint256 _balance = usdt.balanceOf(address(this));

        balance_ = _balance.divu(1e6);

        amount_ = _amount.divu(1e6);

    }

    // takes raw amount, redeems that from aUsdt, transfers it out, returns numeraire amount
    function outputRaw (address _dst, uint256 _amount) public returns (int128 amount_) {

        safeTransfer(usdt, _dst, _amount);

        amount_ = _amount.divu(1e6);

    }

    // takes numeraire amount, calculates raw amount, redeems that from aUsdt, transfers it out, returns raw amount
    function outputNumeraire (address _dst, int128 _amount) public returns (uint256 amount_) {

        amount_ = _amount.mulu(1e6);

        safeTransfer(usdt, _dst, amount_);

    }

    // takes numeraire amount, returns raw amount
    function viewRawAmount (int128 _amount) public view returns (uint256 amount_) {

        amount_ = _amount.mulu(1e6);

    }

    // takes raw amount, returns numeraire amount
    function viewNumeraireAmount (uint256 _amount) public view returns (int128 amount_) {

        amount_ = _amount.divu(1e6);

    }

    // takes raw amount, returns numeraire amount
    function viewNumeraireAmountAndBalance (address _addr, uint256 _amount) public view returns (int128 amount_, int128 balance_) {

        uint256 _balance = usdt.balanceOf(_addr);

        amount_ = _amount.divu(1e6);

        balance_ = _balance.divu(1e6);

    }

    // returns numeraire amount of reserve asset, in this case aUSDT
    function viewNumeraireBalance (address _addr) public view returns (int128 balance_) {

        uint256 _balance = usdt.balanceOf(_addr);

        balance_ = _balance.divu(1e6);

    }

    function safeTransfer(IERC20NoBool token, address to, uint256 value) internal {

        callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));

    }

    function safeTransferFrom(IERC20NoBool token, address from, address to, uint256 value) internal {

        callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));

    }

    function callOptionalReturn(address token, bytes memory data) private {

        (bool success, bytes memory returnData) = token.call(data);

        assembly { if eq(success, 0) { revert(add(returnData, 0x20), returndatasize) } }

    }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"constant":false,"inputs":[{"internalType":"int128","name":"_amount","type":"int128"}],"name":"intakeNumeraire","outputs":[{"internalType":"uint256","name":"amount_","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"intakeRaw","outputs":[{"internalType":"int128","name":"amount_","type":"int128"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"intakeRawAndGetBalance","outputs":[{"internalType":"int128","name":"amount_","type":"int128"},{"internalType":"int128","name":"balance_","type":"int128"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_dst","type":"address"},{"internalType":"int128","name":"_amount","type":"int128"}],"name":"outputNumeraire","outputs":[{"internalType":"uint256","name":"amount_","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_dst","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"outputRaw","outputs":[{"internalType":"int128","name":"amount_","type":"int128"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_dst","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"outputRawAndGetBalance","outputs":[{"internalType":"int128","name":"amount_","type":"int128"},{"internalType":"int128","name":"balance_","type":"int128"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"viewNumeraireAmount","outputs":[{"internalType":"int128","name":"amount_","type":"int128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_addr","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"viewNumeraireAmountAndBalance","outputs":[{"internalType":"int128","name":"amount_","type":"int128"},{"internalType":"int128","name":"balance_","type":"int128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"viewNumeraireBalance","outputs":[{"internalType":"int128","name":"balance_","type":"int128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"int128","name":"_amount","type":"int128"}],"name":"viewRawAmount","outputs":[{"internalType":"uint256","name":"amount_","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50610f78806100206000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80637f328ecc116100665780637f328ecc1461027c578063ac969a73146102d1578063f09a3fc31461032f578063f5e6c0ca14610397578063fa00102a146103df5761009e565b80630271c3c8146100a35780631e9b2cba146100e8578063523bf2571461015d5780636b677a8f146101d25780636fc3905214610217575b600080fd5b6100d2600480360360208110156100b957600080fd5b810190808035600f0b9060200190929190505050610427565b6040518082815260200191505060405180910390f35b610134600480360360408110156100fe57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610469565b6040518083600f0b600f0b815260200182600f0b600f0b81526020019250505060405180910390f35b6101a96004803603604081101561017357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610574565b6040518083600f0b600f0b815260200182600f0b600f0b81526020019250505060405180910390f35b610201600480360360208110156101e857600080fd5b810190808035600f0b906020019092919050505061069e565b6040518082815260200191505060405180910390f35b6102666004803603604081101561022d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035600f0b90602001909291905050506106c0565b6040518082815260200191505060405180910390f35b6102a86004803603602081101561029257600080fd5b8101908080359060200190929190505050610702565b6040518083600f0b600f0b815260200182600f0b600f0b81526020019250505060405180910390f35b610313600480360360208110156102e757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061082b565b6040518082600f0b600f0b815260200191505060405180910390f35b61037b6004803603604081101561034557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061091a565b6040518082600f0b600f0b815260200191505060405180910390f35b6103c3600480360360208110156103ad57600080fd5b8101908080359060200190929190505050610959565b6040518082600f0b600f0b815260200191505060405180910390f35b61040b600480360360208110156103f557600080fd5b8101908080359060200190929190505050610978565b6040518082600f0b600f0b815260200191505060405180910390f35b6000610442620f424083600f0b6109b790919063ffffffff16565b905061046473dac17f958d2ee523a2206206994597c13d831ec7333084610a72565b919050565b600080600073dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff166370a08231866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156104ff57600080fd5b505afa158015610513573d6000803e3d6000fd5b505050506040513d602081101561052957600080fd5b81019080805190602001909291905050509050610552620f424085610b7890919063ffffffff16565b925061056a620f424082610b7890919063ffffffff16565b9150509250929050565b60008061059673dac17f958d2ee523a2206206994597c13d831ec78585610be0565b600073dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561062957600080fd5b505afa15801561063d573d6000803e3d6000fd5b505050506040513d602081101561065357600080fd5b8101908080519060200190929190505050905061067c620f424082610b7890919063ffffffff16565b9150610694620f424085610b7890919063ffffffff16565b9250509250929050565b60006106b9620f424083600f0b6109b790919063ffffffff16565b9050919050565b60006106db620f424083600f0b6109b790919063ffffffff16565b90506106fc73dac17f958d2ee523a2206206994597c13d831ec78483610be0565b92915050565b60008061072573dac17f958d2ee523a2206206994597c13d831ec7333086610a72565b600073dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156107b857600080fd5b505afa1580156107cc573d6000803e3d6000fd5b505050506040513d60208110156107e257600080fd5b8101908080519060200190929190505050905061080b620f424085610b7890919063ffffffff16565b9250610823620f424082610b7890919063ffffffff16565b915050915091565b60008073dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff166370a08231846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156108bf57600080fd5b505afa1580156108d3573d6000803e3d6000fd5b505050506040513d60208110156108e957600080fd5b81019080805190602001909291905050509050610912620f424082610b7890919063ffffffff16565b915050919050565b600061093b73dac17f958d2ee523a2206206994597c13d831ec78484610be0565b610951620f424083610b7890919063ffffffff16565b905092915050565b6000610971620f424083610b7890919063ffffffff16565b9050919050565b600061099a73dac17f958d2ee523a2206206994597c13d831ec7333085610a72565b6109b0620f424083610b7890919063ffffffff16565b9050919050565b6000808214156109ca5760009050610a6c565b600083600f0b12156109db57600080fd5b600060406fffffffffffffffffffffffffffffffff841685600f0b02901c90506000608084901c85600f0b02905077ffffffffffffffffffffffffffffffffffffffffffffffff811115610a2e57600080fd5b604081901b9050817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03811115610a6457600080fd5b818101925050505b92915050565b610b72848573ffffffffffffffffffffffffffffffffffffffff166323b872dd905060e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610cb1565b50505050565b600080821415610b8757600080fd5b6000610b938484610d82565b90506f7fffffffffffffffffffffffffffffff6fffffffffffffffffffffffffffffffff16816fffffffffffffffffffffffffffffffff161115610bd657600080fd5b8091505092915050565b610cac838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb905060e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610cb1565b505050565b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310610d005780518252602082019150602081019050602083039250610cdd565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610d62576040519150601f19603f3d011682016040523d82523d6000602084013e610d67565b606091505b50915091506000821415610d7c573d60208201fd5b50505050565b600080821415610d9157600080fd5b600077ffffffffffffffffffffffffffffffffffffffffffffffff8411610dc75782604085901b81610dbf57fe5b049050610f1c565b600060c09050600060c086901c90506401000000008110610df057602081901c90506020820191505b620100008110610e0857601081901c90506010820191505b6101008110610e1f57600881901c90506008820191505b60108110610e3557600481901c90506004820191505b60048110610e4b57600281901c90506002820191505b60028110610e5a576001820191505b600160bf830360018703901c018260ff0387901b81610e7557fe5b0492506fffffffffffffffffffffffffffffffff831115610e9557600080fd5b6000608086901c8402905060006fffffffffffffffffffffffffffffffff871685029050600060c089901c9050600060408a901b905082811015610eda576001820391505b8281039050608084901b925082811015610ef5576001820391505b8281039050608084901c8214610f0757fe5b888181610f1057fe5b04870196505050505050505b6fffffffffffffffffffffffffffffffff811115610f3957600080fd5b809150509291505056fea265627a7a72315820004f8e8fc275f88d3b34cc9ca283415a2d4258a72a3e8aeff72cdef0fe06625c64736f6c634300050f0032

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061009e5760003560e01c80637f328ecc116100665780637f328ecc1461027c578063ac969a73146102d1578063f09a3fc31461032f578063f5e6c0ca14610397578063fa00102a146103df5761009e565b80630271c3c8146100a35780631e9b2cba146100e8578063523bf2571461015d5780636b677a8f146101d25780636fc3905214610217575b600080fd5b6100d2600480360360208110156100b957600080fd5b810190808035600f0b9060200190929190505050610427565b6040518082815260200191505060405180910390f35b610134600480360360408110156100fe57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610469565b6040518083600f0b600f0b815260200182600f0b600f0b81526020019250505060405180910390f35b6101a96004803603604081101561017357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610574565b6040518083600f0b600f0b815260200182600f0b600f0b81526020019250505060405180910390f35b610201600480360360208110156101e857600080fd5b810190808035600f0b906020019092919050505061069e565b6040518082815260200191505060405180910390f35b6102666004803603604081101561022d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035600f0b90602001909291905050506106c0565b6040518082815260200191505060405180910390f35b6102a86004803603602081101561029257600080fd5b8101908080359060200190929190505050610702565b6040518083600f0b600f0b815260200182600f0b600f0b81526020019250505060405180910390f35b610313600480360360208110156102e757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061082b565b6040518082600f0b600f0b815260200191505060405180910390f35b61037b6004803603604081101561034557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061091a565b6040518082600f0b600f0b815260200191505060405180910390f35b6103c3600480360360208110156103ad57600080fd5b8101908080359060200190929190505050610959565b6040518082600f0b600f0b815260200191505060405180910390f35b61040b600480360360208110156103f557600080fd5b8101908080359060200190929190505050610978565b6040518082600f0b600f0b815260200191505060405180910390f35b6000610442620f424083600f0b6109b790919063ffffffff16565b905061046473dac17f958d2ee523a2206206994597c13d831ec7333084610a72565b919050565b600080600073dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff166370a08231866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156104ff57600080fd5b505afa158015610513573d6000803e3d6000fd5b505050506040513d602081101561052957600080fd5b81019080805190602001909291905050509050610552620f424085610b7890919063ffffffff16565b925061056a620f424082610b7890919063ffffffff16565b9150509250929050565b60008061059673dac17f958d2ee523a2206206994597c13d831ec78585610be0565b600073dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561062957600080fd5b505afa15801561063d573d6000803e3d6000fd5b505050506040513d602081101561065357600080fd5b8101908080519060200190929190505050905061067c620f424082610b7890919063ffffffff16565b9150610694620f424085610b7890919063ffffffff16565b9250509250929050565b60006106b9620f424083600f0b6109b790919063ffffffff16565b9050919050565b60006106db620f424083600f0b6109b790919063ffffffff16565b90506106fc73dac17f958d2ee523a2206206994597c13d831ec78483610be0565b92915050565b60008061072573dac17f958d2ee523a2206206994597c13d831ec7333086610a72565b600073dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156107b857600080fd5b505afa1580156107cc573d6000803e3d6000fd5b505050506040513d60208110156107e257600080fd5b8101908080519060200190929190505050905061080b620f424085610b7890919063ffffffff16565b9250610823620f424082610b7890919063ffffffff16565b915050915091565b60008073dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff166370a08231846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156108bf57600080fd5b505afa1580156108d3573d6000803e3d6000fd5b505050506040513d60208110156108e957600080fd5b81019080805190602001909291905050509050610912620f424082610b7890919063ffffffff16565b915050919050565b600061093b73dac17f958d2ee523a2206206994597c13d831ec78484610be0565b610951620f424083610b7890919063ffffffff16565b905092915050565b6000610971620f424083610b7890919063ffffffff16565b9050919050565b600061099a73dac17f958d2ee523a2206206994597c13d831ec7333085610a72565b6109b0620f424083610b7890919063ffffffff16565b9050919050565b6000808214156109ca5760009050610a6c565b600083600f0b12156109db57600080fd5b600060406fffffffffffffffffffffffffffffffff841685600f0b02901c90506000608084901c85600f0b02905077ffffffffffffffffffffffffffffffffffffffffffffffff811115610a2e57600080fd5b604081901b9050817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03811115610a6457600080fd5b818101925050505b92915050565b610b72848573ffffffffffffffffffffffffffffffffffffffff166323b872dd905060e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610cb1565b50505050565b600080821415610b8757600080fd5b6000610b938484610d82565b90506f7fffffffffffffffffffffffffffffff6fffffffffffffffffffffffffffffffff16816fffffffffffffffffffffffffffffffff161115610bd657600080fd5b8091505092915050565b610cac838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb905060e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610cb1565b505050565b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310610d005780518252602082019150602081019050602083039250610cdd565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610d62576040519150601f19603f3d011682016040523d82523d6000602084013e610d67565b606091505b50915091506000821415610d7c573d60208201fd5b50505050565b600080821415610d9157600080fd5b600077ffffffffffffffffffffffffffffffffffffffffffffffff8411610dc75782604085901b81610dbf57fe5b049050610f1c565b600060c09050600060c086901c90506401000000008110610df057602081901c90506020820191505b620100008110610e0857601081901c90506010820191505b6101008110610e1f57600881901c90506008820191505b60108110610e3557600481901c90506004820191505b60048110610e4b57600281901c90506002820191505b60028110610e5a576001820191505b600160bf830360018703901c018260ff0387901b81610e7557fe5b0492506fffffffffffffffffffffffffffffffff831115610e9557600080fd5b6000608086901c8402905060006fffffffffffffffffffffffffffffffff871685029050600060c089901c9050600060408a901b905082811015610eda576001820391505b8281039050608084901b925082811015610ef5576001820391505b8281039050608084901c8214610f0757fe5b888181610f1057fe5b04870196505050505050505b6fffffffffffffffffffffffffffffffff811115610f3957600080fd5b809150509291505056fea265627a7a72315820004f8e8fc275f88d3b34cc9ca283415a2d4258a72a3e8aeff72cdef0fe06625c64736f6c634300050f0032

Deployed Bytecode Sourcemap

30455:3952:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;30455:3952:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31541:196;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;31541:196:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;33181:271;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;33181:271:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31839:312;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;31839:312:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32801:128;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;32801:128:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;32557:185;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;32557:185:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;30811:323;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;30811:323:0;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33530:189;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;33530:189:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;32253:179;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;32253:179:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;32988:134;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;32988:134:0;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;31231:190;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;31231:190:0;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;31541:196;31599:15;31639:17;31652:3;31639:7;:12;;;;:17;;;;:::i;:::-;31629:27;;31669:58;30637:42;31692:10;31712:4;31719:7;31669:16;:58::i;:::-;31541:196;;;:::o;33181:271::-;33274:14;33290:15;33320:16;30637:42;33339:14;;;33354:5;33339:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;33339:21:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;33339:21:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;33339:21:0;;;;;;;;;;;;;;;;33320:40;;33383:17;33396:3;33383:7;:12;;:17;;;;:::i;:::-;33373:27;;33424:18;33438:3;33424:8;:13;;:18;;;;:::i;:::-;33413:29;;33181:271;;;;;;:::o;31839:312::-;31919:14;31935:15;31965:33;30637:42;31984:4;31990:7;31965:12;:33::i;:::-;32011:16;30637:42;32030:14;;;32053:4;32030:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;32030:29:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;32030:29:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;32030:29:0;;;;;;;;;;;;;;;;32011:48;;32083:18;32097:3;32083:8;:13;;:18;;;;:::i;:::-;32072:29;;32124:17;32137:3;32124:7;:12;;:17;;;;:::i;:::-;32114:27;;31839:312;;;;;;:::o;32801:128::-;32862:15;32902:17;32915:3;32902:7;:12;;;;:17;;;;:::i;:::-;32892:27;;32801:128;;;:::o;32557:185::-;32629:15;32669:17;32682:3;32669:7;:12;;;;:17;;;;:::i;:::-;32659:27;;32699:33;30637:42;32718:4;32724:7;32699:12;:33::i;:::-;32557:185;;;;:::o;30811:323::-;30877:14;30893:15;30923:58;30637:42;30946:10;30966:4;30973:7;30923:16;:58::i;:::-;30994:16;30637:42;31013:14;;;31036:4;31013:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;31013:29:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31013:29:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;31013:29:0;;;;;;;;;;;;;;;;30994:48;;31065:17;31078:3;31065:7;:12;;:17;;;;:::i;:::-;31055:27;;31106:18;31120:3;31106:8;:13;;:18;;;;:::i;:::-;31095:29;;30811:323;;;;:::o;33530:189::-;33597:15;33627:16;30637:42;33646:14;;;33661:5;33646:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;33646:21:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;33646:21:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;33646:21:0;;;;;;;;;;;;;;;;33627:40;;33691:18;33705:3;33691:8;:13;;:18;;;;:::i;:::-;33680:29;;33530:189;;;;:::o;32253:179::-;32320:14;32349:33;30637:42;32368:4;32374:7;32349:12;:33::i;:::-;32405:17;32418:3;32405:7;:12;;:17;;;;:::i;:::-;32395:27;;32253:179;;;;:::o;32988:134::-;33056:14;33095:17;33108:3;33095:7;:12;;:17;;;;:::i;:::-;33085:27;;32988:134;;;:::o;31231:190::-;31284:14;31313:58;30637:42;31336:10;31356:4;31363:7;31313:16;:58::i;:::-;31394:17;31407:3;31394:7;:12;;:17;;;;:::i;:::-;31384:27;;31231:190;;;:::o;6311:469::-;6370:7;6395:1;6390;:6;6386:20;;;6405:1;6398:8;;;;6386:20;6429:1;6424;:6;;;;6415:16;;;;;;6440:10;6513:2;6473:34;6469:1;:38;6463:1;6454:11;;:54;6453:62;;6440:75;;6522:10;6555:3;6550:1;:8;;6544:1;6535:11;;:24;6522:37;;6583:50;6577:2;:56;;6568:66;;;;;;6648:2;6641:9;;;;;6750:2;6681:66;:71;6668:2;:84;;6659:94;;;;;;6772:2;6767;:7;6760:14;;;;6311:469;;;;;:::o;33930:223::-;34039:104;34066:5;34097;:18;;;:27;;;;34126:4;34132:2;34136:5;34074:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;34074:68:0;;;;;;;38:4:-1;29:7;25:18;67:10;61:17;96:58;199:8;192:4;186;182:15;179:29;167:10;160:49;0:215;;;34074:68:0;34039:18;:104::i;:::-;33930:223;;;;:::o;8656:208::-;8716:6;8745:1;8740;:6;;8731:16;;;;;;8754:14;8771:12;8778:1;8781;8771:5;:12::i;:::-;8754:29;;1175:34;8799:29;;:6;:29;;;;8790:39;;;;;;8851:6;8836:22;;;8656:208;;;;:::o;33727:195::-;33818:94;33845:5;33876;:14;;;:23;;;;33901:2;33905:5;33853:58;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;33853:58:0;;;;;;;38:4:-1;29:7;25:18;67:10;61:17;96:58;199:8;192:4;186;182:15;179:29;167:10;160:49;0:215;;;33853:58:0;33818:18;:94::i;:::-;33727:195;;;:::o;34161:243::-;34245:12;34259:23;34286:5;:10;;34297:4;34286:16;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;34286:16:0;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;34244:58:0;;;;34341:1;34332:7;34329:14;34326:2;;;34376:14;34369:4;34357:10;34353:21;34346:45;34326:2;34324:71;;;;:::o;21228:1257::-;21288:7;21318:1;21313;:6;;21304:16;;;;;;21329:14;21361:50;21356:1;:55;21352:1035;;21441:1;21435:2;21430:1;:7;;21429:13;;;;;;21420:22;;21352:1035;;;21463:11;21477:3;21463:17;;21489:10;21507:3;21502:1;:8;;21489:21;;21529:11;21523:2;:17;21519:48;;21551:2;21544:9;;;;;21562:2;21555:9;;;;21519:48;21585:7;21579:2;:13;21575:44;;21603:2;21596:9;;;;;21614:2;21607:9;;;;21575:44;21637:5;21631:2;:11;21627:40;;21653:1;21646:8;;;;;21663:1;21656:8;;;;21627:40;21685:4;21679:2;:10;21675:39;;21700:1;21693:8;;;;;21710:1;21703:8;;;;21675:39;21732:3;21726:2;:9;21722:38;;21746:1;21739:8;;;;;21756:1;21749:8;;;;21722:38;21778:3;21772:2;:9;21768:23;;21790:1;21783:8;;;;21768:23;21886:1;21879:3;21873;:9;21868:1;21864;:5;:18;;21863:24;21855:3;21849;:9;21844:1;:14;;21843:45;;;;;;21834:54;;21916:34;21906:6;:44;;21897:54;;;;;;21962:10;21990:3;21985:1;:8;;21975:6;:19;21962:32;;22003:10;22030:34;22026:1;:38;22016:6;:49;22003:62;;22076:10;22094:3;22089:1;:8;;22076:21;;22106:10;22124:2;22119:1;:7;;22106:20;;22146:2;22141;:7;22137:20;;;22156:1;22150:7;;;;22137:20;22172:2;22166:8;;;;22231:3;22225:2;:9;;22220:14;;22252:2;22247;:7;22243:20;;;22262:1;22256:7;;;;22243:20;22278:2;22272:8;;;;22348:3;22342:2;:9;;22336:2;:15;22328:24;;;;22378:1;22373:2;:6;;;;;;22363:16;;;;21352:1035;;;;;;;22414:34;22404:6;:44;;22395:54;;;;;;22472:6;22456:23;;;21228:1257;;;;:::o

Swarm Source

bzzr://004f8e8fc275f88d3b34cc9ca283415a2d4258a72a3e8aeff72cdef0fe06625c

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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
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.