Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- Vyper_contract
- Optimization enabled
- false
- Compiler version
- v0.2.12
- Verified at
- 2023-07-14T14:37:21.361072Z
Contract source code
# @version 0.2.12 # (c) Curve.Fi, 2021 # Math for crypto pools # # Unless otherwise agreed on, only contracts owned by Curve DAO or # Swiss Stake GmbH are allowed to call this contract. N_COINS: constant(int128) = 3 # <- change A_MULTIPLIER: constant(uint256) = 10000 MIN_GAMMA: constant(uint256) = 10**10 MAX_GAMMA: constant(uint256) = 5 * 10**16 MIN_A: constant(uint256) = N_COINS**N_COINS * A_MULTIPLIER / 100 MAX_A: constant(uint256) = N_COINS**N_COINS * A_MULTIPLIER * 1000 @internal @pure def sort(A0: uint256[N_COINS]) -> uint256[N_COINS]: """ Insertion sort from high to low """ A: uint256[N_COINS] = A0 for i in range(1, N_COINS): x: uint256 = A[i] cur: uint256 = i for j in range(N_COINS): y: uint256 = A[cur-1] if y > x: break A[cur] = y cur -= 1 if cur == 0: break A[cur] = x return A @internal @view def _geometric_mean(unsorted_x: uint256[N_COINS], sort: bool = True) -> uint256: """ (x[0] * x[1] * ...) ** (1/N) """ x: uint256[N_COINS] = unsorted_x if sort: x = self.sort(x) D: uint256 = x[0] diff: uint256 = 0 for i in range(255): D_prev: uint256 = D tmp: uint256 = 10**18 for _x in x: tmp = tmp * _x / D D = D * ((N_COINS - 1) * 10**18 + tmp) / (N_COINS * 10**18) if D > D_prev: diff = D - D_prev else: diff = D_prev - D if diff <= 1 or diff * 10**18 < D: return D raise "Did not converge" @external @view def geometric_mean(unsorted_x: uint256[N_COINS], sort: bool = True) -> uint256: return self._geometric_mean(unsorted_x, sort) @external @view def reduction_coefficient(x: uint256[N_COINS], fee_gamma: uint256) -> uint256: """ fee_gamma / (fee_gamma + (1 - K)) where K = prod(x) / (sum(x) / N)**N (all normalized to 1e18) """ K: uint256 = 10**18 S: uint256 = 0 for x_i in x: S += x_i # Could be good to pre-sort x, but it is used only for dynamic fee, # so that is not so important for x_i in x: K = K * N_COINS * x_i / S if fee_gamma > 0: K = fee_gamma * 10**18 / (fee_gamma + 10**18 - K) return K @external @view def newton_D(ANN: uint256, gamma: uint256, x_unsorted: uint256[N_COINS]) -> uint256: """ Finding the invariant using Newton method. ANN is higher by the factor A_MULTIPLIER ANN is already A * N**N Currently uses 60k gas """ # Safety checks assert ANN > MIN_A - 1 and ANN < MAX_A + 1 # dev: unsafe values A assert gamma > MIN_GAMMA - 1 and gamma < MAX_GAMMA + 1 # dev: unsafe values gamma # Initial value of invariant D is that for constant-product invariant x: uint256[N_COINS] = self.sort(x_unsorted) assert x[0] > 10**9 - 1 and x[0] < 10**15 * 10**18 + 1 # dev: unsafe values x[0] for i in range(1, N_COINS): frac: uint256 = x[i] * 10**18 / x[0] assert frac > 10**11-1 # dev: unsafe values x[i] D: uint256 = N_COINS * self._geometric_mean(x, False) S: uint256 = 0 for x_i in x: S += x_i for i in range(255): D_prev: uint256 = D K0: uint256 = 10**18 for _x in x: K0 = K0 * _x * N_COINS / D _g1k0: uint256 = gamma + 10**18 if _g1k0 > K0: _g1k0 = _g1k0 - K0 + 1 else: _g1k0 = K0 - _g1k0 + 1 # D / (A * N**N) * _g1k0**2 / gamma**2 mul1: uint256 = 10**18 * D / gamma * _g1k0 / gamma * _g1k0 * A_MULTIPLIER / ANN # 2*N*K0 / _g1k0 mul2: uint256 = (2 * 10**18) * N_COINS * K0 / _g1k0 neg_fprime: uint256 = (S + S * mul2 / 10**18) + mul1 * N_COINS / K0 - mul2 * D / 10**18 # D -= f / fprime D_plus: uint256 = D * (neg_fprime + S) / neg_fprime D_minus: uint256 = D*D / neg_fprime if 10**18 > K0: D_minus += D * (mul1 / neg_fprime) / 10**18 * (10**18 - K0) / K0 else: D_minus -= D * (mul1 / neg_fprime) / 10**18 * (K0 - 10**18) / K0 if D_plus > D_minus: D = D_plus - D_minus else: D = (D_minus - D_plus) / 2 diff: uint256 = 0 if D > D_prev: diff = D - D_prev else: diff = D_prev - D if diff * 10**14 < max(10**16, D): # Could reduce precision for gas efficiency here # Test that we are safe with the next newton_y for _x in x: frac: uint256 = _x * 10**18 / D assert (frac > 10**16 - 1) and (frac < 10**20 + 1) # dev: unsafe values x[i] return D raise "Did not converge" @external @view def newton_y(ANN: uint256, gamma: uint256, x: uint256[N_COINS], D: uint256, i: uint256) -> uint256: """ Calculating x[i] given other balances x[0..N_COINS-1] and invariant D ANN = A * N**N """ # Safety checks assert ANN > MIN_A - 1 and ANN < MAX_A + 1 # dev: unsafe values A assert gamma > MIN_GAMMA - 1 and gamma < MAX_GAMMA + 1 # dev: unsafe values gamma assert D > 10**17 - 1 and D < 10**15 * 10**18 + 1 # dev: unsafe values D for k in range(3): if k != i: frac: uint256 = x[k] * 10**18 / D assert (frac > 10**16 - 1) and (frac < 10**20 + 1) # dev: unsafe values x[i] y: uint256 = D / N_COINS K0_i: uint256 = 10**18 S_i: uint256 = 0 x_sorted: uint256[N_COINS] = x x_sorted[i] = 0 x_sorted = self.sort(x_sorted) # From high to low convergence_limit: uint256 = max(max(x_sorted[0] / 10**14, D / 10**14), 100) for j in range(2, N_COINS+1): _x: uint256 = x_sorted[N_COINS-j] y = y * D / (_x * N_COINS) # Small _x first S_i += _x for j in range(N_COINS-1): K0_i = K0_i * x_sorted[j] * N_COINS / D # Large _x first for j in range(255): y_prev: uint256 = y K0: uint256 = K0_i * y * N_COINS / D S: uint256 = S_i + y _g1k0: uint256 = gamma + 10**18 if _g1k0 > K0: _g1k0 = _g1k0 - K0 + 1 else: _g1k0 = K0 - _g1k0 + 1 # D / (A * N**N) * _g1k0**2 / gamma**2 mul1: uint256 = 10**18 * D / gamma * _g1k0 / gamma * _g1k0 * A_MULTIPLIER / ANN # 2*K0 / _g1k0 mul2: uint256 = 10**18 + (2 * 10**18) * K0 / _g1k0 yfprime: uint256 = 10**18 * y + S * mul2 + mul1 _dyfprime: uint256 = D * mul2 if yfprime < _dyfprime: y = y_prev / 2 continue else: yfprime -= _dyfprime fprime: uint256 = yfprime / y # y -= f / f_prime; y = (y * fprime - f) / fprime # y = (yfprime + 10**18 * D - 10**18 * S) // fprime + mul1 // fprime * (10**18 - K0) // K0 y_minus: uint256 = mul1 / fprime y_plus: uint256 = (yfprime + 10**18 * D) / fprime + y_minus * 10**18 / K0 y_minus += 10**18 * S / fprime if y_plus < y_minus: y = y_prev / 2 else: y = y_plus - y_minus diff: uint256 = 0 if y > y_prev: diff = y - y_prev else: diff = y_prev - y if diff < max(convergence_limit, y / 10**14): frac: uint256 = y * 10**18 / D assert (frac > 10**16 - 1) and (frac < 10**20 + 1) # dev: unsafe value for y return y raise "Did not converge" @external @view def halfpow(power: uint256, precision: uint256) -> uint256: """ 1e18 * 0.5 ** (power/1e18) Inspired by: https://github.com/balancer-labs/balancer-core/blob/master/contracts/BNum.sol#L128 """ intpow: uint256 = power / 10**18 otherpow: uint256 = power - intpow * 10**18 if intpow > 59: return 0 result: uint256 = 10**18 / (2**intpow) if otherpow == 0: return result term: uint256 = 10**18 x: uint256 = 5 * 10**17 S: uint256 = 10**18 neg: bool = False for i in range(1, 256): K: uint256 = i * 10**18 c: uint256 = K - 10**18 if otherpow > c: c = otherpow - c neg = not neg else: c -= otherpow term = term * (c * x / 10**18) / K if neg: S -= term else: S += term if term < precision: return result * S / 10**18 raise "Did not converge" @external @view def sqrt_int(x: uint256) -> uint256: """ Originating from: https://github.com/vyperlang/vyper/issues/1266 """ if x == 0: return 0 z: uint256 = (x + 10**18) / 2 y: uint256 = x for i in range(256): if z == y: return y y = z z = (x * 10**18 / z + z) / 2 raise "Did not converge"
Contract ABI
[{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":""}],"name":"geometric_mean","inputs":[{"type":"uint256[3]","name":"unsorted_x"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":""}],"name":"geometric_mean","inputs":[{"type":"uint256[3]","name":"unsorted_x"},{"type":"bool","name":"sort"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":""}],"name":"reduction_coefficient","inputs":[{"type":"uint256[3]","name":"x"},{"type":"uint256","name":"fee_gamma"}],"gas":4063},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":""}],"name":"newton_D","inputs":[{"type":"uint256","name":"ANN"},{"type":"uint256","name":"gamma"},{"type":"uint256[3]","name":"x_unsorted"}],"gas":3318199},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":""}],"name":"newton_y","inputs":[{"type":"uint256","name":"ANN"},{"type":"uint256","name":"gamma"},{"type":"uint256[3]","name":"x"},{"type":"uint256","name":"D"},{"type":"uint256","name":"i"}],"gas":1859387},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":""}],"name":"halfpow","inputs":[{"type":"uint256","name":"power"},{"type":"uint256","name":"precision"}],"gas":513767},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":""}],"name":"sqrt_int","inputs":[{"type":"uint256","name":"x"}],"gas":199003}]
Contract Creation Code
0x611ebb56600436101561000d57611a4e565b600035601c52600051341561002157600080fd5b63bad1dc2681141561003857600161014052610069565b6339303e248114156100645760643560011c1561005457600080fd5b6020606461014037600050610069565b6100be565b61014051600480356101605280602001356101805280604001356101a05250610140516101c0526101c0516101a051610180516101605160065801611bf0565b61022052610140526102205160005260206000f35b63fa18042d81141561024357670de0b6b3a7640000610140526000610160526101a060006003818352015b60206101a05102600401356101805261016080516101805181818301101561011057600080fd5b808201905090508152505b81516001018083528114156100e9575b50506101a060006003818352015b60206101a051026004013561018052610140516003808202821582848304141761016257600080fd5b8090509050905061018051808202821582848304141761018157600080fd5b8090509050905061016051808061019757600080fd5b820490509050610140525b8151600101808352811415610139575b50506000606435111561023657606435670de0b6b3a764000080820282158284830414176101df57600080fd5b80905090509050606435670de0b6b3a764000081818301101561020157600080fd5b80820190509050610140518082101561021957600080fd5b80820390509050808061022b57600080fd5b820490509050610140525b6101405160005260206000f35b63c7fab708811415610bff57610a8b600435111561026957631017df816004351061026c565b60005b61027557600080fd5b6402540be3ff60243511156102955766b1a2bc2ec5000160243510610298565b60005b6102a157600080fd5b610140516101605161018051604480356101a05280602001356101c05280604001356101e052506101e0516101c0516101a05160065801611a54565b61024052610260526102805261018052610160526101405261024080516101405280602001516101605280604001516101805250633b9ac9ff610140511115610339576d314dc6448d9338c15b0a00000001610140511061033c565b60005b61034557600080fd5b6101a060016002818352015b6101406101a0516003811061036557600080fd5b6020020151670de0b6b3a7640000808202821582848304141761038757600080fd5b8090509050905061014051808061039d57600080fd5b8204905090506101c05264174876e7ff6101c051116103bb57600080fd5b8151600101808352811415610351575b505060036101405161016051610180516101a051610140516101c052610160516101e052610180516102005260006102205261022051610200516101e0516101c05160065801611bf0565b610280526101a05261018052610160526101405261028051808202821582848304141761044257600080fd5b809050905090506101a05260006101c05261020060006003818352015b6020610200510261014001516101e0526101c080516101e05181818301101561048757600080fd5b808201905090508152505b815160010180835281141561045f575b50506101e0600060ff818352015b6101a05161020052670de0b6b3a76400006102205261026060006003818352015b60206102605102610140015161024052610220516102405180820282158284830414176104fd57600080fd5b809050905090506003808202821582848304141761051a57600080fd5b809050905090506101a051808061053057600080fd5b820490509050610220525b81516001018083528114156104d1575b5050602435670de0b6b3a764000081818301101561056857600080fd5b8082019050905061024052610220516102405111156105be5761024051610220518082101561059657600080fd5b8082039050905060018181830110156105ae57600080fd5b80820190509050610240526105f7565b6102205161024051808210156105d357600080fd5b8082039050905060018181830110156105eb57600080fd5b80820190509050610240525b670de0b6b3a76400006101a051808202821582848304141761061857600080fd5b80905090509050602435808061062d57600080fd5b82049050905061024051808202821582848304141761064b57600080fd5b80905090509050602435808061066057600080fd5b82049050905061024051808202821582848304141761067e57600080fd5b80905090509050612710808202821582848304141761069c57600080fd5b8090509050905060043580806106b157600080fd5b820490509050610260526753444835ec5800006102205180820282158284830414176106dc57600080fd5b809050905090506102405180806106f257600080fd5b820490509050610280526101c0516101c05161028051808202821582848304141761071c57600080fd5b80905090509050670de0b6b3a76400008082049050905081818301101561074257600080fd5b80820190509050610260516003808202821582848304141761076357600080fd5b8090509050905061022051808061077957600080fd5b82049050905081818301101561078e57600080fd5b80820190509050610280516101a05180820282158284830414176107b157600080fd5b80905090509050670de0b6b3a764000080820490509050808210156107d557600080fd5b808203905090506102a0526101a0516102a0516101c0518181830110156107fb57600080fd5b80820190509050808202821582848304141761081657600080fd5b809050905090506102a051808061082c57600080fd5b8204905090506102c0526101a0516101a051808202821582848304141761085257600080fd5b809050905090506102a051808061086857600080fd5b8204905090506102e05261022051670de0b6b3a76400001115610941576102e080516101a051610260516102a05180806108a157600080fd5b82049050905080820282158284830414176108bb57600080fd5b80905090509050670de0b6b3a764000080820490509050670de0b6b3a764000061022051808210156108ec57600080fd5b80820390509050808202821582848304141761090757600080fd5b8090509050905061022051808061091d57600080fd5b82049050905081818301101561093257600080fd5b808201905090508152506109f7565b6102e080516101a051610260516102a051808061095d57600080fd5b820490509050808202821582848304141761097757600080fd5b80905090509050670de0b6b3a76400008082049050905061022051670de0b6b3a7640000808210156109a857600080fd5b8082039050905080820282158284830414176109c357600080fd5b809050905090506102205180806109d957600080fd5b820490509050808210156109ec57600080fd5b808203905090508152505b6102e0516102c0511115610a2a576102c0516102e05180821015610a1a57600080fd5b808203905090506101a052610a54565b6102e0516102c05180821015610a3f57600080fd5b808203905090506002808204905090506101a0525b600061030052610200516101a0511115610a8d576101a0516102005180821015610a7d57600080fd5b8082039050905061030052610aae565b610200516101a05180821015610aa257600080fd5b80820390509050610300525b662386f26fc100006101a05180821015610ac85780610aca565b815b9050905061030051655af3107a40008082028215828483041417610aed57600080fd5b809050905090501015610ba85761034060006003818352015b6020610340510261014001516103205261032051670de0b6b3a76400008082028215828483041417610b3757600080fd5b809050905090506101a0518080610b4d57600080fd5b82049050905061036052662386f26fc0ffff610360511115610b7d5768056bc75e2d631000016103605110610b80565b60005b610b8957600080fd5b8151600101808352811415610b06575b50506101a05160005260206000f35b81516001018083528114156104b0575b50506308c379a06101e0526020610200526010610220527f446964206e6f7420636f6e766572676500000000000000000000000000000000610240526102205060646101fcfd5b6336bc88558114156115fe57610a8b6004351115610c2557631017df8160043510610c28565b60005b610c3157600080fd5b6402540be3ff6024351115610c515766b1a2bc2ec5000160243510610c54565b60005b610c5d57600080fd5b67016345785d89ffff60a4351115610c87576d314dc6448d9338c15b0a0000000160a43510610c8a565b60005b610c9357600080fd5b61014060006003818352015b60c435610140511815610d325760446101405160038110610cbf57600080fd5b6020020135670de0b6b3a76400008082028215828483041417610ce157600080fd5b8090509050905060a4358080610cf657600080fd5b82049050905061016052662386f26fc0ffff610160511115610d265768056bc75e2d631000016101605110610d29565b60005b610d3257600080fd5b8151600101808352811415610c9f575b505060a43560038082049050905061014052670de0b6b3a764000061016052600061018052604480356101a05280602001356101c05280604001356101e0525060006101a060c43560038110610d9757600080fd5b60200201526101405161016051610180516101a0516101c0516101e0516101a051610200526101c051610220526101e0516102405261024051610220516102005160065801611a54565b6102a0526102c0526102e0526101e0526101c0526101a0526101805261016052610140526102a080516101a05280602001516101c05280604001516101e052506101a051655af3107a40008082049050905060a435655af3107a40008082049050905080821015610e525780610e54565b815b90509050606480821015610e685780610e6a565b815b905090506102005261022060026002818352015b6101a060036102205180821015610e9457600080fd5b8082039050905060038110610ea857600080fd5b6020020151610240526101405160a4358082028215828483041417610ecc57600080fd5b809050905090506102405160038082028215828483041417610eed57600080fd5b809050905090508080610eff57600080fd5b82049050905061014052610180805161024051818183011015610f2157600080fd5b808201905090508152505b8151600101808352811415610e7e575b505061022060006002818352015b610160516101a06102205160038110610f6257600080fd5b60200201518082028215828483041417610f7b57600080fd5b8090509050905060038082028215828483041417610f9857600080fd5b8090509050905060a4358080610fad57600080fd5b820490509050610160525b8151600101808352811415610f4a575b5050610220600060ff818352015b610140516102405261016051610140518082028215828483041417610ffa57600080fd5b809050905090506003808202821582848304141761101757600080fd5b8090509050905060a435808061102c57600080fd5b82049050905061026052610180516101405181818301101561104d57600080fd5b8082019050905061028052602435670de0b6b3a764000081818301101561107357600080fd5b808201905090506102a052610260516102a05111156110c9576102a05161026051808210156110a157600080fd5b8082039050905060018181830110156110b957600080fd5b808201905090506102a052611102565b610260516102a051808210156110de57600080fd5b8082039050905060018181830110156110f657600080fd5b808201905090506102a0525b670de0b6b3a764000060a435808202821582848304141761112257600080fd5b80905090509050602435808061113757600080fd5b8204905090506102a051808202821582848304141761115557600080fd5b80905090509050602435808061116a57600080fd5b8204905090506102a051808202821582848304141761118857600080fd5b8090509050905061271080820282158284830414176111a657600080fd5b8090509050905060043580806111bb57600080fd5b8204905090506102c052670de0b6b3a7640000671bc16d674ec800006102605180820282158284830414176111ef57600080fd5b809050905090506102a051808061120557600080fd5b82049050905081818301101561121a57600080fd5b808201905090506102e052670de0b6b3a764000061014051808202821582848304141761124657600080fd5b80905090509050610280516102e051808202821582848304141761126957600080fd5b8090509050905081818301101561127f57600080fd5b808201905090506102c05181818301101561129957600080fd5b808201905090506103005260a4356102e05180820282158284830414176112bf57600080fd5b8090509050905061032052610320516103005110156112f25761024051600280820490509050610140526115a756611313565b6103008051610320518082101561130857600080fd5b808203905090508152505b6103005161014051808061132657600080fd5b820490509050610340526102c05161034051808061134357600080fd5b8204905090506103605261030051670de0b6b3a764000060a435808202821582848304141761137157600080fd5b8090509050905081818301101561138757600080fd5b8082019050905061034051808061139d57600080fd5b82049050905061036051670de0b6b3a764000080820282158284830414176113c457600080fd5b809050905090506102605180806113da57600080fd5b8204905090508181830110156113ef57600080fd5b80820190509050610380526103608051670de0b6b3a764000061028051808202821582848304141761142057600080fd5b8090509050905061034051808061143657600080fd5b82049050905081818301101561144b57600080fd5b808201905090508152506103605161038051101561147957610240516002808204905090506101405261149a565b61038051610360518082101561148e57600080fd5b80820390509050610140525b60006103a052610240516101405111156114d3576101405161024051808210156114c357600080fd5b808203905090506103a0526114f4565b6102405161014051808210156114e857600080fd5b808203905090506103a0525b6102005161014051655af3107a40008082049050905080821015611518578061151a565b815b905090506103a05110156115a75761014051670de0b6b3a7640000808202821582848304141761154957600080fd5b8090509050905060a435808061155e57600080fd5b8204905090506103c052662386f26fc0ffff6103c051111561158e5768056bc75e2d631000016103c05110611591565b60005b61159a57600080fd5b6101405160005260206000f35b8151600101808352811415610fd6575b50506308c379a0610220526020610240526010610260527f446964206e6f7420636f6e7665726765000000000000000000000000000000006102805261026050606461023cfd5b63571bae3f81141561190b57600435670de0b6b3a7640000808204905090506101405260043561014051670de0b6b3a7640000808202821582848304141761164557600080fd5b809050905090508082101561165957600080fd5b8082039050905061016052603b61014051111561167b57600060005260206000f35b670de0b6b3a7640000610100610140511061169557600080fd5b6101405160020a80806116a757600080fd5b820490509050610180526101605115156116c8576101805160005260206000f35b670de0b6b3a76400006101a0526706f05b59d3b200006101c052670de0b6b3a76400006101e052600061020052610220600160ff818352015b61022051670de0b6b3a7640000808202821582848304141761172257600080fd5b809050905090506102405261024051670de0b6b3a76400008082101561174757600080fd5b80820390509050610260526102605161016051111561178e5761016051610260518082101561177557600080fd5b80820390509050610260526102005115610200526117af565b610260805161016051808210156117a457600080fd5b808203905090508152505b6101a051610260516101c05180820282158284830414176117cf57600080fd5b80905090509050670de0b6b3a76400008082049050905080820282158284830414176117fa57600080fd5b8090509050905061024051808061181057600080fd5b8204905090506101a0526102005115611848576101e080516101a0518082101561183957600080fd5b8082039050905081525061186b565b6101e080516101a05181818301101561186057600080fd5b808201905090508152505b6024356101a05110156118b457610180516101e051808202821582848304141761189457600080fd5b80905090509050670de0b6b3a76400008082049050905060005260206000f35b8151600101808352811415611701575b50506308c379a0610220526020610240526010610260527f446964206e6f7420636f6e7665726765000000000000000000000000000000006102805261026050606461023cfd5b634e60b141811415611a4c57600435151561192b57600060005260206000f35b600435670de0b6b3a764000081818301101561194657600080fd5b8082019050905060028082049050905061014052600435610160526101806000610100818352015b61016051610140511415611989576101605160005260206000f35b6101405161016052600435670de0b6b3a764000080820282158284830414176119b157600080fd5b809050905090506101405180806119c757600080fd5b820490509050610140518181830110156119e057600080fd5b80820190509050600280820490509050610140525b815160010180835281141561196e575b50506308c379a06101805260206101a05260106101c0527f446964206e6f7420636f6e7665726765000000000000000000000000000000006101e0526101c050606461019cfd5b505b60006000fd5b6101a052610140526101605261018052610140516101c052610160516101e052610180516102005261022060016002818352015b6101c06102205160038110611a9c57600080fd5b602002015161024052610220516102605261028060006003818352015b6101c061026051600180821015611acf57600080fd5b8082039050905060038110611ae357600080fd5b60200201516102a052610240516102a0511115611aff57611b59565b6102a0516101c06102605160038110611b1757600080fd5b60200201526102608051600180821015611b3057600080fd5b80820390509050815250610260511515611b4957611b59565b8151600101808352811415611ab9575b5050610240516101c06102605160038110611b7357600080fd5b60200201525b8151600101808352811415611a88575b50506060610220525b600061022051111515611ba457611bc0565b602061022051036101c001516020610220510361022052611b92565b6101a05156611be8575b6101c05260016101a052610140526101605261018052600050611c0c565b600015611c0c575b6101c0526101405261016052610180526101a052600050611c0c565b610140516101e052610160516102005261018051610220526101a05115611cc3576101405161016051610180516101a0516101c0516101e05161020051610220516101e051610240526102005161026052610220516102805261028051610260516102405160065801611a54565b6102e052610300526103205261022052610200526101e0526101c0526101a0526101805261016052610140526102e080516101e052806020015161020052806040015161022052505b6101e05161024052600061026052610280600060ff818352015b610240516102a052670de0b6b3a76400006102c05261030060006003818352015b602061030051026101e001516102e0526102c0516102e0518082028215828483041417611d2a57600080fd5b80905090509050610240518080611d4057600080fd5b8204905090506102c0525b8151600101808352811415611cfe575b505061024051671bc16d674ec800006102c051818183011015611d7d57600080fd5b808201905090508082028215828483041417611d9857600080fd5b809050905090506729a2241af62c000080820490509050610240526102a051610240511115611de657610240516102a05180821015611dd657600080fd5b8082039050905061026052611e07565b6102a0516102405180821015611dfb57600080fd5b80820390509050610260525b600161026051111515611e1b576001611e49565b6102405161026051670de0b6b3a76400008082028215828483041417611e4057600080fd5b80905090509050105b15611e60576102405160005250506000516101c051565b8151600101808352811415611cdd575b50506308c379a06102805260206102a05260106102c0527f446964206e6f7420636f6e7665726765000000000000000000000000000000006102e0526102c050606461029cfd5b610004611ebb03610004600039610004611ebb036000f3
Deployed ByteCode
0x600436101561000d57611a4e565b600035601c52600051341561002157600080fd5b63bad1dc2681141561003857600161014052610069565b6339303e248114156100645760643560011c1561005457600080fd5b6020606461014037600050610069565b6100be565b61014051600480356101605280602001356101805280604001356101a05250610140516101c0526101c0516101a051610180516101605160065801611bf0565b61022052610140526102205160005260206000f35b63fa18042d81141561024357670de0b6b3a7640000610140526000610160526101a060006003818352015b60206101a05102600401356101805261016080516101805181818301101561011057600080fd5b808201905090508152505b81516001018083528114156100e9575b50506101a060006003818352015b60206101a051026004013561018052610140516003808202821582848304141761016257600080fd5b8090509050905061018051808202821582848304141761018157600080fd5b8090509050905061016051808061019757600080fd5b820490509050610140525b8151600101808352811415610139575b50506000606435111561023657606435670de0b6b3a764000080820282158284830414176101df57600080fd5b80905090509050606435670de0b6b3a764000081818301101561020157600080fd5b80820190509050610140518082101561021957600080fd5b80820390509050808061022b57600080fd5b820490509050610140525b6101405160005260206000f35b63c7fab708811415610bff57610a8b600435111561026957631017df816004351061026c565b60005b61027557600080fd5b6402540be3ff60243511156102955766b1a2bc2ec5000160243510610298565b60005b6102a157600080fd5b610140516101605161018051604480356101a05280602001356101c05280604001356101e052506101e0516101c0516101a05160065801611a54565b61024052610260526102805261018052610160526101405261024080516101405280602001516101605280604001516101805250633b9ac9ff610140511115610339576d314dc6448d9338c15b0a00000001610140511061033c565b60005b61034557600080fd5b6101a060016002818352015b6101406101a0516003811061036557600080fd5b6020020151670de0b6b3a7640000808202821582848304141761038757600080fd5b8090509050905061014051808061039d57600080fd5b8204905090506101c05264174876e7ff6101c051116103bb57600080fd5b8151600101808352811415610351575b505060036101405161016051610180516101a051610140516101c052610160516101e052610180516102005260006102205261022051610200516101e0516101c05160065801611bf0565b610280526101a05261018052610160526101405261028051808202821582848304141761044257600080fd5b809050905090506101a05260006101c05261020060006003818352015b6020610200510261014001516101e0526101c080516101e05181818301101561048757600080fd5b808201905090508152505b815160010180835281141561045f575b50506101e0600060ff818352015b6101a05161020052670de0b6b3a76400006102205261026060006003818352015b60206102605102610140015161024052610220516102405180820282158284830414176104fd57600080fd5b809050905090506003808202821582848304141761051a57600080fd5b809050905090506101a051808061053057600080fd5b820490509050610220525b81516001018083528114156104d1575b5050602435670de0b6b3a764000081818301101561056857600080fd5b8082019050905061024052610220516102405111156105be5761024051610220518082101561059657600080fd5b8082039050905060018181830110156105ae57600080fd5b80820190509050610240526105f7565b6102205161024051808210156105d357600080fd5b8082039050905060018181830110156105eb57600080fd5b80820190509050610240525b670de0b6b3a76400006101a051808202821582848304141761061857600080fd5b80905090509050602435808061062d57600080fd5b82049050905061024051808202821582848304141761064b57600080fd5b80905090509050602435808061066057600080fd5b82049050905061024051808202821582848304141761067e57600080fd5b80905090509050612710808202821582848304141761069c57600080fd5b8090509050905060043580806106b157600080fd5b820490509050610260526753444835ec5800006102205180820282158284830414176106dc57600080fd5b809050905090506102405180806106f257600080fd5b820490509050610280526101c0516101c05161028051808202821582848304141761071c57600080fd5b80905090509050670de0b6b3a76400008082049050905081818301101561074257600080fd5b80820190509050610260516003808202821582848304141761076357600080fd5b8090509050905061022051808061077957600080fd5b82049050905081818301101561078e57600080fd5b80820190509050610280516101a05180820282158284830414176107b157600080fd5b80905090509050670de0b6b3a764000080820490509050808210156107d557600080fd5b808203905090506102a0526101a0516102a0516101c0518181830110156107fb57600080fd5b80820190509050808202821582848304141761081657600080fd5b809050905090506102a051808061082c57600080fd5b8204905090506102c0526101a0516101a051808202821582848304141761085257600080fd5b809050905090506102a051808061086857600080fd5b8204905090506102e05261022051670de0b6b3a76400001115610941576102e080516101a051610260516102a05180806108a157600080fd5b82049050905080820282158284830414176108bb57600080fd5b80905090509050670de0b6b3a764000080820490509050670de0b6b3a764000061022051808210156108ec57600080fd5b80820390509050808202821582848304141761090757600080fd5b8090509050905061022051808061091d57600080fd5b82049050905081818301101561093257600080fd5b808201905090508152506109f7565b6102e080516101a051610260516102a051808061095d57600080fd5b820490509050808202821582848304141761097757600080fd5b80905090509050670de0b6b3a76400008082049050905061022051670de0b6b3a7640000808210156109a857600080fd5b8082039050905080820282158284830414176109c357600080fd5b809050905090506102205180806109d957600080fd5b820490509050808210156109ec57600080fd5b808203905090508152505b6102e0516102c0511115610a2a576102c0516102e05180821015610a1a57600080fd5b808203905090506101a052610a54565b6102e0516102c05180821015610a3f57600080fd5b808203905090506002808204905090506101a0525b600061030052610200516101a0511115610a8d576101a0516102005180821015610a7d57600080fd5b8082039050905061030052610aae565b610200516101a05180821015610aa257600080fd5b80820390509050610300525b662386f26fc100006101a05180821015610ac85780610aca565b815b9050905061030051655af3107a40008082028215828483041417610aed57600080fd5b809050905090501015610ba85761034060006003818352015b6020610340510261014001516103205261032051670de0b6b3a76400008082028215828483041417610b3757600080fd5b809050905090506101a0518080610b4d57600080fd5b82049050905061036052662386f26fc0ffff610360511115610b7d5768056bc75e2d631000016103605110610b80565b60005b610b8957600080fd5b8151600101808352811415610b06575b50506101a05160005260206000f35b81516001018083528114156104b0575b50506308c379a06101e0526020610200526010610220527f446964206e6f7420636f6e766572676500000000000000000000000000000000610240526102205060646101fcfd5b6336bc88558114156115fe57610a8b6004351115610c2557631017df8160043510610c28565b60005b610c3157600080fd5b6402540be3ff6024351115610c515766b1a2bc2ec5000160243510610c54565b60005b610c5d57600080fd5b67016345785d89ffff60a4351115610c87576d314dc6448d9338c15b0a0000000160a43510610c8a565b60005b610c9357600080fd5b61014060006003818352015b60c435610140511815610d325760446101405160038110610cbf57600080fd5b6020020135670de0b6b3a76400008082028215828483041417610ce157600080fd5b8090509050905060a4358080610cf657600080fd5b82049050905061016052662386f26fc0ffff610160511115610d265768056bc75e2d631000016101605110610d29565b60005b610d3257600080fd5b8151600101808352811415610c9f575b505060a43560038082049050905061014052670de0b6b3a764000061016052600061018052604480356101a05280602001356101c05280604001356101e0525060006101a060c43560038110610d9757600080fd5b60200201526101405161016051610180516101a0516101c0516101e0516101a051610200526101c051610220526101e0516102405261024051610220516102005160065801611a54565b6102a0526102c0526102e0526101e0526101c0526101a0526101805261016052610140526102a080516101a05280602001516101c05280604001516101e052506101a051655af3107a40008082049050905060a435655af3107a40008082049050905080821015610e525780610e54565b815b90509050606480821015610e685780610e6a565b815b905090506102005261022060026002818352015b6101a060036102205180821015610e9457600080fd5b8082039050905060038110610ea857600080fd5b6020020151610240526101405160a4358082028215828483041417610ecc57600080fd5b809050905090506102405160038082028215828483041417610eed57600080fd5b809050905090508080610eff57600080fd5b82049050905061014052610180805161024051818183011015610f2157600080fd5b808201905090508152505b8151600101808352811415610e7e575b505061022060006002818352015b610160516101a06102205160038110610f6257600080fd5b60200201518082028215828483041417610f7b57600080fd5b8090509050905060038082028215828483041417610f9857600080fd5b8090509050905060a4358080610fad57600080fd5b820490509050610160525b8151600101808352811415610f4a575b5050610220600060ff818352015b610140516102405261016051610140518082028215828483041417610ffa57600080fd5b809050905090506003808202821582848304141761101757600080fd5b8090509050905060a435808061102c57600080fd5b82049050905061026052610180516101405181818301101561104d57600080fd5b8082019050905061028052602435670de0b6b3a764000081818301101561107357600080fd5b808201905090506102a052610260516102a05111156110c9576102a05161026051808210156110a157600080fd5b8082039050905060018181830110156110b957600080fd5b808201905090506102a052611102565b610260516102a051808210156110de57600080fd5b8082039050905060018181830110156110f657600080fd5b808201905090506102a0525b670de0b6b3a764000060a435808202821582848304141761112257600080fd5b80905090509050602435808061113757600080fd5b8204905090506102a051808202821582848304141761115557600080fd5b80905090509050602435808061116a57600080fd5b8204905090506102a051808202821582848304141761118857600080fd5b8090509050905061271080820282158284830414176111a657600080fd5b8090509050905060043580806111bb57600080fd5b8204905090506102c052670de0b6b3a7640000671bc16d674ec800006102605180820282158284830414176111ef57600080fd5b809050905090506102a051808061120557600080fd5b82049050905081818301101561121a57600080fd5b808201905090506102e052670de0b6b3a764000061014051808202821582848304141761124657600080fd5b80905090509050610280516102e051808202821582848304141761126957600080fd5b8090509050905081818301101561127f57600080fd5b808201905090506102c05181818301101561129957600080fd5b808201905090506103005260a4356102e05180820282158284830414176112bf57600080fd5b8090509050905061032052610320516103005110156112f25761024051600280820490509050610140526115a756611313565b6103008051610320518082101561130857600080fd5b808203905090508152505b6103005161014051808061132657600080fd5b820490509050610340526102c05161034051808061134357600080fd5b8204905090506103605261030051670de0b6b3a764000060a435808202821582848304141761137157600080fd5b8090509050905081818301101561138757600080fd5b8082019050905061034051808061139d57600080fd5b82049050905061036051670de0b6b3a764000080820282158284830414176113c457600080fd5b809050905090506102605180806113da57600080fd5b8204905090508181830110156113ef57600080fd5b80820190509050610380526103608051670de0b6b3a764000061028051808202821582848304141761142057600080fd5b8090509050905061034051808061143657600080fd5b82049050905081818301101561144b57600080fd5b808201905090508152506103605161038051101561147957610240516002808204905090506101405261149a565b61038051610360518082101561148e57600080fd5b80820390509050610140525b60006103a052610240516101405111156114d3576101405161024051808210156114c357600080fd5b808203905090506103a0526114f4565b6102405161014051808210156114e857600080fd5b808203905090506103a0525b6102005161014051655af3107a40008082049050905080821015611518578061151a565b815b905090506103a05110156115a75761014051670de0b6b3a7640000808202821582848304141761154957600080fd5b8090509050905060a435808061155e57600080fd5b8204905090506103c052662386f26fc0ffff6103c051111561158e5768056bc75e2d631000016103c05110611591565b60005b61159a57600080fd5b6101405160005260206000f35b8151600101808352811415610fd6575b50506308c379a0610220526020610240526010610260527f446964206e6f7420636f6e7665726765000000000000000000000000000000006102805261026050606461023cfd5b63571bae3f81141561190b57600435670de0b6b3a7640000808204905090506101405260043561014051670de0b6b3a7640000808202821582848304141761164557600080fd5b809050905090508082101561165957600080fd5b8082039050905061016052603b61014051111561167b57600060005260206000f35b670de0b6b3a7640000610100610140511061169557600080fd5b6101405160020a80806116a757600080fd5b820490509050610180526101605115156116c8576101805160005260206000f35b670de0b6b3a76400006101a0526706f05b59d3b200006101c052670de0b6b3a76400006101e052600061020052610220600160ff818352015b61022051670de0b6b3a7640000808202821582848304141761172257600080fd5b809050905090506102405261024051670de0b6b3a76400008082101561174757600080fd5b80820390509050610260526102605161016051111561178e5761016051610260518082101561177557600080fd5b80820390509050610260526102005115610200526117af565b610260805161016051808210156117a457600080fd5b808203905090508152505b6101a051610260516101c05180820282158284830414176117cf57600080fd5b80905090509050670de0b6b3a76400008082049050905080820282158284830414176117fa57600080fd5b8090509050905061024051808061181057600080fd5b8204905090506101a0526102005115611848576101e080516101a0518082101561183957600080fd5b8082039050905081525061186b565b6101e080516101a05181818301101561186057600080fd5b808201905090508152505b6024356101a05110156118b457610180516101e051808202821582848304141761189457600080fd5b80905090509050670de0b6b3a76400008082049050905060005260206000f35b8151600101808352811415611701575b50506308c379a0610220526020610240526010610260527f446964206e6f7420636f6e7665726765000000000000000000000000000000006102805261026050606461023cfd5b634e60b141811415611a4c57600435151561192b57600060005260206000f35b600435670de0b6b3a764000081818301101561194657600080fd5b8082019050905060028082049050905061014052600435610160526101806000610100818352015b61016051610140511415611989576101605160005260206000f35b6101405161016052600435670de0b6b3a764000080820282158284830414176119b157600080fd5b809050905090506101405180806119c757600080fd5b820490509050610140518181830110156119e057600080fd5b80820190509050600280820490509050610140525b815160010180835281141561196e575b50506308c379a06101805260206101a05260106101c0527f446964206e6f7420636f6e7665726765000000000000000000000000000000006101e0526101c050606461019cfd5b505b60006000fd5b6101a052610140526101605261018052610140516101c052610160516101e052610180516102005261022060016002818352015b6101c06102205160038110611a9c57600080fd5b602002015161024052610220516102605261028060006003818352015b6101c061026051600180821015611acf57600080fd5b8082039050905060038110611ae357600080fd5b60200201516102a052610240516102a0511115611aff57611b59565b6102a0516101c06102605160038110611b1757600080fd5b60200201526102608051600180821015611b3057600080fd5b80820390509050815250610260511515611b4957611b59565b8151600101808352811415611ab9575b5050610240516101c06102605160038110611b7357600080fd5b60200201525b8151600101808352811415611a88575b50506060610220525b600061022051111515611ba457611bc0565b602061022051036101c001516020610220510361022052611b92565b6101a05156611be8575b6101c05260016101a052610140526101605261018052600050611c0c565b600015611c0c575b6101c0526101405261016052610180526101a052600050611c0c565b610140516101e052610160516102005261018051610220526101a05115611cc3576101405161016051610180516101a0516101c0516101e05161020051610220516101e051610240526102005161026052610220516102805261028051610260516102405160065801611a54565b6102e052610300526103205261022052610200526101e0526101c0526101a0526101805261016052610140526102e080516101e052806020015161020052806040015161022052505b6101e05161024052600061026052610280600060ff818352015b610240516102a052670de0b6b3a76400006102c05261030060006003818352015b602061030051026101e001516102e0526102c0516102e0518082028215828483041417611d2a57600080fd5b80905090509050610240518080611d4057600080fd5b8204905090506102c0525b8151600101808352811415611cfe575b505061024051671bc16d674ec800006102c051818183011015611d7d57600080fd5b808201905090508082028215828483041417611d9857600080fd5b809050905090506729a2241af62c000080820490509050610240526102a051610240511115611de657610240516102a05180821015611dd657600080fd5b8082039050905061026052611e07565b6102a0516102405180821015611dfb57600080fd5b80820390509050610260525b600161026051111515611e1b576001611e49565b6102405161026051670de0b6b3a76400008082028215828483041417611e4057600080fd5b80905090509050105b15611e60576102405160005250506000516101c051565b8151600101808352811415611cdd575b50506308c379a06102805260206102a05260106102c0527f446964206e6f7420636f6e7665726765000000000000000000000000000000006102e0526102c050606461029cfd