Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
This contract has been partially verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- DELTA_Rebasing_Liquidity_Token
- Optimization enabled
- true
- Compiler version
- v0.7.6+commit.7338295f
- Optimization runs
- 200
- EVM Version
- istanbul
- Verified at
- 2026-03-10T01:19:51.992608Z
Constructor Arguments
000000000000000000000000a0bb29c7b5af808bdbf020766113d864f9262a61000000000000000000000000867dacc8bca7c6339cbdeb9a536507a7d7058634
Arg [0] (address) : 0xa0bb29c7b5af808bdbf020766113d864f9262a61
Arg [1] (address) : 0x867dacc8bca7c6339cbdeb9a536507a7d7058634
DELTA_Rebasing_Liquidity_Token.sol
pragma experimental ABIEncoderV2;
// File: contracts/interfaces/IWETH.sol
pragma solidity >=0.6.0 <0.8.0;
interface IWETH {
function deposit() external payable;
function transfer(address to, uint value) external returns (bool);
function withdraw(uint) external;
function balanceOf(address) external view returns (uint256);
}
// File: @openzeppelin/contracts/token/ERC20/IERC20.sol
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
// File: contracts/common/OVLTokenTypes.sol
pragma solidity ^0.7.6;
struct VestingTransaction {
uint256 amount;
uint256 fullVestingTimestamp;
}
struct WalletTotals {
uint256 mature;
uint256 immature;
uint256 total;
}
struct UserInformation {
// This is going to be read from only [0]
uint256 mostMatureTxIndex;
uint256 lastInTxIndex;
uint256 maturedBalance;
uint256 maxBalance;
bool fullSenderWhitelisted;
// Note that recieving immature balances doesnt mean they recieve them fully vested just that senders can do it
bool immatureReceiverWhitelisted;
bool noVestingWhitelisted;
}
struct UserInformationLite {
uint256 maturedBalance;
uint256 maxBalance;
uint256 mostMatureTxIndex;
uint256 lastInTxIndex;
}
struct VestingTransactionDetailed {
uint256 amount;
uint256 fullVestingTimestamp;
// uint256 percentVestedE4;
uint256 mature;
uint256 immature;
}
uint256 constant QTY_EPOCHS = 7;
uint256 constant SECONDS_PER_EPOCH = 172800; // About 2days
uint256 constant FULL_EPOCH_TIME = SECONDS_PER_EPOCH * QTY_EPOCHS;
// Precision Multiplier -- this many zeros (23) seems to get all the precision needed for all 18 decimals to be only off by a max of 1 unit
uint256 constant PM = 1e23;
// File: contracts/interfaces/IDeltaToken.sol
pragma solidity ^0.7.6;
interface IDeltaToken is IERC20 {
function vestingTransactions(address, uint256) external view returns (VestingTransaction memory);
function getUserInfo(address) external view returns (UserInformationLite memory);
function getMatureBalance(address, uint256) external view returns (uint256);
function liquidityRebasingPermitted() external view returns (bool);
function lpTokensInPair() external view returns (uint256);
function governance() external view returns (address);
function performLiquidityRebasing() external;
function distributor() external view returns (address);
function totalsForWallet(address ) external view returns (WalletTotals memory totals);
function adjustBalanceOfNoVestingAccount(address, uint256,bool) external;
function userInformation(address user) external view returns (UserInformation memory);
// Added with Sushi update
function setTokenTransferHandler(address) external;
function setBalanceCalculator(address) external;
function setPendingGovernance(address) external;
function acceptGovernance() external;
}
// File: contracts/interfaces/IERC20Upgradeable.sol
pragma solidity ^0.7.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20Upgradeable {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
// File: contracts/interfaces/IRebasingLiquidityToken.sol
pragma solidity ^0.7.6;
interface IRebasingLiquidityToken is IERC20Upgradeable {
function tokenCaller() external;
function reserveCaller(uint256,uint256) external;
function wrapWithReturn() external returns (uint256);
function wrap() external;
function rlpPerLP() external view returns (uint256);
}
// File: @uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol
pragma solidity >=0.5.0;
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
// File: @uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol
pragma solidity >=0.5.0;
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
// File: contracts/v076/uniswapv2/libraries/SafeMath.sol
pragma solidity ^0.7.6;
// a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math)
library SafeMathUniswap {
function add(uint x, uint y) internal pure returns (uint z) {
require((z = x + y) >= x, 'ds-math-add-overflow');
}
function sub(uint x, uint y) internal pure returns (uint z) {
require((z = x - y) <= x, 'ds-math-sub-underflow');
}
function mul(uint x, uint y) internal pure returns (uint z) {
require(y == 0 || (z = x * y) / y == x, 'ds-math-mul-overflow');
}
}
// File: contracts/v076/uniswapv2/libraries/UniswapV2Library.sol
pragma solidity ^0.7.6;
library UniswapV2Library {
using SafeMathUniswap for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV2Library: IDENTICAL_ADDRESSES');
(token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
require(token0 != address(0), 'UniswapV2Library: ZERO_ADDRESS');
}
// calculates the CREATE2 address for a pair without making any external calls
function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {
(address token0, address token1) = sortTokens(tokenA, tokenB);
pair = address(uint(keccak256(abi.encodePacked(
hex'ff',
factory,
keccak256(abi.encodePacked(token0, token1)),
hex'96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f' // init code hash
))));
}
// fetches and sorts the reserves for a pair
function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) {
(address token0,) = sortTokens(tokenA, tokenB);
(uint reserve0, uint reserve1,) = IUniswapV2Pair(IUniswapV2Factory(factory).getPair(tokenA, tokenB)).getReserves();
(reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0);
}
// given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) {
require(amountA > 0, 'UniswapV2Library: INSUFFICIENT_AMOUNT');
require(reserveA > 0 && reserveB > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
amountB = amountA.mul(reserveB) / reserveA;
}
// given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) {
require(amountIn > 0, 'UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT');
require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
uint amountInWithFee = amountIn.mul(997);
uint numerator = amountInWithFee.mul(reserveOut);
uint denominator = reserveIn.mul(1000).add(amountInWithFee);
amountOut = numerator / denominator;
}
// given an output amount of an asset and pair reserves, returns a required input amount of the other asset
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) {
require(amountOut > 0, 'UniswapV2Library: INSUFFICIENT_OUTPUT_AMOUNT');
require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
uint numerator = reserveIn.mul(amountOut).mul(1000);
uint denominator = reserveOut.sub(amountOut).mul(997);
amountIn = (numerator / denominator).add(1);
}
// performs chained getAmountOut calculations on any number of pairs
function getAmountsOut(address factory, uint amountIn, address[] memory path) internal view returns (uint[] memory amounts) {
require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');
amounts = new uint[](path.length);
amounts[0] = amountIn;
for (uint i; i < path.length - 1; i++) {
(uint reserveIn, uint reserveOut) = getReserves(factory, path[i], path[i + 1]);
amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut);
}
}
// performs chained getAmountIn calculations on any number of pairs
function getAmountsIn(address factory, uint amountOut, address[] memory path) internal view returns (uint[] memory amounts) {
require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');
amounts = new uint[](path.length);
amounts[amounts.length - 1] = amountOut;
for (uint i = path.length - 1; i > 0; i--) {
(uint reserveIn, uint reserveOut) = getReserves(factory, path[i - 1], path[i]);
amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut);
}
}
}
// File: contracts/v076/Upgradability/utils/AddressUpgradeable.sol
pragma solidity ^0.7.0;
/**
* @dev Collection of functions related to the address type
*/
library AddressUpgradeable {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
assembly { size := extcodesize(account) }
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.call{ value: value }(data);
return _verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.staticcall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
// File: contracts/v076/Upgradability/proxy/Initializable.sol
// solhint-disable-next-line compiler-version
pragma solidity >=0.4.24 <0.8.0;
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
*/
bool private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Modifier to protect an initializer function from being invoked twice.
*/
modifier initializer() {
require(_initializing || _isConstructor() || !_initialized, "Initializable: contract is already initialized");
bool isTopLevelCall = !_initializing;
if (isTopLevelCall) {
_initializing = true;
_initialized = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
}
}
/// @dev Returns true if and only if the function is running in the constructor
function _isConstructor() private view returns (bool) {
return !AddressUpgradeable.isContract(address(this));
}
}
// File: contracts/v076/Upgradability/utils/ContextUpgradeable.sol
pragma solidity >=0.6.0 <0.8.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract ContextUpgradeable is Initializable {
function __Context_init() internal initializer {
__Context_init_unchained();
}
function __Context_init_unchained() internal initializer {
}
function _msgSender() internal view virtual returns (address payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
uint256[50] private __gap;
}
// File: contracts/v076/Upgradability/math/SafeMathUpgradeable.sol
pragma solidity ^0.7.0;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMathUpgradeable {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b > a) return (false, 0);
return (true, a - b);
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b == 0) return (false, 0);
return (true, a / b);
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b == 0) return (false, 0);
return (true, a % b);
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
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");
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
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, reverting 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) {
require(b > 0, "SafeMath: division by zero");
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "SafeMath: modulo by zero");
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
return a - b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryDiv}.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
return a % b;
}
}
// File: contracts/v076/Upgradability/token/ERC20/ERC20Upgradeable.sol
pragma solidity ^0.7.0;
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin guidelines: functions revert instead
* of returning `false` on failure. This behavior is nonetheless conventional
* and does not conflict with the expectations of ERC20 applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable {
using SafeMathUpgradeable for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for {name} and {symbol}, initializes {decimals} with
* a default value of 18.
*
* To select a different value for {decimals}, use {_setupDecimals}.
*
* All three of these values are immutable: they can only be set once during
* construction.
*/
function __ERC20_init(string memory name_, string memory symbol_) internal initializer {
__Context_init_unchained();
__ERC20_init_unchained(name_, symbol_);
}
function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {
_name = name_;
_symbol = symbol_;
_decimals = 18;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
* called.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual returns (uint8) {
return _decimals;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `to` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _totalSupply.sub(amount);
emit Transfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Sets {decimals} to a value other than the default one of 18.
*
* WARNING: This function should only be called from the constructor. Most
* applications that interact with token contracts will not expect
* {decimals} to ever change, and may work incorrectly if it does.
*/
function _setupDecimals(uint8 decimals_) internal virtual {
_decimals = decimals_;
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
uint256[44] private __gap;
}
// File: contracts/v076/Upgradable/DELTA_Rebasing_Liquidity_Token.sol
interface IRESERVE_VAULT {
function flashBorrowEverything() external;
}
interface IDELTA_LSW {
function totalWETHEarmarkedForReferrers() external view returns (uint256);
}
interface IUNILIKE_FACTORY {
function getPair(address,address) external view returns(address);
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IBAL_CALC {
function SUSHI_DELTA_X_WETH_PAIR() external view returns (address);
function TRANSFER_HANDLER() external view returns (address);
}
interface ITRANSFER_HANDLER {
function SUSHI_DELTA_WETH_PAIR() external view returns(address);
}
contract DELTA_Rebasing_Liquidity_Token is IRebasingLiquidityToken, ERC20Upgradeable {
using SafeMathUpgradeable for uint256;
struct AddressCache {
address deltaxWethPairAddress;
IDeltaToken deltaToken;
IUniswapV2Pair deltaxWethPair;
}
uint256 public override rlpPerLP;
uint256 public _dailyVolumeTargetETH;
uint256 private lastTargetUpdate;
uint256 public ethVolumeRemaining;
//immutables and constants
IUniswapV2Pair public constant UNI_DELTA_WETH_PAIR = IUniswapV2Pair(0x7D7E813082eF6c143277c71786e5bE626ec77b20); // Changed to constant in sushi update
IDeltaToken public constant DELTA = IDeltaToken(0x9EA3b5b4EC044b70375236A281986106457b20EF); // Changed to constant in sushi update
address constant internal DEAD_BEEF = 0xDeaDbeefdEAdbeefdEadbEEFdeadbeEFdEaDbeeF;
address public constant LSW = 0xdaFCE5670d3F67da9A3A44FE6bc36992e5E2beaB;
address public constant RESERVE_VAULT = 0x6B29A3f9a1E378A57410dC480c1b19F4f89dE848; // Changed to constant in sushi update
IWETH public constant WETH = IWETH(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
uint256 constant public _DAILY_PERCENTAGE_COST_INCREASE_TO_MINT_LP = 10;
// !!!!!!!!!!!!!!!!!!
// Sushi update added
// !!!!!!!!!!!!!!!!!!
// immutables and constants
address constant public SUSHI_FACTORY = 0xC0AEe478e3658e2610c5F7A4A2E1777cE9e4f2Ac;
IUniswapV2Pair public constant SUSHI_DELTA_WETH_PAIR = IUniswapV2Pair(0x1498bd576454159Bb81B5Ce532692a8752D163e8); // calculated address
address immutable private NEW_TRANSFER_HANDLER;
address immutable private NEW_BALANCE_CALCULATOR;
address constant private DELTA_MULTISIG = 0xB2d834dd31816993EF53507Eb1325430e67beefa;
// storage slot state
bool public migratedToSushi;
constructor (address newTransferHandler, address newBalanceCalculator) public {
// Safety checks for correct implementation
require(ITRANSFER_HANDLER(newTransferHandler).SUSHI_DELTA_WETH_PAIR() == address(SUSHI_DELTA_WETH_PAIR), "Wrong config for transfer handler");
require(IBAL_CALC(newBalanceCalculator).SUSHI_DELTA_X_WETH_PAIR() == address(SUSHI_DELTA_WETH_PAIR), "Wrong config to balcalc");
require(IBAL_CALC(newBalanceCalculator).TRANSFER_HANDLER() == newTransferHandler, "Wrong transfer handler in bal calculator");
NEW_TRANSFER_HANDLER = newTransferHandler;
NEW_BALANCE_CALCULATOR = newBalanceCalculator;
}
function _migrateToSushi() private {
bool sushiPairAlreadyExists = IUNILIKE_FACTORY(SUSHI_FACTORY).getPair(address(DELTA), address(WETH)) != address(0);
require(!sushiPairAlreadyExists, "Pair is already created this is unsupported");
address createdPairAddress = IUNILIKE_FACTORY(SUSHI_FACTORY).createPair(address(DELTA), address(WETH));
require(createdPairAddress == address(SUSHI_DELTA_WETH_PAIR), "Created pair does not match calculated pair");
// We migrate our liquidity to sushi
// 1. Remove all liquidity from the DELTA UNI pool
uint256 balanceUNILP = UNI_DELTA_WETH_PAIR.balanceOf(address(this));
UNI_DELTA_WETH_PAIR.transfer(address(UNI_DELTA_WETH_PAIR), balanceUNILP);
UNI_DELTA_WETH_PAIR.burn(address(this));
// 2. We take those tokens and mint new liquidity in SUSHI
// !! this transfer is to sushi
uint256 wethBalance = WETH.balanceOf(address(this));
uint256 deltaBalance = DELTA.balanceOf(address(this));
DELTA.transfer(address(SUSHI_DELTA_WETH_PAIR), deltaBalance);
WETH.transfer(address(SUSHI_DELTA_WETH_PAIR), wethBalance);
uint256 mintedSLP = SUSHI_DELTA_WETH_PAIR.mint(address(this));
// delta always token 0
(uint256 reserveSushiDELTA,uint256 reserveSushiWETH,) = SUSHI_DELTA_WETH_PAIR.getReserves();
{ // Safety check scope
// We allow max 2% difference in new LP +/-
// Note this will fail as well if the noVesting is set wrong
uint256 upperBound = balanceUNILP.mul(102).div(100);
uint256 lowerBound = balanceUNILP.mul(98).div(100);
require(mintedSLP <= upperBound, "We minted too much SLP");
require(mintedSLP >= lowerBound, "We minted too little SLP - Is the new pair noVesting?");
}
// 3. We set the migrated flag
migratedToSushi = true;
// 4. We upgrade the balanceHandler and transferHandler to new ones that have sushi pair
// Sushi pair is 0x1498bd576454159Bb81B5Ce532692a8752D163e8
// Accept gov
DELTA.acceptGovernance();
// Set correct new handlers with sushi
DELTA.setTokenTransferHandler(NEW_TRANSFER_HANDLER);
DELTA.setBalanceCalculator(NEW_BALANCE_CALCULATOR);
DELTA.setPendingGovernance(DELTA_MULTISIG);
// 5. Since this is inside a callback from deltatoken
// The LP in pair will be changed back to 0
// And work as previously with uni
}
function migrateToSushi() public {
onlyMultisig();
// Skips safety checks hence onlymultisig
DELTA.performLiquidityRebasing();
}
// @notice wraps all LP tokens of the caller, requires allowance
// @dev intent of this function is to get the balance of the caller, and wrap his entire balance, update the basetoken supply, and issue the caller amount of tokens that we transfered from him
function wrap() public override {
_performWrap(); // This doesn't return because LSW doesn't expect a return value and we can't adjust it now.
}
function wrapWithReturn() external override returns (uint256) {
return _performWrap();
}
function _performWrap() internal returns (uint256) {
// Note: Uniswap is no longer supported by rLP. 👀 👀 👀 That was fast
uint256 callerBalanceOfSLP = SUSHI_DELTA_WETH_PAIR.balanceOf(msg.sender);
require(callerBalanceOfSLP > 0, "No tokens to wrap");
if(callerBalanceOfSLP > 0) {
safeTransferFrom(address(SUSHI_DELTA_WETH_PAIR), msg.sender, address(this), callerBalanceOfSLP);
}
uint256 garnishedBalance = callerBalanceOfSLP.mul(rlpPerLP).div(1e18);
_mint(msg.sender, garnishedBalance);
return garnishedBalance;
}
function safeTransferFrom(address token, address from, address to, uint value) internal {
// bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED');
}
function rebase() public {
require(msg.sender == tx.origin, "Smart wallets cannot call this function");
// TODO remove after implementing sushi rebasing
revert("No rebasing until sushi migration is complete");
uint256 deltaBalance = DELTA.balanceOf(address(this));
if(deltaBalance > 0) { // remove if we have DELTA in here for some reason
DELTA.transfer(RESERVE_VAULT, deltaBalance);
}
// Collect pre-rebasing stats
(uint256 preVolumeDELTAReserve, uint256 preVolumeWETHReserve,) = UNI_DELTA_WETH_PAIR.getReserves();
uint256 preVolumeLPSupply = UNI_DELTA_WETH_PAIR.totalSupply();
uint256 preVolumeLPBalance = UNI_DELTA_WETH_PAIR.balanceOf(address(this));
// Have the delta token allow for burning of LP, temporarily.
// This will call tokenCaller and them proceed to call reserveCaller and to numberLoops of max transfers
// And re-add LP tokens payback loan... hence we wrap this in few safety checks
DELTA.performLiquidityRebasing();
// calls >tokenCaller >reserveCaller on this contract in order
// Collect post-rebasing stats
(uint256 postVolumeDELTAReserve, uint256 postVolumeWETHReserve,) = UNI_DELTA_WETH_PAIR.getReserves();
uint256 postVolumeLPSupply = UNI_DELTA_WETH_PAIR.totalSupply();
uint256 postVolumeLPBalance = UNI_DELTA_WETH_PAIR.balanceOf(address(this));
// All my homies hate division
// WHERE IS MY FUCKING MONEY?
require(postVolumeDELTAReserve == preVolumeDELTAReserve, "Delta reserve has changed");
require(preVolumeWETHReserve + 10 > postVolumeWETHReserve && postVolumeWETHReserve >= preVolumeWETHReserve , "WETH reserve out of bounds");
require(preVolumeLPBalance + 1e4 >= postVolumeLPBalance && postVolumeLPBalance + 1e5 > preVolumeLPBalance , "LP balance change not within bounds");
require(preVolumeLPSupply + 1e4 >= postVolumeLPSupply && postVolumeLPSupply + 1e5 > preVolumeLPSupply, "LP Supply change not within bounds");
}
// Delta token calls this after performLiquidityRebasing is in the middle of execution on the token contract
function tokenCaller() override public {
require(msg.sender == address(DELTA));
if(!migratedToSushi ) {
_migrateToSushi();
} else {
revert("Unimplemented for Sushi");
// TODO after sushi rebasing is done
// IRESERVE_VAULT(RESERVE_VAULT).flashBorrowEverything();
}
}
function volumeGeneratingTrades( IDeltaToken _delta, IUniswapV2Pair _pair, uint256 ethTradeVolumeNeededToHitTarget) internal returns (uint256 newVolumeETHRemaining) {
uint256 balanceWETH = WETH.balanceOf(address(this));
(uint256 unsiwapReserveDelta, uint256 uniswapReserveWETH, ) = _pair.getReserves();
uint256 amount0In = unsiwapReserveDelta.mul(1e12).div(uniswapReserveWETH).mul(balanceWETH).div(1e12); // Amount DELTA to send every transfer to get balanceWETH if there was no fee
uint256 amount0Out = amount0In * 10000/10161; // 0.6% slippage + ineffciencies;
address addressPair = address(_pair);
uint256 loops;
while(loops < 50) {
WETH.transfer(addressPair, balanceWETH);
_delta.adjustBalanceOfNoVestingAccount(addressPair, amount0In, true); // Add the amountIn back uniswap treats it like a transfer and we dont have to guarantee that we have that delta
// DELTA + WETH for DELTA * 0.994 + WETH
// Quadruple WETH in volume
_pair.swap(amount0Out, balanceWETH, address(this), "");
_delta.adjustBalanceOfNoVestingAccount(addressPair, unsiwapReserveDelta, false); // Adjust back to reserves ( would have higher else and print dragonflies)
_pair.sync(); // Force reserves to show that
// Note that WETH balance will not change
if(balanceWETH > ethTradeVolumeNeededToHitTarget) {
return 0;
} else {
ethTradeVolumeNeededToHitTarget -= balanceWETH;
loops++;
}
}
// This can be non 0 if we are over 50 loops which is straining this algorithm
newVolumeETHRemaining = ethTradeVolumeNeededToHitTarget;
}
function setUpDailyVolumeTarget(uint256 ethWholeUnits, bool hourlyRebaseRightAway) public {
onlyMultisig();
_dailyVolumeTargetETH = ethWholeUnits * 1 ether;
lastTargetUpdate = hourlyRebaseRightAway ? block.timestamp - 1 hours : block.timestamp; // can rebase right away rebase
}
function getRemainingETHInVolumeTarget() public view returns (uint256 remainingVolumeInETH, uint256 secondsSinceLastUpdate) {
secondsSinceLastUpdate = (block.timestamp - lastTargetUpdate);
uint256 hoursSinceLastUpdate = secondsSinceLastUpdate / 1 hours;
remainingVolumeInETH = (_dailyVolumeTargetETH / 24).mul(hoursSinceLastUpdate).add(ethVolumeRemaining); // We dont allow partial hours to not have too much volume from calls
}
function updateRemainingETH() private returns (uint256) {
(uint256 remainingVolumeInETH, uint256 secondsSinceLastUpdate) = getRemainingETHInVolumeTarget();
lastTargetUpdate = block.timestamp - (secondsSinceLastUpdate % 1 hours); // we carry over the rest of 1hour
return remainingVolumeInETH;
}
function reduceLpRatio(uint256 percentReductionE12) private {
uint256 ratio = rlpPerLP;
rlpPerLP = ratio.sub( ratio.mul(percentReductionE12).div(1e14) );
}
// The delta reserve calls this during execution in order to complete flash borrowing
function reserveCaller(uint256 borrowedDELTA, uint256 borrowedWETH) public override {
// Reserve vault calls this contract with the amount of DELTA and WETH it borrowed to us.
// 1) We find a optimal DELTA to add with all the WETH to get LP tokens
// 2) We burn half of all LP tokens we have ( the newly minted + ones in this contract)
// Only half can be traded at a time because of uniswap reserve requirements
// 3) We do loop of DELTA and WETH trades for DELTA and WETH. With every time removing 0.6% of delta we expect to pay the fee (0.3*2)
// 4) We sell DELTA to get WETH
// 5) We keep changing the uniswap balance and adding more and more liquidity in a loop until we have enough to cover what we had before
// trading loses us lp tokens, because the ones remaining in the pool concentrate fees
// 6) We adjust the uniswap balance to thee previos state in order to avoid price changing
// 7) We repay the loan
// 8) We adjust the uniswap DELTA reciever ratio, in order to make LP tokens more to mint
// We have to take into account the totalSupply change in LP tokens
require(msg.sender == RESERVE_VAULT);
// We update the target timestamp and consume all remaining ETH that was unspent.
uint256 ethTradeVolumeNeededToHitTarget = updateRemainingETH();
require(ethTradeVolumeNeededToHitTarget > 0, "Can't generate volume, wait until a full hour still last targetUpdate is up");
uint256 balanceLPBeforeMintingAndRebasing = UNI_DELTA_WETH_PAIR.balanceOf(address(this));
// We got a loan from reserve vault
// We have to figure out how to utilize it
(uint256 unsiwapReserveDelta, uint256 uniswapReserveWETH,) = UNI_DELTA_WETH_PAIR.getReserves();
// If we borrowed WETH, we mint
if(borrowedWETH > 0) {
uint256 balanceWETHWithLoan = WETH.balanceOf(address(this));
uint256 optimalDELTAToMatchAllWETH = UniswapV2Library.quote(balanceWETHWithLoan, uniswapReserveWETH, unsiwapReserveDelta);
// Send everything to add liquidity
DELTA.adjustBalanceOfNoVestingAccount(address(UNI_DELTA_WETH_PAIR), optimalDELTAToMatchAllWETH, true);
WETH.transfer(address(UNI_DELTA_WETH_PAIR), balanceWETHWithLoan);
UNI_DELTA_WETH_PAIR.mint(address(this));
}
// We remove half of the liquidity
// Note that half is the max because you cant get out more than reserves
// Half is when we have all teh lp tokens
UNI_DELTA_WETH_PAIR.transfer(address(UNI_DELTA_WETH_PAIR), UNI_DELTA_WETH_PAIR.balanceOf(address(this)) / 2);
UNI_DELTA_WETH_PAIR.burn(address(this));
// Perform volume trades, and reduce LP ratio based on the volume that gets filled successfully
{ // scope for unfilledEthVolumeRemaining, newRatio
uint256 unfilledEthVolumeRemaining = volumeGeneratingTrades(DELTA, UNI_DELTA_WETH_PAIR, ethTradeVolumeNeededToHitTarget);
uint256 volumeFulfilled = ethTradeVolumeNeededToHitTarget.sub(unfilledEthVolumeRemaining);
uint256 lpRatioPercentReductionE12 = volumeFulfilled.mul(1e12).div(_dailyVolumeTargetETH).mul(_DAILY_PERCENTAGE_COST_INCREASE_TO_MINT_LP);
// Adjust the ratio by the remianing eth to trade
// If its 10% a day this should return 10/24 for every hour of volume = 0.41 * 1e12 = 410000000000;
reduceLpRatio(lpRatioPercentReductionE12);
ethVolumeRemaining = unfilledEthVolumeRemaining;
}
// At this point we have either too much or too little LP tokens
// Since we borrowed we might have too much
// Or we might have too little depending on when borrowed is less adding it than we already have
// We branch the logic dependent on it
uint256 balanceLPNow = UNI_DELTA_WETH_PAIR.balanceOf(address(this));
if(balanceLPNow > balanceLPBeforeMintingAndRebasing) { // We have more or exactly the balance we had before
// We burn the difference
uint256 difference = balanceLPNow - balanceLPBeforeMintingAndRebasing;
UNI_DELTA_WETH_PAIR.transfer(address(UNI_DELTA_WETH_PAIR), difference);
UNI_DELTA_WETH_PAIR.burn(address(this));
DELTA.adjustBalanceOfNoVestingAccount(address(UNI_DELTA_WETH_PAIR), unsiwapReserveDelta, false);
} else { // Since we dont let accumulation to happen in the tokens vy adjusting balances directly
// we can safely assume we just need to give back the WETH and DELTA back to previous levels to get LP tokens we need
// This assumpion is changed in a function wrapping this one
(, uint256 currentUniswapReserveWETH,) = UNI_DELTA_WETH_PAIR.getReserves();
// Reserve has too little WETH
// We need to send the difference
// Note this is also the case when we have less LP tokens than we should
// Fees have not accumulated in the remaining supply of tokens as the reserves did not change
uint256 ethNeeded = uniswapReserveWETH.sub(currentUniswapReserveWETH);
if(ethNeeded > 0) {
WETH.transfer(address(UNI_DELTA_WETH_PAIR), ethNeeded);
DELTA.adjustBalanceOfNoVestingAccount(address(UNI_DELTA_WETH_PAIR), unsiwapReserveDelta, false);
UNI_DELTA_WETH_PAIR.mint(address(this));
}
// Reserves now have as much DELTA and WETH as they should.
}
if(borrowedWETH > 0) {
// repay weth loan
// note that reserves match up with weth it coudnt have gone anywhere but to us, but this convinently tests that too
WETH.transfer(RESERVE_VAULT, WETH.balanceOf(address(this))); // -1 inefficiencies
DELTA.adjustBalanceOfNoVestingAccount(RESERVE_VAULT, borrowedDELTA, true);
}
UNI_DELTA_WETH_PAIR.sync();
// We directly set the balance of this address to 0
DELTA.adjustBalanceOfNoVestingAccount(address(this), 0, false);
}
function onlyMultisig() private view {
require(msg.sender == DELTA.governance(), "!governance");
}
}
Compiler Settings
{"remappings":[],"optimizer":{"runs":200,"enabled":true},"metadata":{"bytecodeHash":"ipfs"},"libraries":{},"evmVersion":"istanbul","compilationTarget":{"DELTA_Rebasing_Liquidity_Token.sol":"DELTA_Rebasing_Liquidity_Token"}}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"newTransferHandler","internalType":"address"},{"type":"address","name":"newBalanceCalculator","internalType":"address"}]},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"spender","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IDeltaToken"}],"name":"DELTA","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"LSW","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"RESERVE_VAULT","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IUniswapV2Pair"}],"name":"SUSHI_DELTA_WETH_PAIR","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"SUSHI_FACTORY","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IUniswapV2Pair"}],"name":"UNI_DELTA_WETH_PAIR","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IWETH"}],"name":"WETH","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"_DAILY_PERCENTAGE_COST_INCREASE_TO_MINT_LP","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"_dailyVolumeTargetETH","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allowance","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"spender","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"decimals","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"decreaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"subtractedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"ethVolumeRemaining","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"remainingVolumeInETH","internalType":"uint256"},{"type":"uint256","name":"secondsSinceLastUpdate","internalType":"uint256"}],"name":"getRemainingETHInVolumeTarget","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"increaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"addedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"migrateToSushi","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"migratedToSushi","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"rebase","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"reserveCaller","inputs":[{"type":"uint256","name":"borrowedDELTA","internalType":"uint256"},{"type":"uint256","name":"borrowedWETH","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"rlpPerLP","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setUpDailyVolumeTarget","inputs":[{"type":"uint256","name":"ethWholeUnits","internalType":"uint256"},{"type":"bool","name":"hourlyRebaseRightAway","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"tokenCaller","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transfer","inputs":[{"type":"address","name":"recipient","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferFrom","inputs":[{"type":"address","name":"sender","internalType":"address"},{"type":"address","name":"recipient","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"wrap","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"wrapWithReturn","inputs":[]}]
Contract Creation Code
0x60c06040523480156200001157600080fd5b50604051620036a9380380620036a98339810160408190526200003491620002bd565b731498bd576454159bb81b5ce532692a8752d163e86001600160a01b0316826001600160a01b0316639d69b45b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200008c57600080fd5b505afa158015620000a1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000c7919062000299565b6001600160a01b031614620000f95760405162461bcd60e51b8152600401620000f09062000373565b60405180910390fd5b731498bd576454159bb81b5ce532692a8752d163e86001600160a01b0316816001600160a01b0316638867d8206040518163ffffffff1660e01b815260040160206040518083038186803b1580156200015157600080fd5b505afa15801562000166573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200018c919062000299565b6001600160a01b031614620001b55760405162461bcd60e51b8152600401620000f0906200033c565b816001600160a01b0316816001600160a01b0316638e3115976040518163ffffffff1660e01b815260040160206040518083038186803b158015620001f957600080fd5b505afa1580156200020e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000234919062000299565b6001600160a01b0316146200025d5760405162461bcd60e51b8152600401620000f090620002f4565b6001600160601b0319606092831b8116608052911b1660a052620003b4565b80516001600160a01b03811681146200029457600080fd5b919050565b600060208284031215620002ab578081fd5b620002b6826200027c565b9392505050565b60008060408385031215620002d0578081fd5b620002db836200027c565b9150620002eb602084016200027c565b90509250929050565b60208082526028908201527f57726f6e67207472616e736665722068616e646c657220696e2062616c2063616040820152673631bab630ba37b960c11b606082015260800190565b60208082526017908201527f57726f6e6720636f6e66696720746f2062616c63616c63000000000000000000604082015260600190565b60208082526021908201527f57726f6e6720636f6e66696720666f72207472616e736665722068616e646c656040820152603960f91b606082015260800190565b60805160601c60a05160601c6132cb620003de60003980611d41525080611cbe52506132cb6000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c80638e857ed41161010f578063b753bb47116100a2578063ecb5fff611610071578063ecb5fff614610371578063eef192dc14610379578063f680cf6714610381578063fc482dec14610389576101e5565b8063b753bb4714610346578063d46eb1191461034e578063dd62ed3e14610356578063de5b234d14610369576101e5565b8063a9059cbb116100de578063a9059cbb1461031b578063ad5c46481461032e578063af14052c14610336578063b1359f6d1461033e576101e5565b80638e857ed4146102f057806395d89b41146102f85780639d69b45b14610300578063a457c2d714610308576101e5565b806339509351116101875780638332993a116101565780638332993a146102c3578063868d58a0146102cb578063875c971b146102d35780638a406c78146102e8576101e5565b806339509351146102775780633a2404f31461028a5780633e3c2e981461029d57806370a08231146102b0576101e5565b806318160ddd116101c357806318160ddd146102325780631fff85ea1461024757806323b872dd1461024f578063313ce56714610262576101e5565b8063061fcf15146101ea57806306fdde03146101f4578063095ea7b314610212575b600080fd5b6101f261039f565b005b6101fc6103f3565b6040516102099190612b3c565b60405180910390f35b610225610220366004612972565b610489565b6040516102099190612b31565b61023a6104a7565b6040516102099190613140565b6101f26104ad565b61022561025d366004612932565b610518565b61026a6105a0565b6040516102099190613185565b610225610285366004612972565b6105a9565b6101f2610298366004612a43565b6105f7565b6101f26102ab366004612a1f565b611256565b61023a6102be3660046128c2565b611284565b61023a6112a3565b61023a6112a9565b6102db6112af565b6040516102099190612aa3565b61023a6112c1565b6102db6112d0565b6101fc6112e8565b6102db611349565b610225610316366004612972565b611361565b610225610329366004612972565b6113c9565b6102db6113dd565b6101f26113f5565b61023a61142c565b6102db611431565b6101f2611449565b61023a6103643660046128fa565b611454565b61022561147f565b6102db611488565b6102db61149a565b61023a6114b2565b6103916114b8565b604051610209929190613149565b336000805160206131e3833981519152146103b957600080fd5b60695460ff166103d0576103cb6114f2565b6103f1565b60405162461bcd60e51b81526004016103e890613043565b60405180910390fd5b565b60368054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561047f5780601f106104545761010080835404028352916020019161047f565b820191906000526020600020905b81548152906001019060200180831161046257829003601f168201915b5050505050905090565b600061049d610496611e1c565b8484611e20565b5060015b92915050565b60355490565b6104b5611ed4565b6000805160206131e38339815191526001600160a01b031663d8143c586040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156104fe57600080fd5b505af1158015610512573d6000803e3d6000fd5b50505050565b6000610525848484611f83565b61059584610531611e1c565b61059085604051806060016040528060288152602001613249602891396001600160a01b038a1660009081526034602052604081209061056f611e1c565b6001600160a01b031681526020810191909152604001600020549190612098565b611e20565b5060015b9392505050565b60385460ff1690565b600061049d6105b6611e1c565b8461059085603460006105c7611e1c565b6001600160a01b03908116825260208083019390935260409182016000908120918c1681529252902054906120c4565b33736b29a3f9a1e378a57410dc480c1b19f4f89de8481461061757600080fd5b60006106216120e9565b9050600081116106435760405162461bcd60e51b81526004016103e890612dd5565b6040516370a0823160e01b8152600090600080516020613229833981519152906370a0823190610677903090600401612aa3565b60206040518083038186803b15801561068f57600080fd5b505afa1580156106a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c79190612a07565b90506000806000805160206132298339815191526001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561071357600080fd5b505afa158015610727573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061074b91906129b9565b506001600160701b0391821693501690508415610995576040516370a0823160e01b815260009073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2906370a082319061079c903090600401612aa3565b60206040518083038186803b1580156107b457600080fd5b505afa1580156107c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ec9190612a07565b905060006107fb828486612111565b60405163c670055360e01b81529091506000805160206131e38339815191529063c67005539061084290600080516020613229833981519152908590600190600401612af5565b600060405180830381600087803b15801561085c57600080fd5b505af1158015610870573d6000803e3d6000fd5b505060405163a9059cbb60e01b815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2925063a9059cbb91506108bb90600080516020613229833981519152908690600401612b18565b602060405180830381600087803b1580156108d557600080fd5b505af11580156108e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090d919061299d565b506040516335313c2160e11b815260008051602061322983398151915290636a6278429061093f903090600401612aa3565b602060405180830381600087803b15801561095957600080fd5b505af115801561096d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109919190612a07565b5050505b6040516370a0823160e01b81526000805160206132298339815191529063a9059cbb90829060029082906370a08231906109d3903090600401612aa3565b60206040518083038186803b1580156109eb57600080fd5b505afa1580156109ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a239190612a07565b81610a2a57fe5b046040518363ffffffff1660e01b8152600401610a48929190612b18565b602060405180830381600087803b158015610a6257600080fd5b505af1158015610a76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9a919061299d565b5060405163226bf2d160e21b8152600080516020613229833981519152906389afcb4490610acc903090600401612aa3565b6040805180830381600087803b158015610ae557600080fd5b505af1158015610af9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1d9190612a64565b50506000610b486000805160206131e383398151915260008051602061322983398151915287612179565b90506000610b5686836124fa565b90506000610b89600a610b83606654610b7d64e8d4a510008761252290919063ffffffff16565b9061255c565b90612522565b9050610b948161258e565b50506068556040516370a0823160e01b8152600090600080516020613229833981519152906370a0823190610bcd903090600401612aa3565b60206040518083038186803b158015610be557600080fd5b505afa158015610bf9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1d9190612a07565b905083811115610db15760405163a9059cbb60e01b8152848203906000805160206132298339815191529063a9059cbb90610c5e9083908590600401612b18565b602060405180830381600087803b158015610c7857600080fd5b505af1158015610c8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cb0919061299d565b5060405163226bf2d160e21b8152600080516020613229833981519152906389afcb4490610ce2903090600401612aa3565b6040805180830381600087803b158015610cfb57600080fd5b505af1158015610d0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d339190612a64565b505060405163c670055360e01b81526000805160206131e38339815191529063c670055390610d7990600080516020613229833981519152908890600090600401612af5565b600060405180830381600087803b158015610d9357600080fd5b505af1158015610da7573d6000803e3d6000fd5b5050505050610fec565b60006000805160206132298339815191526001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015610dfa57600080fd5b505afa158015610e0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3291906129b9565b506001600160701b0316915060009050610e4c84836124fa565b90508015610fe95760405163a9059cbb60e01b815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc29063a9059cbb90610e9b90600080516020613229833981519152908590600401612b18565b602060405180830381600087803b158015610eb557600080fd5b505af1158015610ec9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eed919061299d565b5060405163c670055360e01b81526000805160206131e38339815191529063c670055390610f3290600080516020613229833981519152908990600090600401612af5565b600060405180830381600087803b158015610f4c57600080fd5b505af1158015610f60573d6000803e3d6000fd5b50506040516335313c2160e11b81526000805160206132298339815191529250636a6278429150610f95903090600401612aa3565b602060405180830381600087803b158015610faf57600080fd5b505af1158015610fc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe79190612a07565b505b50505b8515611184576040516370a0823160e01b815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc29063a9059cbb90736b29a3f9a1e378a57410dc480c1b19f4f89de8489083906370a0823190611047903090600401612aa3565b60206040518083038186803b15801561105f57600080fd5b505afa158015611073573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110979190612a07565b6040518363ffffffff1660e01b81526004016110b4929190612b18565b602060405180830381600087803b1580156110ce57600080fd5b505af11580156110e2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611106919061299d565b5060405163c670055360e01b81526000805160206131e38339815191529063c67005539061115190736b29a3f9a1e378a57410dc480c1b19f4f89de848908b90600190600401612af5565b600060405180830381600087803b15801561116b57600080fd5b505af115801561117f573d6000803e3d6000fd5b505050505b6000805160206132298339815191526001600160a01b031663fff6cae96040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156111cd57600080fd5b505af11580156111e1573d6000803e3d6000fd5b505060405163c670055360e01b81526000805160206131e3833981519152925063c6700553915061121b9030906000908190600401612af5565b600060405180830381600087803b15801561123557600080fd5b505af1158015611249573d6000803e3d6000fd5b5050505050505050505050565b61125e611ed4565b670de0b6b3a7640000820260665580611277574261127d565b610e1042035b6067555050565b6001600160a01b0381166000908152603360205260409020545b919050565b60685481565b60665481565b60008051602061322983398151915281565b60006112cb6125b6565b905090565b736b29a3f9a1e378a57410dc480c1b19f4f89de84881565b60378054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561047f5780601f106104545761010080835404028352916020019161047f565b731498bd576454159bb81b5ce532692a8752d163e881565b600061049d61136e611e1c565b84610590856040518060600160405280602581526020016132716025913960346000611398611e1c565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190612098565b600061049d6113d6611e1c565b8484611f83565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b3332146114145760405162461bcd60e51b81526004016103e890612bb2565b60405162461bcd60e51b81526004016103e890612cfc565b600a81565b73c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac81565b6114516125b6565b50565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b60695460ff1681565b6000805160206131e383398151915281565b73dafce5670d3f67da9a3a44fe6bc36992e5e2beab81565b60655481565b606754600090420381610e10820490506114eb6068546114e5836018606654816114de57fe5b0490612522565b906120c4565b9250509091565b60405163e6a4390560e01b8152600090819073c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac9063e6a4390590611552906000805160206131e38339815191529073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290600401612ab7565b60206040518083038186803b15801561156a57600080fd5b505afa15801561157e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a291906128de565b6001600160a01b031614801591506115cc5760405162461bcd60e51b81526004016103e890612e8e565b6040516364e329cb60e11b815260009073c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac9063c9c653969061162a906000805160206131e38339815191529073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290600401612ab7565b602060405180830381600087803b15801561164457600080fd5b505af1158015611658573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061167c91906128de565b90506001600160a01b038116731498bd576454159bb81b5ce532692a8752d163e8146116ba5760405162461bcd60e51b81526004016103e8906130be565b6040516370a0823160e01b8152600090600080516020613229833981519152906370a08231906116ee903090600401612aa3565b60206040518083038186803b15801561170657600080fd5b505afa15801561171a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061173e9190612a07565b60405163a9059cbb60e01b81529091506000805160206132298339815191529063a9059cbb906117749083908590600401612b18565b602060405180830381600087803b15801561178e57600080fd5b505af11580156117a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117c6919061299d565b5060405163226bf2d160e21b8152600080516020613229833981519152906389afcb44906117f8903090600401612aa3565b6040805180830381600087803b15801561181157600080fd5b505af1158015611825573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118499190612a64565b50506040516370a0823160e01b815260009073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2906370a0823190611885903090600401612aa3565b60206040518083038186803b15801561189d57600080fd5b505afa1580156118b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118d59190612a07565b6040516370a0823160e01b81529091506000906000805160206131e3833981519152906370a082319061190c903090600401612aa3565b60206040518083038186803b15801561192457600080fd5b505afa158015611938573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061195c9190612a07565b60405163a9059cbb60e01b81529091506000805160206131e38339815191529063a9059cbb906119a690731498bd576454159bb81b5ce532692a8752d163e8908590600401612b18565b602060405180830381600087803b1580156119c057600080fd5b505af11580156119d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f8919061299d565b5060405163a9059cbb60e01b815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc29063a9059cbb90611a4690731498bd576454159bb81b5ce532692a8752d163e8908690600401612b18565b602060405180830381600087803b158015611a6057600080fd5b505af1158015611a74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a98919061299d565b506040516335313c2160e11b8152600090731498bd576454159bb81b5ce532692a8752d163e890636a62784290611ad3903090600401612aa3565b602060405180830381600087803b158015611aed57600080fd5b505af1158015611b01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b259190612a07565b9050600080731498bd576454159bb81b5ce532692a8752d163e86001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015611b7757600080fd5b505afa158015611b8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611baf91906129b9565b506001600160701b0391821693501690506000611bd26064610b7d896066612522565b90506000611be66064610b7d8a6062612522565b905081851115611c085760405162461bcd60e51b81526004016103e890612fcf565b80851015611c285760405162461bcd60e51b81526004016103e890612d80565b50506069805460ff19166001179055604080516308e3bf2f60e21b815290516000805160206131e38339815191529163238efcbc91600480830192600092919082900301818387803b158015611c7d57600080fd5b505af1158015611c91573d6000803e3d6000fd5b505060405163309baea960e21b81526000805160206131e3833981519152925063c26ebaa49150611ce6907f000000000000000000000000000000000000000000000000000000000000000090600401612aa3565b600060405180830381600087803b158015611d0057600080fd5b505af1158015611d14573d6000803e3d6000fd5b5050604051632d562e9560e11b81526000805160206131e38339815191529250635aac5d2a9150611d69907f000000000000000000000000000000000000000000000000000000000000000090600401612aa3565b600060405180830381600087803b158015611d8357600080fd5b505af1158015611d97573d6000803e3d6000fd5b5050604051630abb603560e01b81526000805160206131e38339815191529250630abb60359150611de09073b2d834dd31816993ef53507eb1325430e67beefa90600401612aa3565b600060405180830381600087803b158015611dfa57600080fd5b505af1158015611e0e573d6000803e3d6000fd5b505050505050505050505050565b3390565b6001600160a01b038316611e465760405162461bcd60e51b81526004016103e890612fff565b6001600160a01b038216611e6c5760405162461bcd60e51b81526004016103e890612c1e565b6001600160a01b0380841660008181526034602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590611ec7908590613140565b60405180910390a3505050565b6000805160206131e38339815191526001600160a01b0316635aa6e6756040518163ffffffff1660e01b815260040160206040518083038186803b158015611f1b57600080fd5b505afa158015611f2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f5391906128de565b6001600160a01b0316336001600160a01b0316146103f15760405162461bcd60e51b81526004016103e890612bf9565b6001600160a01b038316611fa95760405162461bcd60e51b81526004016103e890612f8a565b6001600160a01b038216611fcf5760405162461bcd60e51b81526004016103e890612b6f565b611fda8383836126bf565b61201781604051806060016040528060268152602001613203602691396001600160a01b0386166000908152603360205260409020549190612098565b6001600160a01b03808516600090815260336020526040808220939093559084168152205461204690826120c4565b6001600160a01b0380841660008181526033602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611ec7908590613140565b600081848411156120bc5760405162461bcd60e51b81526004016103e89190612b3c565b505050900390565b6000828201838110156105995760405162461bcd60e51b81526004016103e890612c8e565b60008060006120f66114b8565b91509150610e10818161210557fe5b06420360675550905090565b60008084116121325760405162461bcd60e51b81526004016103e890612f45565b6000831180156121425750600082115b61215e5760405162461bcd60e51b81526004016103e890612e46565b8261216985846126c4565b8161217057fe5b04949350505050565b6040516370a0823160e01b8152600090819073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2906370a08231906121b5903090600401612aa3565b60206040518083038186803b1580156121cd57600080fd5b505afa1580156121e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122059190612a07565b9050600080856001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561224357600080fd5b505afa158015612257573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061227b91906129b9565b506001600160701b03918216935016905060006122a764e8d4a51000610b7d86610b8386838986612522565b90506127b16127108202048760005b60328110156124eb5760405163a9059cbb60e01b815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc29063a9059cbb906122f89085908b90600401612b18565b602060405180830381600087803b15801561231257600080fd5b505af1158015612326573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061234a919061299d565b5060405163c670055360e01b81526001600160a01b038c169063c67005539061237c9085908890600190600401612af5565b600060405180830381600087803b15801561239657600080fd5b505af11580156123aa573d6000803e3d6000fd5b505060405163022c0d9f60e01b81526001600160a01b038d16925063022c0d9f91506123de9086908b903090600401613157565b600060405180830381600087803b1580156123f857600080fd5b505af115801561240c573d6000803e3d6000fd5b505060405163c670055360e01b81526001600160a01b038e16925063c670055391506124419085908a90600090600401612af5565b600060405180830381600087803b15801561245b57600080fd5b505af115801561246f573d6000803e3d6000fd5b50505050896001600160a01b031663fff6cae96040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156124ae57600080fd5b505af11580156124c2573d6000803e3d6000fd5b50505050888711156124de576000975050505050505050610599565b97869003976001016122b6565b50969998505050505050505050565b60008282111561251c5760405162461bcd60e51b81526004016103e890612cc5565b50900390565b600082612531575060006104a1565b8282028284828161253e57fe5b04146105995760405162461bcd60e51b81526004016103e890612f04565b600080821161257d5760405162461bcd60e51b81526004016103e890612d49565b81838161258657fe5b049392505050565b6065546125af6125a8655af3107a4000610b7d8486612522565b82906124fa565b6065555050565b6040516370a0823160e01b81526000908190731498bd576454159bb81b5ce532692a8752d163e8906370a08231906125f2903390600401612aa3565b60206040518083038186803b15801561260a57600080fd5b505afa15801561261e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126429190612a07565b9050600081116126645760405162461bcd60e51b81526004016103e890612ed9565b801561268a5761268a731498bd576454159bb81b5ce532692a8752d163e83330846126fb565b60006126ad670de0b6b3a7640000610b7d6065548561252290919063ffffffff16565b90506126b933826127eb565b91505090565b505050565b60008115806126df575050808202828282816126dc57fe5b04145b6104a15760405162461bcd60e51b81526004016103e890612c60565b600080856001600160a01b03166323b872dd86868660405160240161272293929190612ad1565b6040516020818303038152906040529060e01b6020820180516001600160e01b03838183161783525050505060405161275b9190612a87565b6000604051808303816000865af19150503d8060008114612798576040519150601f19603f3d011682016040523d82523d6000602084013e61279d565b606091505b50915091508180156127c75750805115806127c75750808060200190518101906127c7919061299d565b6127e35760405162461bcd60e51b81526004016103e89061307a565b505050505050565b6001600160a01b0382166128115760405162461bcd60e51b81526004016103e890613109565b61281d600083836126bf565b60355461282a90826120c4565b6035556001600160a01b03821660009081526033602052604090205461285090826120c4565b6001600160a01b0383166000818152603360205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061289f908590613140565b60405180910390a35050565b80516001600160701b038116811461129e57600080fd5b6000602082840312156128d3578081fd5b8135610599816131bf565b6000602082840312156128ef578081fd5b8151610599816131bf565b6000806040838503121561290c578081fd5b8235612917816131bf565b91506020830135612927816131bf565b809150509250929050565b600080600060608486031215612946578081fd5b8335612951816131bf565b92506020840135612961816131bf565b929592945050506040919091013590565b60008060408385031215612984578182fd5b823561298f816131bf565b946020939093013593505050565b6000602082840312156129ae578081fd5b8151610599816131d4565b6000806000606084860312156129cd578283fd5b6129d6846128ab565b92506129e4602085016128ab565b9150604084015163ffffffff811681146129fc578182fd5b809150509250925092565b600060208284031215612a18578081fd5b5051919050565b60008060408385031215612a31578182fd5b823591506020830135612927816131d4565b60008060408385031215612a55578182fd5b50508035926020909101359150565b60008060408385031215612a76578182fd5b505080516020909101519092909150565b60008251612a99818460208701613193565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b0393909316835260208301919091521515604082015260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b6000602082528251806020840152612b5b816040850160208701613193565b601f01601f19169190910160400192915050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526027908201527f536d6172742077616c6c6574732063616e6e6f742063616c6c207468697320666040820152663ab731ba34b7b760c91b606082015260800190565b6020808252600b908201526a21676f7665726e616e636560a81b604082015260600190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b60208082526014908201527364732d6d6174682d6d756c2d6f766572666c6f7760601b604082015260600190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252602d908201527f4e6f207265626173696e6720756e74696c207375736869206d6967726174696f60408201526c6e20697320636f6d706c65746560981b606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b60208082526035908201527f5765206d696e74656420746f6f206c6974746c6520534c50202d20497320746860408201527465206e65772070616972206e6f56657374696e673f60581b606082015260800190565b6020808252604b908201527f43616e27742067656e657261746520766f6c756d652c207761697420756e746960408201527f6c20612066756c6c20686f7572207374696c6c206c617374207461726765745560608201526a070646174652069732075760ac1b608082015260a00190565b60208082526028908201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4c604082015267495155494449545960c01b606082015260800190565b6020808252602b908201527f5061697220697320616c7265616479206372656174656420746869732069732060408201526a1d5b9cdd5c1c1bdc9d195960aa1b606082015260800190565b60208082526011908201527004e6f20746f6b656e7320746f207772617607c1b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b60208082526025908201527f556e697377617056324c6962726172793a20494e53554646494349454e545f416040820152641353d5539560da1b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526016908201527505765206d696e74656420746f6f206d75636820534c560541b604082015260600190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526017908201527f556e696d706c656d656e74656420666f72205375736869000000000000000000604082015260600190565b60208082526024908201527f5472616e7366657248656c7065723a205452414e534645525f46524f4d5f46416040820152631253115160e21b606082015260800190565b6020808252602b908201527f43726561746564207061697220646f6573206e6f74206d617463682063616c6360408201526a3ab630ba32b2103830b4b960a91b606082015260800190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b90815260200190565b918252602082015260400190565b92835260208301919091526001600160a01b0316604082015260806060820181905260009082015260a00190565b60ff91909116815260200190565b60005b838110156131ae578181015183820152602001613196565b838111156105125750506000910152565b6001600160a01b038116811461145157600080fd5b801515811461145157600080fdfe0000000000000000000000009ea3b5b4ec044b70375236a281986106457b20ef45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63650000000000000000000000007d7e813082ef6c143277c71786e5be626ec77b2045524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212203c6c3e022f29ff6be652f022dbf1948fdd750773989f5c303d81dceb97fb5fc764736f6c63430007060033000000000000000000000000a0bb29c7b5af808bdbf020766113d864f9262a61000000000000000000000000867dacc8bca7c6339cbdeb9a536507a7d7058634
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106101e55760003560e01c80638e857ed41161010f578063b753bb47116100a2578063ecb5fff611610071578063ecb5fff614610371578063eef192dc14610379578063f680cf6714610381578063fc482dec14610389576101e5565b8063b753bb4714610346578063d46eb1191461034e578063dd62ed3e14610356578063de5b234d14610369576101e5565b8063a9059cbb116100de578063a9059cbb1461031b578063ad5c46481461032e578063af14052c14610336578063b1359f6d1461033e576101e5565b80638e857ed4146102f057806395d89b41146102f85780639d69b45b14610300578063a457c2d714610308576101e5565b806339509351116101875780638332993a116101565780638332993a146102c3578063868d58a0146102cb578063875c971b146102d35780638a406c78146102e8576101e5565b806339509351146102775780633a2404f31461028a5780633e3c2e981461029d57806370a08231146102b0576101e5565b806318160ddd116101c357806318160ddd146102325780631fff85ea1461024757806323b872dd1461024f578063313ce56714610262576101e5565b8063061fcf15146101ea57806306fdde03146101f4578063095ea7b314610212575b600080fd5b6101f261039f565b005b6101fc6103f3565b6040516102099190612b3c565b60405180910390f35b610225610220366004612972565b610489565b6040516102099190612b31565b61023a6104a7565b6040516102099190613140565b6101f26104ad565b61022561025d366004612932565b610518565b61026a6105a0565b6040516102099190613185565b610225610285366004612972565b6105a9565b6101f2610298366004612a43565b6105f7565b6101f26102ab366004612a1f565b611256565b61023a6102be3660046128c2565b611284565b61023a6112a3565b61023a6112a9565b6102db6112af565b6040516102099190612aa3565b61023a6112c1565b6102db6112d0565b6101fc6112e8565b6102db611349565b610225610316366004612972565b611361565b610225610329366004612972565b6113c9565b6102db6113dd565b6101f26113f5565b61023a61142c565b6102db611431565b6101f2611449565b61023a6103643660046128fa565b611454565b61022561147f565b6102db611488565b6102db61149a565b61023a6114b2565b6103916114b8565b604051610209929190613149565b336000805160206131e3833981519152146103b957600080fd5b60695460ff166103d0576103cb6114f2565b6103f1565b60405162461bcd60e51b81526004016103e890613043565b60405180910390fd5b565b60368054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561047f5780601f106104545761010080835404028352916020019161047f565b820191906000526020600020905b81548152906001019060200180831161046257829003601f168201915b5050505050905090565b600061049d610496611e1c565b8484611e20565b5060015b92915050565b60355490565b6104b5611ed4565b6000805160206131e38339815191526001600160a01b031663d8143c586040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156104fe57600080fd5b505af1158015610512573d6000803e3d6000fd5b50505050565b6000610525848484611f83565b61059584610531611e1c565b61059085604051806060016040528060288152602001613249602891396001600160a01b038a1660009081526034602052604081209061056f611e1c565b6001600160a01b031681526020810191909152604001600020549190612098565b611e20565b5060015b9392505050565b60385460ff1690565b600061049d6105b6611e1c565b8461059085603460006105c7611e1c565b6001600160a01b03908116825260208083019390935260409182016000908120918c1681529252902054906120c4565b33736b29a3f9a1e378a57410dc480c1b19f4f89de8481461061757600080fd5b60006106216120e9565b9050600081116106435760405162461bcd60e51b81526004016103e890612dd5565b6040516370a0823160e01b8152600090600080516020613229833981519152906370a0823190610677903090600401612aa3565b60206040518083038186803b15801561068f57600080fd5b505afa1580156106a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c79190612a07565b90506000806000805160206132298339815191526001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561071357600080fd5b505afa158015610727573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061074b91906129b9565b506001600160701b0391821693501690508415610995576040516370a0823160e01b815260009073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2906370a082319061079c903090600401612aa3565b60206040518083038186803b1580156107b457600080fd5b505afa1580156107c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ec9190612a07565b905060006107fb828486612111565b60405163c670055360e01b81529091506000805160206131e38339815191529063c67005539061084290600080516020613229833981519152908590600190600401612af5565b600060405180830381600087803b15801561085c57600080fd5b505af1158015610870573d6000803e3d6000fd5b505060405163a9059cbb60e01b815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2925063a9059cbb91506108bb90600080516020613229833981519152908690600401612b18565b602060405180830381600087803b1580156108d557600080fd5b505af11580156108e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090d919061299d565b506040516335313c2160e11b815260008051602061322983398151915290636a6278429061093f903090600401612aa3565b602060405180830381600087803b15801561095957600080fd5b505af115801561096d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109919190612a07565b5050505b6040516370a0823160e01b81526000805160206132298339815191529063a9059cbb90829060029082906370a08231906109d3903090600401612aa3565b60206040518083038186803b1580156109eb57600080fd5b505afa1580156109ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a239190612a07565b81610a2a57fe5b046040518363ffffffff1660e01b8152600401610a48929190612b18565b602060405180830381600087803b158015610a6257600080fd5b505af1158015610a76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9a919061299d565b5060405163226bf2d160e21b8152600080516020613229833981519152906389afcb4490610acc903090600401612aa3565b6040805180830381600087803b158015610ae557600080fd5b505af1158015610af9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1d9190612a64565b50506000610b486000805160206131e383398151915260008051602061322983398151915287612179565b90506000610b5686836124fa565b90506000610b89600a610b83606654610b7d64e8d4a510008761252290919063ffffffff16565b9061255c565b90612522565b9050610b948161258e565b50506068556040516370a0823160e01b8152600090600080516020613229833981519152906370a0823190610bcd903090600401612aa3565b60206040518083038186803b158015610be557600080fd5b505afa158015610bf9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1d9190612a07565b905083811115610db15760405163a9059cbb60e01b8152848203906000805160206132298339815191529063a9059cbb90610c5e9083908590600401612b18565b602060405180830381600087803b158015610c7857600080fd5b505af1158015610c8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cb0919061299d565b5060405163226bf2d160e21b8152600080516020613229833981519152906389afcb4490610ce2903090600401612aa3565b6040805180830381600087803b158015610cfb57600080fd5b505af1158015610d0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d339190612a64565b505060405163c670055360e01b81526000805160206131e38339815191529063c670055390610d7990600080516020613229833981519152908890600090600401612af5565b600060405180830381600087803b158015610d9357600080fd5b505af1158015610da7573d6000803e3d6000fd5b5050505050610fec565b60006000805160206132298339815191526001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015610dfa57600080fd5b505afa158015610e0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3291906129b9565b506001600160701b0316915060009050610e4c84836124fa565b90508015610fe95760405163a9059cbb60e01b815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc29063a9059cbb90610e9b90600080516020613229833981519152908590600401612b18565b602060405180830381600087803b158015610eb557600080fd5b505af1158015610ec9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eed919061299d565b5060405163c670055360e01b81526000805160206131e38339815191529063c670055390610f3290600080516020613229833981519152908990600090600401612af5565b600060405180830381600087803b158015610f4c57600080fd5b505af1158015610f60573d6000803e3d6000fd5b50506040516335313c2160e11b81526000805160206132298339815191529250636a6278429150610f95903090600401612aa3565b602060405180830381600087803b158015610faf57600080fd5b505af1158015610fc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe79190612a07565b505b50505b8515611184576040516370a0823160e01b815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc29063a9059cbb90736b29a3f9a1e378a57410dc480c1b19f4f89de8489083906370a0823190611047903090600401612aa3565b60206040518083038186803b15801561105f57600080fd5b505afa158015611073573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110979190612a07565b6040518363ffffffff1660e01b81526004016110b4929190612b18565b602060405180830381600087803b1580156110ce57600080fd5b505af11580156110e2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611106919061299d565b5060405163c670055360e01b81526000805160206131e38339815191529063c67005539061115190736b29a3f9a1e378a57410dc480c1b19f4f89de848908b90600190600401612af5565b600060405180830381600087803b15801561116b57600080fd5b505af115801561117f573d6000803e3d6000fd5b505050505b6000805160206132298339815191526001600160a01b031663fff6cae96040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156111cd57600080fd5b505af11580156111e1573d6000803e3d6000fd5b505060405163c670055360e01b81526000805160206131e3833981519152925063c6700553915061121b9030906000908190600401612af5565b600060405180830381600087803b15801561123557600080fd5b505af1158015611249573d6000803e3d6000fd5b5050505050505050505050565b61125e611ed4565b670de0b6b3a7640000820260665580611277574261127d565b610e1042035b6067555050565b6001600160a01b0381166000908152603360205260409020545b919050565b60685481565b60665481565b60008051602061322983398151915281565b60006112cb6125b6565b905090565b736b29a3f9a1e378a57410dc480c1b19f4f89de84881565b60378054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561047f5780601f106104545761010080835404028352916020019161047f565b731498bd576454159bb81b5ce532692a8752d163e881565b600061049d61136e611e1c565b84610590856040518060600160405280602581526020016132716025913960346000611398611e1c565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190612098565b600061049d6113d6611e1c565b8484611f83565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b3332146114145760405162461bcd60e51b81526004016103e890612bb2565b60405162461bcd60e51b81526004016103e890612cfc565b600a81565b73c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac81565b6114516125b6565b50565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b60695460ff1681565b6000805160206131e383398151915281565b73dafce5670d3f67da9a3a44fe6bc36992e5e2beab81565b60655481565b606754600090420381610e10820490506114eb6068546114e5836018606654816114de57fe5b0490612522565b906120c4565b9250509091565b60405163e6a4390560e01b8152600090819073c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac9063e6a4390590611552906000805160206131e38339815191529073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290600401612ab7565b60206040518083038186803b15801561156a57600080fd5b505afa15801561157e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a291906128de565b6001600160a01b031614801591506115cc5760405162461bcd60e51b81526004016103e890612e8e565b6040516364e329cb60e11b815260009073c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac9063c9c653969061162a906000805160206131e38339815191529073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290600401612ab7565b602060405180830381600087803b15801561164457600080fd5b505af1158015611658573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061167c91906128de565b90506001600160a01b038116731498bd576454159bb81b5ce532692a8752d163e8146116ba5760405162461bcd60e51b81526004016103e8906130be565b6040516370a0823160e01b8152600090600080516020613229833981519152906370a08231906116ee903090600401612aa3565b60206040518083038186803b15801561170657600080fd5b505afa15801561171a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061173e9190612a07565b60405163a9059cbb60e01b81529091506000805160206132298339815191529063a9059cbb906117749083908590600401612b18565b602060405180830381600087803b15801561178e57600080fd5b505af11580156117a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117c6919061299d565b5060405163226bf2d160e21b8152600080516020613229833981519152906389afcb44906117f8903090600401612aa3565b6040805180830381600087803b15801561181157600080fd5b505af1158015611825573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118499190612a64565b50506040516370a0823160e01b815260009073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2906370a0823190611885903090600401612aa3565b60206040518083038186803b15801561189d57600080fd5b505afa1580156118b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118d59190612a07565b6040516370a0823160e01b81529091506000906000805160206131e3833981519152906370a082319061190c903090600401612aa3565b60206040518083038186803b15801561192457600080fd5b505afa158015611938573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061195c9190612a07565b60405163a9059cbb60e01b81529091506000805160206131e38339815191529063a9059cbb906119a690731498bd576454159bb81b5ce532692a8752d163e8908590600401612b18565b602060405180830381600087803b1580156119c057600080fd5b505af11580156119d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f8919061299d565b5060405163a9059cbb60e01b815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc29063a9059cbb90611a4690731498bd576454159bb81b5ce532692a8752d163e8908690600401612b18565b602060405180830381600087803b158015611a6057600080fd5b505af1158015611a74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a98919061299d565b506040516335313c2160e11b8152600090731498bd576454159bb81b5ce532692a8752d163e890636a62784290611ad3903090600401612aa3565b602060405180830381600087803b158015611aed57600080fd5b505af1158015611b01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b259190612a07565b9050600080731498bd576454159bb81b5ce532692a8752d163e86001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015611b7757600080fd5b505afa158015611b8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611baf91906129b9565b506001600160701b0391821693501690506000611bd26064610b7d896066612522565b90506000611be66064610b7d8a6062612522565b905081851115611c085760405162461bcd60e51b81526004016103e890612fcf565b80851015611c285760405162461bcd60e51b81526004016103e890612d80565b50506069805460ff19166001179055604080516308e3bf2f60e21b815290516000805160206131e38339815191529163238efcbc91600480830192600092919082900301818387803b158015611c7d57600080fd5b505af1158015611c91573d6000803e3d6000fd5b505060405163309baea960e21b81526000805160206131e3833981519152925063c26ebaa49150611ce6907f000000000000000000000000a0bb29c7b5af808bdbf020766113d864f9262a6190600401612aa3565b600060405180830381600087803b158015611d0057600080fd5b505af1158015611d14573d6000803e3d6000fd5b5050604051632d562e9560e11b81526000805160206131e38339815191529250635aac5d2a9150611d69907f000000000000000000000000867dacc8bca7c6339cbdeb9a536507a7d705863490600401612aa3565b600060405180830381600087803b158015611d8357600080fd5b505af1158015611d97573d6000803e3d6000fd5b5050604051630abb603560e01b81526000805160206131e38339815191529250630abb60359150611de09073b2d834dd31816993ef53507eb1325430e67beefa90600401612aa3565b600060405180830381600087803b158015611dfa57600080fd5b505af1158015611e0e573d6000803e3d6000fd5b505050505050505050505050565b3390565b6001600160a01b038316611e465760405162461bcd60e51b81526004016103e890612fff565b6001600160a01b038216611e6c5760405162461bcd60e51b81526004016103e890612c1e565b6001600160a01b0380841660008181526034602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590611ec7908590613140565b60405180910390a3505050565b6000805160206131e38339815191526001600160a01b0316635aa6e6756040518163ffffffff1660e01b815260040160206040518083038186803b158015611f1b57600080fd5b505afa158015611f2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f5391906128de565b6001600160a01b0316336001600160a01b0316146103f15760405162461bcd60e51b81526004016103e890612bf9565b6001600160a01b038316611fa95760405162461bcd60e51b81526004016103e890612f8a565b6001600160a01b038216611fcf5760405162461bcd60e51b81526004016103e890612b6f565b611fda8383836126bf565b61201781604051806060016040528060268152602001613203602691396001600160a01b0386166000908152603360205260409020549190612098565b6001600160a01b03808516600090815260336020526040808220939093559084168152205461204690826120c4565b6001600160a01b0380841660008181526033602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611ec7908590613140565b600081848411156120bc5760405162461bcd60e51b81526004016103e89190612b3c565b505050900390565b6000828201838110156105995760405162461bcd60e51b81526004016103e890612c8e565b60008060006120f66114b8565b91509150610e10818161210557fe5b06420360675550905090565b60008084116121325760405162461bcd60e51b81526004016103e890612f45565b6000831180156121425750600082115b61215e5760405162461bcd60e51b81526004016103e890612e46565b8261216985846126c4565b8161217057fe5b04949350505050565b6040516370a0823160e01b8152600090819073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2906370a08231906121b5903090600401612aa3565b60206040518083038186803b1580156121cd57600080fd5b505afa1580156121e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122059190612a07565b9050600080856001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561224357600080fd5b505afa158015612257573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061227b91906129b9565b506001600160701b03918216935016905060006122a764e8d4a51000610b7d86610b8386838986612522565b90506127b16127108202048760005b60328110156124eb5760405163a9059cbb60e01b815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc29063a9059cbb906122f89085908b90600401612b18565b602060405180830381600087803b15801561231257600080fd5b505af1158015612326573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061234a919061299d565b5060405163c670055360e01b81526001600160a01b038c169063c67005539061237c9085908890600190600401612af5565b600060405180830381600087803b15801561239657600080fd5b505af11580156123aa573d6000803e3d6000fd5b505060405163022c0d9f60e01b81526001600160a01b038d16925063022c0d9f91506123de9086908b903090600401613157565b600060405180830381600087803b1580156123f857600080fd5b505af115801561240c573d6000803e3d6000fd5b505060405163c670055360e01b81526001600160a01b038e16925063c670055391506124419085908a90600090600401612af5565b600060405180830381600087803b15801561245b57600080fd5b505af115801561246f573d6000803e3d6000fd5b50505050896001600160a01b031663fff6cae96040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156124ae57600080fd5b505af11580156124c2573d6000803e3d6000fd5b50505050888711156124de576000975050505050505050610599565b97869003976001016122b6565b50969998505050505050505050565b60008282111561251c5760405162461bcd60e51b81526004016103e890612cc5565b50900390565b600082612531575060006104a1565b8282028284828161253e57fe5b04146105995760405162461bcd60e51b81526004016103e890612f04565b600080821161257d5760405162461bcd60e51b81526004016103e890612d49565b81838161258657fe5b049392505050565b6065546125af6125a8655af3107a4000610b7d8486612522565b82906124fa565b6065555050565b6040516370a0823160e01b81526000908190731498bd576454159bb81b5ce532692a8752d163e8906370a08231906125f2903390600401612aa3565b60206040518083038186803b15801561260a57600080fd5b505afa15801561261e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126429190612a07565b9050600081116126645760405162461bcd60e51b81526004016103e890612ed9565b801561268a5761268a731498bd576454159bb81b5ce532692a8752d163e83330846126fb565b60006126ad670de0b6b3a7640000610b7d6065548561252290919063ffffffff16565b90506126b933826127eb565b91505090565b505050565b60008115806126df575050808202828282816126dc57fe5b04145b6104a15760405162461bcd60e51b81526004016103e890612c60565b600080856001600160a01b03166323b872dd86868660405160240161272293929190612ad1565b6040516020818303038152906040529060e01b6020820180516001600160e01b03838183161783525050505060405161275b9190612a87565b6000604051808303816000865af19150503d8060008114612798576040519150601f19603f3d011682016040523d82523d6000602084013e61279d565b606091505b50915091508180156127c75750805115806127c75750808060200190518101906127c7919061299d565b6127e35760405162461bcd60e51b81526004016103e89061307a565b505050505050565b6001600160a01b0382166128115760405162461bcd60e51b81526004016103e890613109565b61281d600083836126bf565b60355461282a90826120c4565b6035556001600160a01b03821660009081526033602052604090205461285090826120c4565b6001600160a01b0383166000818152603360205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061289f908590613140565b60405180910390a35050565b80516001600160701b038116811461129e57600080fd5b6000602082840312156128d3578081fd5b8135610599816131bf565b6000602082840312156128ef578081fd5b8151610599816131bf565b6000806040838503121561290c578081fd5b8235612917816131bf565b91506020830135612927816131bf565b809150509250929050565b600080600060608486031215612946578081fd5b8335612951816131bf565b92506020840135612961816131bf565b929592945050506040919091013590565b60008060408385031215612984578182fd5b823561298f816131bf565b946020939093013593505050565b6000602082840312156129ae578081fd5b8151610599816131d4565b6000806000606084860312156129cd578283fd5b6129d6846128ab565b92506129e4602085016128ab565b9150604084015163ffffffff811681146129fc578182fd5b809150509250925092565b600060208284031215612a18578081fd5b5051919050565b60008060408385031215612a31578182fd5b823591506020830135612927816131d4565b60008060408385031215612a55578182fd5b50508035926020909101359150565b60008060408385031215612a76578182fd5b505080516020909101519092909150565b60008251612a99818460208701613193565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b0393909316835260208301919091521515604082015260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b6000602082528251806020840152612b5b816040850160208701613193565b601f01601f19169190910160400192915050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526027908201527f536d6172742077616c6c6574732063616e6e6f742063616c6c207468697320666040820152663ab731ba34b7b760c91b606082015260800190565b6020808252600b908201526a21676f7665726e616e636560a81b604082015260600190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b60208082526014908201527364732d6d6174682d6d756c2d6f766572666c6f7760601b604082015260600190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252602d908201527f4e6f207265626173696e6720756e74696c207375736869206d6967726174696f60408201526c6e20697320636f6d706c65746560981b606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b60208082526035908201527f5765206d696e74656420746f6f206c6974746c6520534c50202d20497320746860408201527465206e65772070616972206e6f56657374696e673f60581b606082015260800190565b6020808252604b908201527f43616e27742067656e657261746520766f6c756d652c207761697420756e746960408201527f6c20612066756c6c20686f7572207374696c6c206c617374207461726765745560608201526a070646174652069732075760ac1b608082015260a00190565b60208082526028908201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4c604082015267495155494449545960c01b606082015260800190565b6020808252602b908201527f5061697220697320616c7265616479206372656174656420746869732069732060408201526a1d5b9cdd5c1c1bdc9d195960aa1b606082015260800190565b60208082526011908201527004e6f20746f6b656e7320746f207772617607c1b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b60208082526025908201527f556e697377617056324c6962726172793a20494e53554646494349454e545f416040820152641353d5539560da1b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526016908201527505765206d696e74656420746f6f206d75636820534c560541b604082015260600190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526017908201527f556e696d706c656d656e74656420666f72205375736869000000000000000000604082015260600190565b60208082526024908201527f5472616e7366657248656c7065723a205452414e534645525f46524f4d5f46416040820152631253115160e21b606082015260800190565b6020808252602b908201527f43726561746564207061697220646f6573206e6f74206d617463682063616c6360408201526a3ab630ba32b2103830b4b960a91b606082015260800190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b90815260200190565b918252602082015260400190565b92835260208301919091526001600160a01b0316604082015260806060820181905260009082015260a00190565b60ff91909116815260200190565b60005b838110156131ae578181015183820152602001613196565b838111156105125750506000910152565b6001600160a01b038116811461145157600080fd5b801515811461145157600080fdfe0000000000000000000000009ea3b5b4ec044b70375236a281986106457b20ef45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63650000000000000000000000007d7e813082ef6c143277c71786e5be626ec77b2045524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212203c6c3e022f29ff6be652f022dbf1948fdd750773989f5c303d81dceb97fb5fc764736f6c63430007060033