Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
Multi Chain
Multichain Addresses
6 addresses found via
Latest 25 from a total of 2,064 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Claim_admin_fees | 17417173 | 1 hr 15 mins ago | IN | 0 ETH | 0.00344271 | ||||
Remove_liquidity... | 17413153 | 14 hrs 53 mins ago | IN | 0 ETH | 0.00657287 | ||||
Claim_admin_fees | 17410066 | 1 day 1 hr ago | IN | 0 ETH | 0.0024719 | ||||
Claim_admin_fees | 17402973 | 2 days 1 hr ago | IN | 0 ETH | 0.00252368 | ||||
Claim_admin_fees | 17395868 | 3 days 1 hr ago | IN | 0 ETH | 0.00462502 | ||||
Claim_admin_fees | 17388783 | 4 days 1 hr ago | IN | 0 ETH | 0.00723455 | ||||
Claim_admin_fees | 17381679 | 5 days 1 hr ago | IN | 0 ETH | 0.00392377 | ||||
Claim_admin_fees | 17374578 | 6 days 1 hr ago | IN | 0 ETH | 0.0062007 | ||||
Claim_admin_fees | 17367475 | 7 days 1 hr ago | IN | 0 ETH | 0.00341036 | ||||
Claim_admin_fees | 17360356 | 8 days 1 hr ago | IN | 0 ETH | 0.00465862 | ||||
Claim_admin_fees | 17353225 | 9 days 1 hr ago | IN | 0 ETH | 0.00279976 | ||||
Remove_liquidity... | 17352511 | 9 days 3 hrs ago | IN | 0 ETH | 0.00780337 | ||||
Claim_admin_fees | 17346100 | 10 days 1 hr ago | IN | 0 ETH | 0.00350486 | ||||
Exchange | 17339449 | 10 days 23 hrs ago | IN | 0 ETH | 0.00972561 | ||||
Claim_admin_fees | 17338993 | 11 days 1 hr ago | IN | 0 ETH | 0.00442104 | ||||
Remove_liquidity | 17332011 | 12 days 56 mins ago | IN | 0 ETH | 0.00438209 | ||||
Claim_admin_fees | 17331874 | 12 days 1 hr ago | IN | 0 ETH | 0.00436795 | ||||
Exchange | 17325196 | 12 days 23 hrs ago | IN | 0 ETH | 0.01332609 | ||||
Claim_admin_fees | 17324760 | 13 days 1 hr ago | IN | 0 ETH | 0.00699845 | ||||
Claim_admin_fees | 17317666 | 14 days 1 hr ago | IN | 0 ETH | 0.00534723 | ||||
Claim_admin_fees | 17310559 | 15 days 1 hr ago | IN | 0 ETH | 0.00434293 | ||||
Claim_admin_fees | 17303461 | 16 days 1 hr ago | IN | 0 ETH | 0.00378724 | ||||
Claim_admin_fees | 17296354 | 17 days 1 hr ago | IN | 0 ETH | 0.00440102 | ||||
Claim_admin_fees | 17289266 | 18 days 1 hr ago | IN | 0 ETH | 0.00663657 | ||||
Claim_admin_fees | 17282162 | 19 days 1 hr ago | IN | 0 ETH | 0.00865398 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Vyper_contract
Compiler Version
vyper:0.3.0
Contract Source Code (Vyper language format)
# @version 0.3.0 # (c) Curve.Fi, 2021 # Pool for two crypto assets from vyper.interfaces import ERC20 # Expected coins: # eur*/3crv # crypto/tricrypto # All are proper ERC20s, so let's use a standard interface and save bytespace interface CurveToken: def totalSupply() -> uint256: view def mint(_to: address, _value: uint256) -> bool: nonpayable def mint_relative(_to: address, frac: uint256) -> uint256: nonpayable def burnFrom(_to: address, _value: uint256) -> bool: nonpayable # Events event TokenExchange: buyer: indexed(address) sold_id: uint256 tokens_sold: uint256 bought_id: uint256 tokens_bought: uint256 event AddLiquidity: provider: indexed(address) token_amounts: uint256[N_COINS] fee: uint256 token_supply: uint256 event RemoveLiquidity: provider: indexed(address) token_amounts: uint256[N_COINS] token_supply: uint256 event RemoveLiquidityOne: provider: indexed(address) token_amount: uint256 coin_index: uint256 coin_amount: uint256 event CommitNewAdmin: deadline: indexed(uint256) admin: indexed(address) event NewAdmin: admin: indexed(address) event CommitNewParameters: deadline: indexed(uint256) admin_fee: uint256 mid_fee: uint256 out_fee: uint256 fee_gamma: uint256 allowed_extra_profit: uint256 adjustment_step: uint256 ma_half_time: uint256 event NewParameters: admin_fee: uint256 mid_fee: uint256 out_fee: uint256 fee_gamma: uint256 allowed_extra_profit: uint256 adjustment_step: uint256 ma_half_time: uint256 event RampAgamma: initial_A: uint256 future_A: uint256 initial_gamma: uint256 future_gamma: uint256 initial_time: uint256 future_time: uint256 event StopRampA: current_A: uint256 current_gamma: uint256 time: uint256 event ClaimAdminFee: admin: indexed(address) tokens: uint256 N_COINS: constant(int128) = 2 PRECISION: constant(uint256) = 10 ** 18 # The precision to convert to A_MULTIPLIER: constant(uint256) = 10000 # These addresses are replaced by the deployer token: constant(address) = 0x3D229E1B4faab62F621eF2F6A610961f7BD7b23B coins: constant(address[N_COINS]) = [ 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48, 0xdB25f211AB05b1c97D595516F45794528a807ad8] price_scale: public(uint256) # Internal price scale price_oracle: public(uint256) # Price target given by MA last_prices: public(uint256) last_prices_timestamp: public(uint256) initial_A_gamma: public(uint256) future_A_gamma: public(uint256) initial_A_gamma_time: public(uint256) future_A_gamma_time: public(uint256) allowed_extra_profit: public(uint256) # 2 * 10**12 - recommended value future_allowed_extra_profit: public(uint256) fee_gamma: public(uint256) future_fee_gamma: public(uint256) adjustment_step: public(uint256) future_adjustment_step: public(uint256) ma_half_time: public(uint256) future_ma_half_time: public(uint256) mid_fee: public(uint256) out_fee: public(uint256) admin_fee: public(uint256) future_mid_fee: public(uint256) future_out_fee: public(uint256) future_admin_fee: public(uint256) balances: public(uint256[N_COINS]) D: public(uint256) owner: public(address) future_owner: public(address) xcp_profit: public(uint256) xcp_profit_a: public(uint256) # Full profit at last claim of admin fees virtual_price: public(uint256) # Cached (fast to read) virtual price also used internally not_adjusted: bool is_killed: public(bool) kill_deadline: public(uint256) transfer_ownership_deadline: public(uint256) admin_actions_deadline: public(uint256) admin_fee_receiver: public(address) KILL_DEADLINE_DT: constant(uint256) = 2 * 30 * 86400 ADMIN_ACTIONS_DELAY: constant(uint256) = 3 * 86400 MIN_RAMP_TIME: constant(uint256) = 86400 MAX_ADMIN_FEE: constant(uint256) = 10 * 10 ** 9 MIN_FEE: constant(uint256) = 5 * 10 ** 5 # 0.5 bps MAX_FEE: constant(uint256) = 10 * 10 ** 9 MAX_A_CHANGE: constant(uint256) = 10 NOISE_FEE: constant(uint256) = 10**5 # 0.1 bps MIN_GAMMA: constant(uint256) = 10**10 MAX_GAMMA: constant(uint256) = 2 * 10**16 MIN_A: constant(uint256) = N_COINS**N_COINS * A_MULTIPLIER / 10 MAX_A: constant(uint256) = N_COINS**N_COINS * A_MULTIPLIER * 100000 # This must be changed for different N_COINS # For example: # N_COINS = 3 -> 1 (10**18 -> 10**18) # N_COINS = 4 -> 10**8 (10**18 -> 10**10) # PRICE_PRECISION_MUL: constant(uint256) = 1 PRECISIONS: constant(uint256[N_COINS]) = [ 1000000000000, 10000000000000000, ] EXP_PRECISION: constant(uint256) = 10**10 @external def __init__( owner: address, admin_fee_receiver: address, A: uint256, gamma: uint256, mid_fee: uint256, out_fee: uint256, allowed_extra_profit: uint256, fee_gamma: uint256, adjustment_step: uint256, admin_fee: uint256, ma_half_time: uint256, initial_price: uint256 ): self.owner = owner # Pack A and gamma: # shifted A + gamma A_gamma: uint256 = shift(A, 128) A_gamma = bitwise_or(A_gamma, gamma) self.initial_A_gamma = A_gamma self.future_A_gamma = A_gamma self.mid_fee = mid_fee self.out_fee = out_fee self.allowed_extra_profit = allowed_extra_profit self.fee_gamma = fee_gamma self.adjustment_step = adjustment_step self.admin_fee = admin_fee self.price_scale = initial_price self.price_oracle = initial_price self.last_prices = initial_price self.last_prices_timestamp = block.timestamp self.ma_half_time = ma_half_time self.xcp_profit_a = 10**18 self.kill_deadline = block.timestamp + KILL_DEADLINE_DT self.admin_fee_receiver = admin_fee_receiver ### Math functions @internal @pure def geometric_mean(unsorted_x: uint256[N_COINS], sort: bool) -> uint256: """ (x[0] * x[1] * ...) ** (1/N) """ x: uint256[N_COINS] = unsorted_x if sort and x[0] < x[1]: x = [unsorted_x[1], unsorted_x[0]] 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) # line below makes it for 2 coins D = (D + x[0] * x[1] / D) / N_COINS 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" @internal @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] = x_unsorted if x[0] < x[1]: x = [x_unsorted[1], x_unsorted[0]] assert x[0] > 10**9 - 1 and x[0] < 10**15 * 10**18 + 1 # dev: unsafe values x[0] assert x[1] * 10**18 / x[0] > 10**14-1 # dev: unsafe values x[i] (input) D: uint256 = N_COINS * self.geometric_mean(x, False) S: uint256 = x[0] + x[1] for i in range(255): D_prev: uint256 = D # K0: uint256 = 10**18 # for _x in x: # K0 = K0 * _x * N_COINS / D # collapsed for 2 coins K0: uint256 = (10**18 * N_COINS**2) * x[0] / D * x[1] / 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" @internal @pure 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 x_j: uint256 = x[1 - i] y: uint256 = D**2 / (x_j * N_COINS**2) K0_i: uint256 = (10**18 * N_COINS) * x_j / D # S_i = x_j # frac = x_j * 1e18 / D => frac = K0_i / N_COINS assert (K0_i > 10**16*N_COINS - 1) and (K0_i < 10**20*N_COINS + 1) # dev: unsafe values x[i] # x_sorted: uint256[N_COINS] = x # x_sorted[i] = 0 # x_sorted = self.sort(x_sorted) # From high to low # x[not i] instead of x_sorted since x_soted has only 1 element convergence_limit: uint256 = max(max(x_j / 10**14, D / 10**14), 100) for j in range(255): y_prev: uint256 = y K0: uint256 = K0_i * y * N_COINS / D S: uint256 = x_j + 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" @internal @pure def halfpow(power: 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 < EXP_PRECISION: return result * S / 10**18 raise "Did not converge" ### end of Math functions @external @view def token() -> address: return token @external @view def coins(i: uint256) -> address: _coins: address[N_COINS] = coins return _coins[i] @internal @view def xp() -> uint256[N_COINS]: return [self.balances[0] * PRECISIONS[0], self.balances[1] * PRECISIONS[1] * self.price_scale / PRECISION] @view @internal def _A_gamma() -> uint256[2]: t1: uint256 = self.future_A_gamma_time A_gamma_1: uint256 = self.future_A_gamma gamma1: uint256 = bitwise_and(A_gamma_1, 2**128-1) A1: uint256 = shift(A_gamma_1, -128) if block.timestamp < t1: # handle ramping up and down of A A_gamma_0: uint256 = self.initial_A_gamma t0: uint256 = self.initial_A_gamma_time # Less readable but more compact way of writing and converting to uint256 # gamma0: uint256 = bitwise_and(A_gamma_0, 2**128-1) # A0: uint256 = shift(A_gamma_0, -128) # A1 = A0 + (A1 - A0) * (block.timestamp - t0) / (t1 - t0) # gamma1 = gamma0 + (gamma1 - gamma0) * (block.timestamp - t0) / (t1 - t0) t1 -= t0 t0 = block.timestamp - t0 t2: uint256 = t1 - t0 A1 = (shift(A_gamma_0, -128) * t2 + A1 * t0) / t1 gamma1 = (bitwise_and(A_gamma_0, 2**128-1) * t2 + gamma1 * t0) / t1 return [A1, gamma1] @view @external def A() -> uint256: return self._A_gamma()[0] @view @external def gamma() -> uint256: return self._A_gamma()[1] @internal @view def _fee(xp: uint256[N_COINS]) -> uint256: """ f = fee_gamma / (fee_gamma + (1 - K)) where K = prod(x) / (sum(x) / N)**N (all normalized to 1e18) """ fee_gamma: uint256 = self.fee_gamma f: uint256 = xp[0] + xp[1] # sum f = fee_gamma * 10**18 / ( fee_gamma + 10**18 - (10**18 * N_COINS**N_COINS) * xp[0] / f * xp[1] / f ) return (self.mid_fee * f + self.out_fee * (10**18 - f)) / 10**18 @external @view def fee() -> uint256: return self._fee(self.xp()) @internal @view def get_xcp(D: uint256) -> uint256: x: uint256[N_COINS] = [D / N_COINS, D * PRECISION / (self.price_scale * N_COINS)] return self.geometric_mean(x, True) @external @view def get_virtual_price() -> uint256: return 10**18 * self.get_xcp(self.D) / CurveToken(token).totalSupply() @internal def _claim_admin_fees(): A_gamma: uint256[2] = self._A_gamma() xcp_profit: uint256 = self.xcp_profit xcp_profit_a: uint256 = self.xcp_profit_a # Gulp here _coins: address[N_COINS] = coins for i in range(N_COINS): self.balances[i] = ERC20(_coins[i]).balanceOf(self) vprice: uint256 = self.virtual_price if xcp_profit > xcp_profit_a: fees: uint256 = (xcp_profit - xcp_profit_a) * self.admin_fee / (2 * 10**10) if fees > 0: receiver: address = self.admin_fee_receiver if receiver != ZERO_ADDRESS: frac: uint256 = vprice * 10**18 / (vprice - fees) - 10**18 claimed: uint256 = CurveToken(token).mint_relative(receiver, frac) xcp_profit -= fees*2 self.xcp_profit = xcp_profit log ClaimAdminFee(receiver, claimed) total_supply: uint256 = CurveToken(token).totalSupply() # Recalculate D b/c we gulped D: uint256 = self.newton_D(A_gamma[0], A_gamma[1], self.xp()) self.D = D self.virtual_price = 10**18 * self.get_xcp(D) / total_supply if xcp_profit > xcp_profit_a: self.xcp_profit_a = xcp_profit @internal def tweak_price(A_gamma: uint256[2],_xp: uint256[N_COINS], p_i: uint256, new_D: uint256): price_oracle: uint256 = self.price_oracle last_prices: uint256 = self.last_prices price_scale: uint256 = self.price_scale last_prices_timestamp: uint256 = self.last_prices_timestamp p_new: uint256 = 0 if last_prices_timestamp < block.timestamp: # MA update required ma_half_time: uint256 = self.ma_half_time alpha: uint256 = self.halfpow((block.timestamp - last_prices_timestamp) * 10**18 / ma_half_time) price_oracle = (last_prices * (10**18 - alpha) + price_oracle * alpha) / 10**18 self.price_oracle = price_oracle self.last_prices_timestamp = block.timestamp D_unadjusted: uint256 = new_D # Withdrawal methods know new D already if new_D == 0: # We will need this a few times (35k gas) D_unadjusted = self.newton_D(A_gamma[0], A_gamma[1], _xp) if p_i > 0: last_prices = p_i else: # calculate real prices __xp: uint256[N_COINS] = _xp dx_price: uint256 = __xp[0] / 10**6 __xp[0] += dx_price last_prices = price_scale * dx_price / (_xp[1] - self.newton_y(A_gamma[0], A_gamma[1], __xp, D_unadjusted, 1)) self.last_prices = last_prices total_supply: uint256 = CurveToken(token).totalSupply() old_xcp_profit: uint256 = self.xcp_profit old_virtual_price: uint256 = self.virtual_price # Update profit numbers without price adjustment first xp: uint256[N_COINS] = [D_unadjusted / N_COINS, D_unadjusted * PRECISION / (N_COINS * price_scale)] xcp_profit: uint256 = 10**18 virtual_price: uint256 = 10**18 if old_virtual_price > 0: xcp: uint256 = self.geometric_mean(xp, True) virtual_price = 10**18 * xcp / total_supply xcp_profit = old_xcp_profit * virtual_price / old_virtual_price t: uint256 = self.future_A_gamma_time if virtual_price < old_virtual_price and t == 0: raise "Loss" if t == 1: self.future_A_gamma_time = 0 self.xcp_profit = xcp_profit needs_adjustment: bool = self.not_adjusted # if not needs_adjustment and (virtual_price-10**18 > (xcp_profit-10**18)/2 + self.allowed_extra_profit): # (re-arrange for gas efficiency) if not needs_adjustment and (virtual_price * 2 - 10**18 > xcp_profit + 2*self.allowed_extra_profit): needs_adjustment = True self.not_adjusted = True if needs_adjustment: adjustment_step: uint256 = self.adjustment_step norm: uint256 = price_oracle * 10**18 / price_scale if norm > 10**18: norm -= 10**18 else: norm = 10**18 - norm if norm > adjustment_step and old_virtual_price > 0: p_new = (price_scale * (norm - adjustment_step) + adjustment_step * price_oracle) / norm # Calculate balances*prices xp = [_xp[0], _xp[1] * p_new / price_scale] # Calculate "extended constant product" invariant xCP and virtual price D: uint256 = self.newton_D(A_gamma[0], A_gamma[1], xp) xp = [D / N_COINS, D * PRECISION / (N_COINS * p_new)] # We reuse old_virtual_price here but it's not old anymore old_virtual_price = 10**18 * self.geometric_mean(xp, True) / total_supply # Proceed if we've got enough profit # if (old_virtual_price > 10**18) and (2 * (old_virtual_price - 10**18) > xcp_profit - 10**18): if (old_virtual_price > 10**18) and (2 * old_virtual_price - 10**18 > xcp_profit): self.price_scale = p_new self.D = D self.virtual_price = old_virtual_price return else: self.not_adjusted = False # Can instead do another flag variable if we want to save bytespace self.D = D_unadjusted self.virtual_price = virtual_price self._claim_admin_fees() return # If we are here, the price_scale adjustment did not happen # Still need to update the profit counter and D self.D = D_unadjusted self.virtual_price = virtual_price @external @nonreentrant('lock') def exchange(i: uint256, j: uint256, dx: uint256, min_dy: uint256) -> uint256: assert not self.is_killed # dev: the pool is killed assert i != j # dev: coin index out of range assert i < N_COINS # dev: coin index out of range assert j < N_COINS # dev: coin index out of range assert dx > 0 # dev: do not exchange 0 coins A_gamma: uint256[2] = self._A_gamma() xp: uint256[N_COINS] = self.balances p: uint256 = 0 dy: uint256 = 0 _coins: address[N_COINS] = coins assert ERC20(_coins[i]).transferFrom(msg.sender, self, dx) y: uint256 = xp[j] x0: uint256 = xp[i] xp[i] = x0 + dx self.balances[i] = xp[i] price_scale: uint256 = self.price_scale xp = [xp[0] * PRECISIONS[0], xp[1] * price_scale * PRECISIONS[1] / PRECISION] prec_i: uint256 = PRECISIONS[0] prec_j: uint256 = PRECISIONS[1] if i == 1: prec_i = PRECISIONS[1] prec_j = PRECISIONS[0] # In case ramp is happening t: uint256 = self.future_A_gamma_time if t > 0: x0 *= prec_i if i > 0: x0 = x0 * price_scale / PRECISION x1: uint256 = xp[i] # Back up old value in xp xp[i] = x0 self.D = self.newton_D(A_gamma[0], A_gamma[1], xp) xp[i] = x1 # And restore if block.timestamp >= t: self.future_A_gamma_time = 1 dy = xp[j] - self.newton_y(A_gamma[0], A_gamma[1], xp, self.D, j) # Not defining new "y" here to have less variables / make subsequent calls cheaper xp[j] -= dy dy -= 1 if j > 0: dy = dy * PRECISION / price_scale dy /= prec_j dy -= self._fee(xp) * dy / 10**10 assert dy >= min_dy, "Slippage" y -= dy self.balances[j] = y assert ERC20(_coins[j]).transfer(msg.sender, dy) y *= prec_j if j > 0: y = y * price_scale / PRECISION xp[j] = y # Calculate price if dx > 10**5 and dy > 10**5: _dx: uint256 = dx * prec_i _dy: uint256 = dy * prec_j if i == 0: p = _dx * 10**18 / _dy else: # j == 0 p = _dy * 10**18 / _dx self.tweak_price(A_gamma, xp, p, 0) log TokenExchange(msg.sender, i, dx, j, dy) return dy @external @view def get_dy(i: uint256, j: uint256, dx: uint256) -> uint256: assert i != j # dev: same input and output coin assert i < N_COINS # dev: coin index out of range assert j < N_COINS # dev: coin index out of range price_scale: uint256 = self.price_scale * PRECISIONS[1] xp: uint256[N_COINS] = self.balances A_gamma: uint256[2] = self._A_gamma() D: uint256 = self.D if self.future_A_gamma_time > 0: D = self.newton_D(A_gamma[0], A_gamma[1], self.xp()) xp[i] += dx xp = [xp[0] * PRECISIONS[0], xp[1] * price_scale / PRECISION] y: uint256 = self.newton_y(A_gamma[0], A_gamma[1], xp, D, j) dy: uint256 = xp[j] - y - 1 xp[j] = y if j > 0: dy = dy * PRECISION / price_scale else: dy /= PRECISIONS[0] dy -= self._fee(xp) * dy / 10**10 return dy @view @internal def _calc_token_fee(amounts: uint256[N_COINS], xp: uint256[N_COINS]) -> uint256: # fee = sum(amounts_i - avg(amounts)) * fee' / sum(amounts) fee: uint256 = self._fee(xp) * N_COINS / (4 * (N_COINS-1)) S: uint256 = 0 for _x in amounts: S += _x avg: uint256 = S / N_COINS Sdiff: uint256 = 0 for _x in amounts: if _x > avg: Sdiff += _x - avg else: Sdiff += avg - _x return fee * Sdiff / S + NOISE_FEE @external @nonreentrant('lock') def add_liquidity(amounts: uint256[N_COINS], min_mint_amount: uint256) -> uint256: assert not self.is_killed # dev: the pool is killed A_gamma: uint256[2] = self._A_gamma() _coins: address[N_COINS] = coins xp: uint256[N_COINS] = self.balances amountsp: uint256[N_COINS] = empty(uint256[N_COINS]) xx: uint256[N_COINS] = empty(uint256[N_COINS]) d_token: uint256 = 0 d_token_fee: uint256 = 0 old_D: uint256 = 0 xp_old: uint256[N_COINS] = xp for i in range(N_COINS): bal: uint256 = xp[i] + amounts[i] xp[i] = bal self.balances[i] = bal xx = xp price_scale: uint256 = self.price_scale * PRECISIONS[1] xp = [xp[0] * PRECISIONS[0], xp[1] * price_scale / PRECISION] xp_old = [xp_old[0] * PRECISIONS[0], xp_old[1] * price_scale / PRECISION] for i in range(N_COINS): if amounts[i] > 0: assert ERC20(_coins[i]).transferFrom(msg.sender, self, amounts[i]) amountsp[i] = xp[i] - xp_old[i] assert amounts[0] > 0 or amounts[1] > 0 # dev: no coins to add t: uint256 = self.future_A_gamma_time if t > 0: old_D = self.newton_D(A_gamma[0], A_gamma[1], xp_old) if block.timestamp >= t: self.future_A_gamma_time = 1 else: old_D = self.D D: uint256 = self.newton_D(A_gamma[0], A_gamma[1], xp) token_supply: uint256 = CurveToken(token).totalSupply() if old_D > 0: d_token = token_supply * D / old_D - token_supply else: d_token = self.get_xcp(D) # making initial virtual price equal to 1 assert d_token > 0 # dev: nothing minted if old_D > 0: d_token_fee = self._calc_token_fee(amountsp, xp) * d_token / 10**10 + 1 d_token -= d_token_fee token_supply += d_token CurveToken(token).mint(msg.sender, d_token) # Calculate price # p_i * (dx_i - dtoken / token_supply * xx_i) = sum{k!=i}(p_k * (dtoken / token_supply * xx_k - dx_k)) # Simplified for 2 coins p: uint256 = 0 if d_token > 10**5: if amounts[0] == 0 or amounts[1] == 0: S: uint256 = 0 precision: uint256 = 0 ix: uint256 = 0 if amounts[0] == 0: S = xx[0] * PRECISIONS[0] precision = PRECISIONS[1] ix = 1 else: S = xx[1] * PRECISIONS[1] precision = PRECISIONS[0] S = S * d_token / token_supply p = S * PRECISION / (amounts[ix] * precision - d_token * xx[ix] * precision / token_supply) if ix == 0: p = (10**18)**2 / p self.tweak_price(A_gamma, xp, p, D) else: self.D = D self.virtual_price = 10**18 self.xcp_profit = 10**18 CurveToken(token).mint(msg.sender, d_token) assert d_token >= min_mint_amount, "Slippage" log AddLiquidity(msg.sender, amounts, d_token_fee, token_supply) return d_token @external @nonreentrant('lock') def remove_liquidity(_amount: uint256, min_amounts: uint256[N_COINS]): """ This withdrawal method is very safe, does no complex math """ _coins: address[N_COINS] = coins total_supply: uint256 = CurveToken(token).totalSupply() CurveToken(token).burnFrom(msg.sender, _amount) balances: uint256[N_COINS] = self.balances amount: uint256 = _amount - 1 # Make rounding errors favoring other LPs a tiny bit for i in range(N_COINS): d_balance: uint256 = balances[i] * amount / total_supply assert d_balance >= min_amounts[i] self.balances[i] = balances[i] - d_balance balances[i] = d_balance # now it's the amounts going out assert ERC20(_coins[i]).transfer(msg.sender, d_balance) D: uint256 = self.D self.D = D - D * amount / total_supply log RemoveLiquidity(msg.sender, balances, total_supply - _amount) @view @external def calc_token_amount(amounts: uint256[N_COINS]) -> uint256: token_supply: uint256 = CurveToken(token).totalSupply() price_scale: uint256 = self.price_scale * PRECISIONS[1] A_gamma: uint256[2] = self._A_gamma() xp: uint256[N_COINS] = self.xp() amountsp: uint256[N_COINS] = [ amounts[0] * PRECISIONS[0], amounts[1] * price_scale / PRECISION] D0: uint256 = self.D if self.future_A_gamma_time > 0: D0 = self.newton_D(A_gamma[0], A_gamma[1], xp) xp[0] += amountsp[0] xp[1] += amountsp[1] D: uint256 = self.newton_D(A_gamma[0], A_gamma[1], xp) d_token: uint256 = token_supply * D / D0 - token_supply d_token -= self._calc_token_fee(amountsp, xp) * d_token / 10**10 + 1 return d_token @internal @view def _calc_withdraw_one_coin(A_gamma: uint256[2], token_amount: uint256, i: uint256, update_D: bool, calc_price: bool) -> (uint256, uint256, uint256, uint256[N_COINS]): token_supply: uint256 = CurveToken(token).totalSupply() assert token_amount <= token_supply # dev: token amount more than supply assert i < N_COINS # dev: coin out of range xx: uint256[N_COINS] = self.balances D0: uint256 = 0 price_scale_i: uint256 = self.price_scale * PRECISIONS[1] xp: uint256[N_COINS] = [xx[0] * PRECISIONS[0], xx[1] * price_scale_i / PRECISION] if i == 0: price_scale_i = PRECISION * PRECISIONS[0] if update_D: D0 = self.newton_D(A_gamma[0], A_gamma[1], xp) else: D0 = self.D D: uint256 = D0 # Charge the fee on D, not on y, e.g. reducing invariant LESS than charging the user fee: uint256 = self._fee(xp) dD: uint256 = token_amount * D / token_supply D -= (dD - (fee * dD / (2 * 10**10) + 1)) y: uint256 = self.newton_y(A_gamma[0], A_gamma[1], xp, D, i) dy: uint256 = (xp[i] - y) * PRECISION / price_scale_i xp[i] = y # Price calc p: uint256 = 0 if calc_price and dy > 10**5 and token_amount > 10**5: # p_i = dD / D0 * sum'(p_k * x_k) / (dy - dD / D0 * y0) S: uint256 = 0 precision: uint256 = PRECISIONS[0] if i == 1: S = xx[0] * PRECISIONS[0] precision = PRECISIONS[1] else: S = xx[1] * PRECISIONS[1] S = S * dD / D0 p = S * PRECISION / (dy * precision - dD * xx[i] * precision / D0) if i == 0: p = (10**18)**2 / p return dy, p, D, xp @view @external def calc_withdraw_one_coin(token_amount: uint256, i: uint256) -> uint256: return self._calc_withdraw_one_coin(self._A_gamma(), token_amount, i, True, False)[0] @external @nonreentrant('lock') def remove_liquidity_one_coin(token_amount: uint256, i: uint256, min_amount: uint256) -> uint256: assert not self.is_killed # dev: the pool is killed A_gamma: uint256[2] = self._A_gamma() dy: uint256 = 0 D: uint256 = 0 p: uint256 = 0 xp: uint256[N_COINS] = empty(uint256[N_COINS]) future_A_gamma_time: uint256 = self.future_A_gamma_time dy, p, D, xp = self._calc_withdraw_one_coin(A_gamma, token_amount, i, (future_A_gamma_time > 0), True) assert dy >= min_amount, "Slippage" if block.timestamp >= future_A_gamma_time: self.future_A_gamma_time = 1 self.balances[i] -= dy CurveToken(token).burnFrom(msg.sender, token_amount) _coins: address[N_COINS] = coins assert ERC20(_coins[i]).transfer(msg.sender, dy) self.tweak_price(A_gamma, xp, p, D) log RemoveLiquidityOne(msg.sender, token_amount, i, dy) return dy @external @nonreentrant('lock') def claim_admin_fees(): self._claim_admin_fees() # Admin parameters @external def ramp_A_gamma(future_A: uint256, future_gamma: uint256, future_time: uint256): assert msg.sender == self.owner # dev: only owner assert block.timestamp > self.initial_A_gamma_time + (MIN_RAMP_TIME-1) assert future_time > block.timestamp + (MIN_RAMP_TIME-1) # dev: insufficient time A_gamma: uint256[2] = self._A_gamma() initial_A_gamma: uint256 = shift(A_gamma[0], 128) initial_A_gamma = bitwise_or(initial_A_gamma, A_gamma[1]) assert future_A > MIN_A-1 assert future_A < MAX_A+1 assert future_gamma > MIN_GAMMA-1 assert future_gamma < MAX_GAMMA+1 ratio: uint256 = 10**18 * future_A / A_gamma[0] assert ratio < 10**18 * MAX_A_CHANGE + 1 assert ratio > 10**18 / MAX_A_CHANGE - 1 ratio = 10**18 * future_gamma / A_gamma[1] assert ratio < 10**18 * MAX_A_CHANGE + 1 assert ratio > 10**18 / MAX_A_CHANGE - 1 self.initial_A_gamma = initial_A_gamma self.initial_A_gamma_time = block.timestamp future_A_gamma: uint256 = shift(future_A, 128) future_A_gamma = bitwise_or(future_A_gamma, future_gamma) self.future_A_gamma_time = future_time self.future_A_gamma = future_A_gamma log RampAgamma(A_gamma[0], future_A, A_gamma[1], future_gamma, block.timestamp, future_time) @external def stop_ramp_A_gamma(): assert msg.sender == self.owner # dev: only owner A_gamma: uint256[2] = self._A_gamma() current_A_gamma: uint256 = shift(A_gamma[0], 128) current_A_gamma = bitwise_or(current_A_gamma, A_gamma[1]) self.initial_A_gamma = current_A_gamma self.future_A_gamma = current_A_gamma self.initial_A_gamma_time = block.timestamp self.future_A_gamma_time = block.timestamp # now (block.timestamp < t1) is always False, so we return saved A log StopRampA(A_gamma[0], A_gamma[1], block.timestamp) @external def commit_new_parameters( _new_mid_fee: uint256, _new_out_fee: uint256, _new_admin_fee: uint256, _new_fee_gamma: uint256, _new_allowed_extra_profit: uint256, _new_adjustment_step: uint256, _new_ma_half_time: uint256, ): assert msg.sender == self.owner # dev: only owner assert self.admin_actions_deadline == 0 # dev: active action new_mid_fee: uint256 = _new_mid_fee new_out_fee: uint256 = _new_out_fee new_admin_fee: uint256 = _new_admin_fee new_fee_gamma: uint256 = _new_fee_gamma new_allowed_extra_profit: uint256 = _new_allowed_extra_profit new_adjustment_step: uint256 = _new_adjustment_step new_ma_half_time: uint256 = _new_ma_half_time # Fees if new_out_fee < MAX_FEE+1: assert new_out_fee > MIN_FEE-1 # dev: fee is out of range else: new_out_fee = self.out_fee if new_mid_fee > MAX_FEE: new_mid_fee = self.mid_fee assert new_mid_fee <= new_out_fee # dev: mid-fee is too high if new_admin_fee > MAX_ADMIN_FEE: new_admin_fee = self.admin_fee # AMM parameters if new_fee_gamma < 10**18: assert new_fee_gamma > 0 # dev: fee_gamma out of range [1 .. 10**18] else: new_fee_gamma = self.fee_gamma if new_allowed_extra_profit > 10**18: new_allowed_extra_profit = self.allowed_extra_profit if new_adjustment_step > 10**18: new_adjustment_step = self.adjustment_step # MA if new_ma_half_time < 7*86400: assert new_ma_half_time > 0 # dev: MA time should be longer than 1 second else: new_ma_half_time = self.ma_half_time _deadline: uint256 = block.timestamp + ADMIN_ACTIONS_DELAY self.admin_actions_deadline = _deadline self.future_admin_fee = new_admin_fee self.future_mid_fee = new_mid_fee self.future_out_fee = new_out_fee self.future_fee_gamma = new_fee_gamma self.future_allowed_extra_profit = new_allowed_extra_profit self.future_adjustment_step = new_adjustment_step self.future_ma_half_time = new_ma_half_time log CommitNewParameters(_deadline, new_admin_fee, new_mid_fee, new_out_fee, new_fee_gamma, new_allowed_extra_profit, new_adjustment_step, new_ma_half_time) @external @nonreentrant('lock') def apply_new_parameters(): assert msg.sender == self.owner # dev: only owner assert block.timestamp >= self.admin_actions_deadline # dev: insufficient time assert self.admin_actions_deadline != 0 # dev: no active action self.admin_actions_deadline = 0 admin_fee: uint256 = self.future_admin_fee if self.admin_fee != admin_fee: self._claim_admin_fees() self.admin_fee = admin_fee mid_fee: uint256 = self.future_mid_fee self.mid_fee = mid_fee out_fee: uint256 = self.future_out_fee self.out_fee = out_fee fee_gamma: uint256 = self.future_fee_gamma self.fee_gamma = fee_gamma allowed_extra_profit: uint256 = self.future_allowed_extra_profit self.allowed_extra_profit = allowed_extra_profit adjustment_step: uint256 = self.future_adjustment_step self.adjustment_step = adjustment_step ma_half_time: uint256 = self.future_ma_half_time self.ma_half_time = ma_half_time log NewParameters(admin_fee, mid_fee, out_fee, fee_gamma, allowed_extra_profit, adjustment_step, ma_half_time) @external def revert_new_parameters(): assert msg.sender == self.owner # dev: only owner self.admin_actions_deadline = 0 @external def commit_transfer_ownership(_owner: address): assert msg.sender == self.owner # dev: only owner assert self.transfer_ownership_deadline == 0 # dev: active transfer _deadline: uint256 = block.timestamp + ADMIN_ACTIONS_DELAY self.transfer_ownership_deadline = _deadline self.future_owner = _owner log CommitNewAdmin(_deadline, _owner) @external def apply_transfer_ownership(): assert msg.sender == self.owner # dev: only owner assert block.timestamp >= self.transfer_ownership_deadline # dev: insufficient time assert self.transfer_ownership_deadline != 0 # dev: no active transfer self.transfer_ownership_deadline = 0 _owner: address = self.future_owner self.owner = _owner log NewAdmin(_owner) @external def revert_transfer_ownership(): assert msg.sender == self.owner # dev: only owner self.transfer_ownership_deadline = 0 @external def kill_me(): assert msg.sender == self.owner # dev: only owner assert self.kill_deadline > block.timestamp # dev: deadline has passed self.is_killed = True @external def unkill_me(): assert msg.sender == self.owner # dev: only owner self.is_killed = False @external def set_admin_fee_receiver(_admin_fee_receiver: address): assert msg.sender == self.owner # dev: only owner self.admin_fee_receiver = _admin_fee_receiver
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"name":"TokenExchange","inputs":[{"name":"buyer","type":"address","indexed":true},{"name":"sold_id","type":"uint256","indexed":false},{"name":"tokens_sold","type":"uint256","indexed":false},{"name":"bought_id","type":"uint256","indexed":false},{"name":"tokens_bought","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"AddLiquidity","inputs":[{"name":"provider","type":"address","indexed":true},{"name":"token_amounts","type":"uint256[2]","indexed":false},{"name":"fee","type":"uint256","indexed":false},{"name":"token_supply","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"RemoveLiquidity","inputs":[{"name":"provider","type":"address","indexed":true},{"name":"token_amounts","type":"uint256[2]","indexed":false},{"name":"token_supply","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"RemoveLiquidityOne","inputs":[{"name":"provider","type":"address","indexed":true},{"name":"token_amount","type":"uint256","indexed":false},{"name":"coin_index","type":"uint256","indexed":false},{"name":"coin_amount","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"CommitNewAdmin","inputs":[{"name":"deadline","type":"uint256","indexed":true},{"name":"admin","type":"address","indexed":true}],"anonymous":false,"type":"event"},{"name":"NewAdmin","inputs":[{"name":"admin","type":"address","indexed":true}],"anonymous":false,"type":"event"},{"name":"CommitNewParameters","inputs":[{"name":"deadline","type":"uint256","indexed":true},{"name":"admin_fee","type":"uint256","indexed":false},{"name":"mid_fee","type":"uint256","indexed":false},{"name":"out_fee","type":"uint256","indexed":false},{"name":"fee_gamma","type":"uint256","indexed":false},{"name":"allowed_extra_profit","type":"uint256","indexed":false},{"name":"adjustment_step","type":"uint256","indexed":false},{"name":"ma_half_time","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"NewParameters","inputs":[{"name":"admin_fee","type":"uint256","indexed":false},{"name":"mid_fee","type":"uint256","indexed":false},{"name":"out_fee","type":"uint256","indexed":false},{"name":"fee_gamma","type":"uint256","indexed":false},{"name":"allowed_extra_profit","type":"uint256","indexed":false},{"name":"adjustment_step","type":"uint256","indexed":false},{"name":"ma_half_time","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"RampAgamma","inputs":[{"name":"initial_A","type":"uint256","indexed":false},{"name":"future_A","type":"uint256","indexed":false},{"name":"initial_gamma","type":"uint256","indexed":false},{"name":"future_gamma","type":"uint256","indexed":false},{"name":"initial_time","type":"uint256","indexed":false},{"name":"future_time","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"StopRampA","inputs":[{"name":"current_A","type":"uint256","indexed":false},{"name":"current_gamma","type":"uint256","indexed":false},{"name":"time","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"ClaimAdminFee","inputs":[{"name":"admin","type":"address","indexed":true},{"name":"tokens","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"owner","type":"address"},{"name":"admin_fee_receiver","type":"address"},{"name":"A","type":"uint256"},{"name":"gamma","type":"uint256"},{"name":"mid_fee","type":"uint256"},{"name":"out_fee","type":"uint256"},{"name":"allowed_extra_profit","type":"uint256"},{"name":"fee_gamma","type":"uint256"},{"name":"adjustment_step","type":"uint256"},{"name":"admin_fee","type":"uint256"},{"name":"ma_half_time","type":"uint256"},{"name":"initial_price","type":"uint256"}],"outputs":[]},{"stateMutability":"view","type":"function","name":"token","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":426},{"stateMutability":"view","type":"function","name":"coins","inputs":[{"name":"i","type":"uint256"}],"outputs":[{"name":"","type":"address"}],"gas":558},{"stateMutability":"view","type":"function","name":"A","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":595},{"stateMutability":"view","type":"function","name":"gamma","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":11699},{"stateMutability":"view","type":"function","name":"fee","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":17543},{"stateMutability":"view","type":"function","name":"get_virtual_price","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":364707},{"stateMutability":"nonpayable","type":"function","name":"exchange","inputs":[{"name":"i","type":"uint256"},{"name":"j","type":"uint256"},{"name":"dx","type":"uint256"},{"name":"min_dy","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":16729579},{"stateMutability":"view","type":"function","name":"get_dy","inputs":[{"name":"i","type":"uint256"},{"name":"j","type":"uint256"},{"name":"dx","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":4577395},{"stateMutability":"nonpayable","type":"function","name":"add_liquidity","inputs":[{"name":"amounts","type":"uint256[2]"},{"name":"min_mint_amount","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":17683237},{"stateMutability":"nonpayable","type":"function","name":"remove_liquidity","inputs":[{"name":"_amount","type":"uint256"},{"name":"min_amounts","type":"uint256[2]"}],"outputs":[],"gas":185092},{"stateMutability":"view","type":"function","name":"calc_token_amount","inputs":[{"name":"amounts","type":"uint256[2]"}],"outputs":[{"name":"","type":"uint256"}],"gas":5200797},{"stateMutability":"view","type":"function","name":"calc_withdraw_one_coin","inputs":[{"name":"token_amount","type":"uint256"},{"name":"i","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":12464},{"stateMutability":"nonpayable","type":"function","name":"remove_liquidity_one_coin","inputs":[{"name":"token_amount","type":"uint256"},{"name":"i","type":"uint256"},{"name":"min_amount","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":16662446},{"stateMutability":"nonpayable","type":"function","name":"claim_admin_fees","inputs":[],"outputs":[],"gas":3250771},{"stateMutability":"nonpayable","type":"function","name":"ramp_A_gamma","inputs":[{"name":"future_A","type":"uint256"},{"name":"future_gamma","type":"uint256"},{"name":"future_time","type":"uint256"}],"outputs":[],"gas":161578},{"stateMutability":"nonpayable","type":"function","name":"stop_ramp_A_gamma","inputs":[],"outputs":[],"gas":156623},{"stateMutability":"nonpayable","type":"function","name":"commit_new_parameters","inputs":[{"name":"_new_mid_fee","type":"uint256"},{"name":"_new_out_fee","type":"uint256"},{"name":"_new_admin_fee","type":"uint256"},{"name":"_new_fee_gamma","type":"uint256"},{"name":"_new_allowed_extra_profit","type":"uint256"},{"name":"_new_adjustment_step","type":"uint256"},{"name":"_new_ma_half_time","type":"uint256"}],"outputs":[],"gas":304964},{"stateMutability":"nonpayable","type":"function","name":"apply_new_parameters","inputs":[],"outputs":[],"gas":3542961},{"stateMutability":"nonpayable","type":"function","name":"revert_new_parameters","inputs":[],"outputs":[],"gas":23022},{"stateMutability":"nonpayable","type":"function","name":"commit_transfer_ownership","inputs":[{"name":"_owner","type":"address"}],"outputs":[],"gas":78707},{"stateMutability":"nonpayable","type":"function","name":"apply_transfer_ownership","inputs":[],"outputs":[],"gas":66922},{"stateMutability":"nonpayable","type":"function","name":"revert_transfer_ownership","inputs":[],"outputs":[],"gas":23112},{"stateMutability":"nonpayable","type":"function","name":"kill_me","inputs":[],"outputs":[],"gas":40335},{"stateMutability":"nonpayable","type":"function","name":"unkill_me","inputs":[],"outputs":[],"gas":23172},{"stateMutability":"nonpayable","type":"function","name":"set_admin_fee_receiver","inputs":[{"name":"_admin_fee_receiver","type":"address"}],"outputs":[],"gas":38362},{"stateMutability":"view","type":"function","name":"price_scale","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3276},{"stateMutability":"view","type":"function","name":"price_oracle","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3306},{"stateMutability":"view","type":"function","name":"last_prices","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3336},{"stateMutability":"view","type":"function","name":"last_prices_timestamp","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3366},{"stateMutability":"view","type":"function","name":"initial_A_gamma","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3396},{"stateMutability":"view","type":"function","name":"future_A_gamma","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3426},{"stateMutability":"view","type":"function","name":"initial_A_gamma_time","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3456},{"stateMutability":"view","type":"function","name":"future_A_gamma_time","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3486},{"stateMutability":"view","type":"function","name":"allowed_extra_profit","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3516},{"stateMutability":"view","type":"function","name":"future_allowed_extra_profit","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3546},{"stateMutability":"view","type":"function","name":"fee_gamma","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3576},{"stateMutability":"view","type":"function","name":"future_fee_gamma","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3606},{"stateMutability":"view","type":"function","name":"adjustment_step","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3636},{"stateMutability":"view","type":"function","name":"future_adjustment_step","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3666},{"stateMutability":"view","type":"function","name":"ma_half_time","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3696},{"stateMutability":"view","type":"function","name":"future_ma_half_time","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3726},{"stateMutability":"view","type":"function","name":"mid_fee","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3756},{"stateMutability":"view","type":"function","name":"out_fee","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3786},{"stateMutability":"view","type":"function","name":"admin_fee","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3816},{"stateMutability":"view","type":"function","name":"future_mid_fee","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3846},{"stateMutability":"view","type":"function","name":"future_out_fee","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3876},{"stateMutability":"view","type":"function","name":"future_admin_fee","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3906},{"stateMutability":"view","type":"function","name":"balances","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":3981},{"stateMutability":"view","type":"function","name":"D","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3966},{"stateMutability":"view","type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3996},{"stateMutability":"view","type":"function","name":"future_owner","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":4026},{"stateMutability":"view","type":"function","name":"xcp_profit","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":4056},{"stateMutability":"view","type":"function","name":"xcp_profit_a","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":4086},{"stateMutability":"view","type":"function","name":"virtual_price","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":4116},{"stateMutability":"view","type":"function","name":"is_killed","inputs":[],"outputs":[{"name":"","type":"bool"}],"gas":4146},{"stateMutability":"view","type":"function","name":"kill_deadline","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":4176},{"stateMutability":"view","type":"function","name":"transfer_ownership_deadline","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":4206},{"stateMutability":"view","type":"function","name":"admin_actions_deadline","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":4236},{"stateMutability":"view","type":"function","name":"admin_fee_receiver","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":4266}]
Contract Creation Code
60206151cf60c03960c0518060a01c6151ca5780905061014052602060206151cf0160c03960c0518060a01c6151ca578090506101605261014051601f55602060406151cf0160c03960c05160801b61018052602060606151cf0160c03960c05161018051176101805261018051600a5561018051600b55602060806151cf0160c03960c051601655602060a06151cf0160c03960c051601755602060c06151cf0160c03960c051600e55602060e06151cf0160c03960c05160105560206101006151cf0160c03960c05160125560206101206151cf0160c03960c05160185560206101606151cf0160c03960c05160065560206101606151cf0160c03960c05160075560206101606151cf0160c03960c0516008554260095560206101406151cf0160c03960c051601455670de0b6b3a764000060225542624f1a0081818301106151ca5780820190509050602655610160516029556151b256600436101561000d5761279d565b60046000601c37600051346150525763fc0c546a81141561004857733d229e1b4faab62f621ef2f6a610961f7bd7b23b610140526020610140f35b63c66106578114156100a55773a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486101405273db25f211ab05b1c97d595516f45794528a807ad8610160526101406004356002811015615052576020020151610180526020610180f35b63f446c1d08114156100cb576100bc610220613b4b565b61022051610260526020610260f35b63b13739298114156100f4576100e2610220613b4b565b61022060200151610260526020610260f35b63ddca3f438114156101485761010b6101c0613ad5565b6101c08051610220528060200151610240525061022051610140526102405161016052610139610200613cd0565b61020051610260526020610260f35b63bb7b8b808114156101de57670de0b6b3a7640000601e546102a05261016f610320613e2c565b6103205180820282158284830414171561505257809050905090506318160ddd610340526020610340600461035c733d229e1b4faab62f621ef2f6a610961f7bd7b23b5afa1561505257601f3d1115615052576103405180801561505257820490509050610380526020610380f35b635b41b90881141561093d5760005461505257600160005560255461505257602435600435181561505257600260043510156150525760026024351015615052576000604435111561505257610235610aa0613b4b565b610aa08051610a60528060200151610a805250601c54610aa052601d54610ac052604036610ae03773a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48610b205273db25f211ab05b1c97d595516f45794528a807ad8610b40526323b872dd610b605233610b805230610ba052604435610bc0526020610b606064610b7c6000610b2060043560028110156150525760200201515af11561505257601f3d111561505257610b60511561505257610aa06024356002811015615052576020020151610b6052610aa06004356002811015615052576020020151610b8052610b805160443581818301106150525780820190509050610aa06004356002811015615052576020020152610aa06004356002811015615052576020020151600160043560028110156150525702601c0155600654610ba052610aa05164e8d4a510008082028215828483041417156150525780905090509050610aa052610ac051610ba0518082028215828483041417156150525780905090509050662386f26fc100008082028215828483041417156150525780905090509050670de0b6b3a764000080820490509050610ac05264e8d4a51000610bc052662386f26fc10000610be0526001600435141561041a57662386f26fc10000610bc05264e8d4a51000610be0525b600d54610c00526000610c0051111561051a57610b808051610bc05180820282158284830414171561505257809050905090508152506000600435111561048f57610b8051610ba0518082028215828483041417156150525780905090509050670de0b6b3a764000080820490509050610b80525b610aa06004356002811015615052576020020151610c2052610b8051610aa06004356002811015615052576020020152610a60516102a052610a80516102c052610aa0516102e052610ac051610300526104ea610c40612945565b610c4051601e55610c2051610aa06004356002811015615052576020020152610c00514210610519576001600d555b5b610aa06024356002811015615052576020020151610a605161014052610a805161016052610aa05161018052610ac0516101a052601e546101c0526024356101e052610567610c206130e8565b610c20518082106150525780820390509050610b0052610aa0602435600281101561505257602002018051610b00518082106150525780820390509050815250610b008051600180821061505257808203905090508152506000602435111561060457610b0051670de0b6b3a76400008082028215828483041417156150525780905090509050610ba05180801561505257820490509050610b00525b610b008051610be05180801561505257820490509050815250610b008051610aa05161014052610ac0516101605261063d610c20613cd0565b610c2051610b005180820282158284830414171561505257809050905090506402540be400808204905090508082106150525780820390509050815250606435610b005110156106cc576308c379a0610c20526020610c40526008610c60527f536c697070616765000000000000000000000000000000000000000000000000610c8052610c60506064610c3cfd5b610b608051610b00518082106150525780820390509050815250610b6051600160243560028110156150525702601c015563a9059cbb610c205233610c4052610b0051610c60526020610c206044610c3c6000610b2060243560028110156150525760200201515af11561505257601f3d111561505257610c20511561505257610b608051610be0518082028215828483041417156150525780905090509050815250600060243511156107ae57610b6051610ba0518082028215828483041417156150525780905090509050670de0b6b3a764000080820490509050610b60525b610b6051610aa06024356002811015615052576020020152620186a060443511156107e157620186a0610b0051116107e4565b60005b156108ae57604435610bc0518082028215828483041417156150525780905090509050610c2052610b0051610be0518082028215828483041417156150525780905090509050610c405260043561087357610c2051670de0b6b3a76400008082028215828483041417156150525780905090509050610c405180801561505257820490509050610ae0526108ad565b610c4051670de0b6b3a76400008082028215828483041417156150525780905090509050610c205180801561505257820490509050610ae0525b5b610a605161074052610a805161076052610aa05161078052610ac0516107a052610ae0516107c05260006107e0526108e461422c565b337fb2e76ae99761dc136e598d4a629bb347eccb9532a5f8bbd72e18467c3c34cc98600435610c2052604435610c4052602435610c6052610b0051610c80526080610c20a2610b0051610c20526020610c206000600055f35b63556d6e9f811415610c135760243560043518156150525760026004351015615052576002602435101561505257600654662386f26fc10000808202821582848304141715615052578090509050905061054052601c5461056052601d54610580526109aa6105e0613b4b565b6105e080516105a05280602001516105c05250601e546105e0526000600d541115610a31576105a051610660526105c051610680526109ea610600613ad5565b61060080516106a05280602001516106c05250610660516102a052610680516102c0526106a0516102e0526106c05161030052610a28610640612945565b610640516105e0525b610560600435600281101561505257602002018051604435818183011061505257808201905090508152506105605164e8d4a5100080820282158284830414171561505257809050905090506105605261058051610540518082028215828483041417156150525780905090509050670de0b6b3a764000080820490509050610580526105a051610140526105c051610160526105605161018052610580516101a0526105e0516101c0526024356101e052610aee6106206130e8565b61062051610600526105606024356002811015615052576020020151610600518082106150525780820390509050600180821061505257808203905090506106205261060051610560602435600281101561505257602002015260006024351115610b915761062051670de0b6b3a76400008082028215828483041417156150525780905090509050610540518080156150525782049050905061062052610ba7565b610620805164e8d4a51000808204905090508152505b610620805161056051610140526105805161016052610bc7610640613cd0565b610640516106205180820282158284830414171561505257809050905090506402540be40080820490509050808210615052578082039050905081525061062051610640526020610640f35b630b4c7e4d81141561147b5760015461505257600160015560255461505257610c3d610aa0613b4b565b610aa08051610a60528060200151610a80525073a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48610aa05273db25f211ab05b1c97d595516f45794528a807ad8610ac052601c54610ae052601d54610b005260e036610b2037610ae051610c0052610b0051610c2052610c4060006002818352015b610ae0610c405160028110156150525760200201516020610c4051026004013581818301106150525780820190509050610c6052610c6051610ae0610c40516002811015615052576020020152610c60516001610c405160028110156150525702601c01558151600101808352811415610cb3575050610ae051610b6052610b0051610b8052600654662386f26fc100008082028215828483041417156150525780905090509050610c4052610ae05164e8d4a510008082028215828483041417156150525780905090509050610ae052610b0051610c40518082028215828483041417156150525780905090509050670de0b6b3a764000080820490509050610b0052610c005164e8d4a510008082028215828483041417156150525780905090509050610c0052610c2051610c40518082028215828483041417156150525780905090509050670de0b6b3a764000080820490509050610c2052610c6060006002818352015b60006020610c605102600401351115610ed8576323b872dd610c805233610ca05230610cc0526020610c60510260040135610ce0526020610c806064610c9c6000610aa0610c605160028110156150525760200201515af11561505257601f3d111561505257610c80511561505257610ae0610c60516002811015615052576020020151610c00610c605160028110156150525760200201518082106150525780820390509050610b20610c605160028110156150525760200201525b8151600101808352811415610e1b57505060006004351115610efb576001610f02565b6000602435115b1561505257600d54610c60526000610c60511115610f6257610a60516102a052610a80516102c052610c00516102e052610c205161030052610f45610c80612945565b610c8051610be052610c60514210610f5d576001600d555b610f6a565b601e54610be0525b610a60516102a052610a80516102c052610ae0516102e052610b005161030052610f95610ca0612945565b610ca051610c80526318160ddd610cc0526020610cc06004610cdc733d229e1b4faab62f621ef2f6a610961f7bd7b23b5afa1561505257601f3d111561505257610cc051610ca0526000610be051111561103457610ca051610c80518082028215828483041417156150525780905090509050610be05180801561505257820490509050610ca0518082106150525780820390509050610ba052611050565b610c80516102a052611047610cc0613e2c565b610cc051610ba0525b6000610ba0511115615052576000610be051111561136457610b20516101c052610b40516101e052610ae05161020052610b005161022052611093610cc06149f0565b610cc051610ba05180820282158284830414171561505257809050905090506402540be40080820490509050600181818301106150525780820190509050610bc052610ba08051610bc0518082106150525780820390509050815250610ca08051610ba051818183011061505257808201905090508152506340c10f19610cc05233610ce052610ba051610d00526020610cc06044610cdc6000733d229e1b4faab62f621ef2f6a610961f7bd7b23b5af11561505257601f3d111561505257610cc0506000610cc052620186a0610ba05111156113275760043561117857600161117d565b602435155b1561132657606036610ce0376004356111cc57610b605164e8d4a510008082028215828483041417156150525780905090509050610ce052662386f26fc10000610d00526001610d20526111fe565b610b8051662386f26fc100008082028215828483041417156150525780905090509050610ce05264e8d4a51000610d00525b610ce051610ba0518082028215828483041417156150525780905090509050610ca05180801561505257820490509050610ce052610ce051670de0b6b3a764000080820282158284830414171561505257809050905090506020610d20510260040135610d00518082028215828483041417156150525780905090509050610ba051610b60610d205160028110156150525760200201518082028215828483041417156150525780905090509050610d00518082028215828483041417156150525780905090509050610ca05180801561505257820490509050808210615052578082039050905080801561505257820490509050610cc052610d2051611325576ec097ce7bc90715b34b9f1000000000610cc05180801561505257820490509050610cc0525b5b5b610a605161074052610a805161076052610ae05161078052610b00516107a052610cc0516107c052610c80516107e05261135f61422c565b6113cf565b610c8051601e55670de0b6b3a7640000602355670de0b6b3a76400006021556340c10f19610cc05233610ce052610ba051610d00526020610cc06044610cdc6000733d229e1b4faab62f621ef2f6a610961f7bd7b23b5af11561505257601f3d111561505257610cc0505b604435610ba0511015611421576308c379a0610cc0526020610ce0526008610d00527f536c697070616765000000000000000000000000000000000000000000000000610d2052610d00506064610cdcfd5b337f540ab385f9b5d450a27404172caade516b3ba3f4be88239ac56a2ad1de2a1f5a600435610cc052602435610ce052610bc051610d0052610ca051610d20526080610cc0a2610ba051610cc0526020610cc06000600155f35b635b36389c8114156117325760025461505257600160025573a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486101405273db25f211ab05b1c97d595516f45794528a807ad8610160526318160ddd6101a05260206101a060046101bc733d229e1b4faab62f621ef2f6a610961f7bd7b23b5afa1561505257601f3d1115615052576101a051610180526379cc67906101a052336101c0526004356101e05260206101a060446101bc6000733d229e1b4faab62f621ef2f6a610961f7bd7b23b5af11561505257601f3d1115615052576101a050601c546101a052601d546101c052600435600180821061505257808203905090506101e05261020060006002818352015b6101a06102005160028110156150525760200201516101e051808202821582848304141715615052578090509050905061018051808015615052578204905090506102205260206102005102602401356102205110615052576101a061020051600281101561505257602002015161022051808210615052578082039050905060016102005160028110156150525702601c0155610220516101a061020051600281101561505257602002015263a9059cbb61024052336102605261022051610280526020610240604461025c60006101406102005160028110156150525760200201515af11561505257601f3d1115615052576102405115615052578151600101808352811415611580575050601e546102005261020051610200516101e051808202821582848304141715615052578090509050905061018051808015615052578204905090508082106150525780820390509050601e55337fdd3c0336a16f1b64f172b7bb0dad5b2b3c7c76f91e8c4aafd6aae60dce8001536101a051610220526101c05161024052610180516004358082106150525780820390509050610260526060610220a26000600255005b638d8ea7278114156119bb576318160ddd610560526020610560600461057c733d229e1b4faab62f621ef2f6a610961f7bd7b23b5afa1561505257601f3d1115615052576105605161054052600654662386f26fc100008082028215828483041417156150525780905090509050610560526117af6105c0613b4b565b6105c080516105805280602001516105a052506117cd610600613ad5565b61060080516105c05280602001516105e0525060043564e8d4a51000808202821582848304141715615052578090509050905061060052602435610560518082028215828483041417156150525780905090509050670de0b6b3a76400008082049050905061062052601e54610640526000600d54111561187c57610580516102a0526105a0516102c0526105c0516102e0526105e05161030052611873610660612945565b61066051610640525b6105c0805161060051818183011061505257808201905090508152506105e080516106205181818301106150525780820190509050815250610580516102a0526105a0516102c0526105c0516102e0526105e051610300526118df610680612945565b6106805161066052610540516106605180820282158284830414171561505257809050905090506106405180801561505257820490509050610540518082106150525780820390509050610680526106808051610600516101c052610620516101e0526105c051610200526105e0516102205261195d6106a06149f0565b6106a0516106805180820282158284830414171561505257809050905090506402540be400808204905090506001818183011061505257808201905090508082106150525780820390509050815250610680516106a05260206106a0f35b634fb08c5e811415611a43576119d26107e0613b4b565b6107e080516108c05280602001516108e0525060406004610900376001610940526000610960526108c051610540526108e051610560526109005161058052610920516105a052610940516105c052610960516105e052611a34610820614b81565b61082051610980526020610980f35b63f1dc3cc9811415611ccc5760035461505257600160035560255461505257611a6d610aa0613b4b565b610aa08051610a60528060200151610a80525060a036610aa037600d54610b4052610a605161054052610a80516105605260406004610580376000610b4051116105c05260016105e052611ac2610b60614b81565b610b608051610aa0526020810151610ae0526040810151610ac052606081018051610b00528060200151610b20525050604435610aa0511015611b44576308c379a0610b60526020610b80526008610ba0527f536c697070616765000000000000000000000000000000000000000000000000610bc052610ba0506064610b7cfd5b610b40514210611b54576001600d555b600160243560028110156150525702601c018054610aa05180821061505257808203905090508155506379cc6790610b605233610b8052600435610ba0526020610b606044610b7c6000733d229e1b4faab62f621ef2f6a610961f7bd7b23b5af11561505257601f3d111561505257610b605073a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48610b605273db25f211ab05b1c97d595516f45794528a807ad8610b805263a9059cbb610ba05233610bc052610aa051610be0526020610ba06044610bbc6000610b6060243560028110156150525760200201515af11561505257601f3d111561505257610ba0511561505257610a605161074052610a805161076052610b005161078052610b20516107a052610ae0516107c052610ac0516107e052611c8061422c565b337f5ad056f2e28a8cec232015406b843668c1e36cda598127ec3b8c59b8c72773a060406004610ba037610aa051610be0526060610ba0a2610aa051610ba0526020610ba06000600355f35b63c93f49e8811415611cf357600454615052576001600455611cec613eb8565b6000600455005b635e248072811415611ef257601f5433141561505257600c546201517f8181830110615052578082019050905042111561505257426201517f81818301106150525780820190509050604435111561505257611d50610260613b4b565b610260805161022052806020015161024052506102205160801b6102605261024051610260511761026052610f9f60043511156150525763ee6b28016004351015615052576402540be3ff60243511156150525766470de4df820001602435101561505257670de0b6b3a76400006004358082028215828483041417156150525780905090509050610220518080156150525782049050905061028052678ac7230489e800016102805110156150525767016345785d89ffff61028051111561505257670de0b6b3a76400006024358082028215828483041417156150525780905090509050610240518080156150525782049050905061028052678ac7230489e800016102805110156150525767016345785d89ffff6102805111156150525761026051600a5542600c5560043560801b6102a0526024356102a051176102a052604435600d556102a051600b557fe35f0559b0642164e286b30df2077ec3a05426617a25db7578fd20ba39a6cd05610220516102c0526004356102e05261024051610300526024356103205242610340526044356103605260c06102c0a1005b63244c7c2e811415611f9257601f5433141561505257611f13610260613b4b565b610260805161022052806020015161024052506102205160801b610260526102405161026051176102605261026051600a5561026051600b5542600c5542600d557f5f0e7fba3d100c9e19446e1c92fe436f0a9a22fe99669360e4fdd6d3de2fc2846102205161028052610240516102a052426102c0526060610280a1005b63a43c335181141561215e57601f54331415615052576028546150525760e06004610140376402540be401610160511015611fda576207a11f61016051111561505257611fe2565b601754610160525b6402540be400610140511115611ffa57601654610140525b610160516101405111615052576402540be40061018051111561201f57601854610180525b670de0b6b3a76400006101a05110156120435760006101a05111156150525761204b565b6010546101a0525b670de0b6b3a76400006101c051111561206657600e546101c0525b670de0b6b3a76400006101e0511115612081576012546101e0525b62093a806102005110156120a0576000610200511115615052576120a8565b601454610200525b426203f48081818301106150525780820190509050610220526102205160285561018051601b556101405160195561016051601a556101a0516011556101c051600f556101e05160135561020051601555610220517f913fde9a37e1f8ab67876a4d0ce80790d764fcfc5692f4529526df9c6bdde5536101805161024052610140516102605261016051610280526101a0516102a0526101c0516102c0526101e0516102e052610200516103005260e0610240a2005b632a7dd7cd81141561227757600554615052576001600555601f543314156150525760285442106150525760006028541815615052576000602855601b54610740526107405160185418156121bd576121b5613eb8565b610740516018555b6019546107605261076051601655601a5461078052610780516017556011546107a0526107a051601055600f546107c0526107c051600e556013546107e0526107e05160125560155461080052610800516014557f1c65bbdc939f346e5d6f0bde1f072819947438d4fc7b182cc59c2f6dc55040876107405161082052610760516108405261078051610860526107a051610880526107c0516108a0526107e0516108c052610800516108e05260e0610820a16000600555005b63226840fb81141561229457601f54331415615052576000602855005b636b441a4081141561231b576004358060a01c6150525780905061014052601f543314156150525760275461505257426203f4808181830110615052578082019050905061016052610160516027556101405160205561014051610160517f181aa3aa17d4cbf99265dd4443eba009433d3cde79d60164fde1d1a192beb9356000610180a3005b636a1c05ae81141561238557601f5433141561505257602754421061505257600060275418156150525760006027556020546101405261014051601f55610140517f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c6000610160a2005b6386fbf1938114156123a257601f54331415615052576000602755005b63e36988538114156123c957601f5433141561505257426026541115615052576001602555005b633046f9728114156123e657601f54331415615052576000602555005b637242e524811415612417576004358060a01c6150525780905061014052601f543314156150525761014051602955005b63b9e8c9fd81141561243157600654610140526020610140f35b6386fc88d381141561244b57600754610140526020610140f35b63c146bf9481141561246557600854610140526020610140f35b636112c74781141561247f57600954610140526020610140f35b63204fe3d581141561249957600a54610140526020610140f35b63f30cfad58114156124b357600b54610140526020610140f35b63e89876ff8114156124cd57600c54610140526020610140f35b63f9ed95978114156124e757600d54610140526020610140f35b6349fe9e7781141561250157600e54610140526020610140f35b63727ced5781141561251b57600f54610140526020610140f35b6372d4f0e281141561253557601054610140526020610140f35b63d7c3dcbe81141561254f57601154610140526020610140f35b63083812e581141561256957601254610140526020610140f35b634ea12c7d81141561258357601354610140526020610140f35b63662b627481141561259d57601454610140526020610140f35b630c5e23d48114156125b757601554610140526020610140f35b6392526c0c8114156125d157601654610140526020610140f35b63ee8de6758114156125eb57601754610140526020610140f35b63fee3f7f981141561260557601854610140526020610140f35b637cf9aedc81141561261f57601954610140526020610140f35b637d1b060c81141561263957601a54610140526020610140f35b63e382446281141561265357601b54610140526020610140f35b634903b0d181141561267d57600160043560028110156150525702601c0154610140526020610140f35b630f529ba281141561269757601e54610140526020610140f35b638da5cb5b8114156126b157601f54610140526020610140f35b631ec0cdc18114156126cb57602054610140526020610140f35b637ba1a74d8114156126e557602154610140526020610140f35b630b7b594b8114156126ff57602254610140526020610140f35b630c46b72a81141561271957602354610140526020610140f35b639c868ac081141561273357602554610140526020610140f35b632a42689681141561274d57602654610140526020610140f35b63e0a0b58681141561276757602754610140526020610140f35b63405e28f881141561278157602854610140526020610140f35b636e42e4d281141561279b57602954610140526020610140f35b505b60006000fd5b610140516101a052610160516101c05261018051156127ca576101c0516101a051106127cd565b60005b156127e357610160516101a052610140516101c0525b6101a0516101e052600061020052610220600060ff818352015b6101e051610240526101e0516101a0516101c05180820282158284830414171561505257809050905090506101e05180801561505257820490509050818183011061505257808201905090506002808204905090506101e052610240516101e0511115612883576101e0516102405180821061505257808203905090506102005261289e565b610240516101e0518082106150525780820390509050610200525b600161020051116128b05760016128da565b6101e05161020051670de0b6b3a76400008082028215828483041417156150525780905090509050105b156128ed5750506101e051815250612943565b81516001018083528114156127fd5750506308c379a0610220526020610240526010610260527f446964206e6f7420636f6e7665726765000000000000000000000000000000006102805261026050606461023cfd5b565b610f9f6102a05111156129615763ee6b28016102a05110612964565b60005b15615052576402540be3ff6102c051111561298b5766470de4df8200016102c0511061298e565b60005b15615052576102e051610320526103005161034052610340516103205110156129c25761030051610320526102e051610340525b633b9ac9ff6103205111156129ea576d314dc6448d9338c15b0a0000000161032051106129ed565b60005b1561505257655af3107a3fff61034051670de0b6b3a764000080820282158284830414171561505257809050905090506103205180801561505257820490509050111561505257600261032051610140526103405161016052600061018052612a576103806127a3565b61038051808202821582848304141715615052578090509050905061036052610320516103405181818301106150525780820190509050610380526103a0600060ff818352015b610360516103c052673782dace9d900000610320518082028215828483041417156150525780905090509050610360518080156150525782049050905061034051808202821582848304141715615052578090509050905061036051808015615052578204905090506103e0526102c051670de0b6b3a764000081818301106150525780820190509050610400526103e051610400511115612b6b57610400516103e051808210615052578082039050905060018181830110615052578082019050905061040052612b98565b6103e051610400518082106150525780820390509050600181818301106150525780820190509050610400525b670de0b6b3a76400006103605180820282158284830414171561505257809050905090506102c051808015615052578204905090506104005180820282158284830414171561505257809050905090506102c0518080156150525782049050905061040051808202821582848304141715615052578090509050905061271080820282158284830414171561505257809050905090506102a0518080156150525782049050905061042052673782dace9d9000006103e05180820282158284830414171561505257809050905090506104005180801561505257820490509050610440526103805161038051610440518082028215828483041417156150525780905090509050670de0b6b3a7640000808204905090508181830110615052578082019050905061042051600280820282158284830414171561505257809050905090506103e051808015615052578204905090508181830110615052578082019050905061044051610360518082028215828483041417156150525780905090509050670de0b6b3a7640000808204905090508082106150525780820390509050610460526103605161046051610380518181830110615052578082019050905080820282158284830414171561505257809050905090506104605180801561505257820490509050610480526103605161036051808202821582848304141715615052578090509050905061046051808015615052578204905090506104a0526103e051670de0b6b3a76400001115612e6d576104a08051610360516104205161046051808015615052578204905090508082028215828483041417156150525780905090509050670de0b6b3a764000080820490509050670de0b6b3a76400006103e051808210615052578082039050905080820282158284830414171561505257809050905090506103e0518080156150525782049050905081818301106150525780820190509050815250612f07565b6104a08051610360516104205161046051808015615052578204905090508082028215828483041417156150525780905090509050670de0b6b3a7640000808204905090506103e051670de0b6b3a7640000808210615052578082039050905080820282158284830414171561505257809050905090506103e0518080156150525782049050905080821061505257808203905090508152505b6104a051610480511115612f3457610480516104a051808210615052578082039050905061036052612f58565b6104a051610480518082106150525780820390509050600280820490509050610360525b60006104c0526103c051610360511115612f8b57610360516103c05180821061505257808203905090506104c052612fa6565b6103c0516103605180821061505257808203905090506104c0525b662386f26fc100006103605180821015612fc05780612fc2565b815b905090506104c051655af3107a4000808202821582848304141715615052578090509050905010156130905761050060006002818352015b6020610500510261032001516104e0526104e051670de0b6b3a76400008082028215828483041417156150525780905090509050610360518080156150525782049050905061052052662386f26fc0ffff6105205111156130695768056bc75e2d63100001610520511061306c565b60005b15615052578151600101808352811415612ffa5750505050610360518152506130e6565b8151600101808352811415612a9e5750506308c379a06103a05260206103c05260106103e0527f446964206e6f7420636f6e766572676500000000000000000000000000000000610400526103e05060646103bcfd5b565b610f9f6101405111156131045763ee6b28016101405110613107565b60005b15615052576402540be3ff61016051111561312e5766470de4df8200016101605110613131565b60005b156150525767016345785d89ffff6101c0511115613162576d314dc6448d9338c15b0a000000016101c05110613165565b60005b156150525761018060016101e05180821061505257808203905090506002811015615052576020020151610200527001000000000000000000000000000000006101c05110156150525760026101c0510a61020051600480820282158284830414171561505257809050905090508080156150525782049050905061022052671bc16d674ec800006102005180820282158284830414171561505257809050905090506101c051808015615052578204905090506102405266470de4df81ffff61024051111561324357680ad78ebc5ac62000016102405110613246565b60005b156150525761020051655af3107a4000808204905090506101c051655af3107a4000808204905090508082101561327d578061327f565b815b905090506064808210156132935780613295565b815b9050905061026052610280600060ff818352015b610220516102a05261024051610220518082028215828483041417156150525780905090509050600280820282158284830414171561505257809050905090506101c051808015615052578204905090506102c0526102005161022051818183011061505257808201905090506102e05261016051670de0b6b3a764000081818301106150525780820190509050610300526102c05161030051111561337a57610300516102c0518082106150525780820390509050600181818301106150525780820190509050610300526133a7565b6102c051610300518082106150525780820390509050600181818301106150525780820190509050610300525b670de0b6b3a76400006101c0518082028215828483041417156150525780905090509050610160518080156150525782049050905061030051808202821582848304141715615052578090509050905061016051808015615052578204905090506103005180820282158284830414171561505257809050905090506127108082028215828483041417156150525780905090509050610140518080156150525782049050905061032052670de0b6b3a7640000671bc16d674ec800006102c051808202821582848304141715615052578090509050905061030051808015615052578204905090508181830110615052578082019050905061034052670de0b6b3a76400006102205180820282158284830414171561505257809050905090506102e051610340518082028215828483041417156150525780905090509050818183011061505257808201905090506103205181818301106150525780820190509050610360526101c051610340518082028215828483041417156150525780905090509050610380526103805161036051101561355a576102a051600280820490509050610220526137bd56613575565b61036080516103805180821061505257808203905090508152505b6103605161022051808015615052578204905090506103a052610320516103a051808015615052578204905090506103c05261036051670de0b6b3a76400006101c0518082028215828483041417156150525780905090509050818183011061505257808201905090506103a051808015615052578204905090506103c051670de0b6b3a764000080820282158284830414171561505257809050905090506102c05180801561505257820490509050818183011061505257808201905090506103e0526103c08051670de0b6b3a76400006102e05180820282158284830414171561505257809050905090506103a05180801561505257820490509050818183011061505257808201905090508152506103c0516103e05110156136aa576102a051600280820490509050610220526136c5565b6103e0516103c0518082106150525780820390509050610220525b6000610400526102a0516102205111156136f857610220516102a051808210615052578082039050905061040052613713565b6102a051610220518082106150525780820390509050610400525b6102605161022051655af3107a400080820490509050808210156137375780613739565b815b905090506104005110156137bc5761022051670de0b6b3a764000080820282158284830414171561505257809050905090506101c0518080156150525782049050905061042052662386f26fc0ffff6104205111156137a65768056bc75e2d6310000161042051106137a9565b60005b1561505257505061022051815250613813565b5b81516001018083528114156132a95750506308c379a06102805260206102a05260106102c0527f446964206e6f7420636f6e7665726765000000000000000000000000000000006102e0526102c050606461029cfd5b565b61014051670de0b6b3a764000080820490509050610160526101405161016051670de0b6b3a76400008082028215828483041417156150525780905090509050808210615052578082039050905061018052603b61016051111561387d576000815250613ad3565b670de0b6b3a7640000610100610160511015615052576101605160020a808015615052578204905090506101a052610180516138bf576101a051815250613ad3565b670de0b6b3a76400006101c0526706f05b59d3b200006101e052670de0b6b3a764000061020052600061022052610240600160ff818352015b61024051670de0b6b3a764000080820282158284830414171561505257809050905090506102605261026051670de0b6b3a764000080821061505257808203905090506102805261028051610180511115613975576101805161028051808210615052578082039050905061028052610220511561022052613990565b61028080516101805180821061505257808203905090508152505b6101c051610280516101e0518082028215828483041417156150525780905090509050670de0b6b3a764000080820490509050808202821582848304141715615052578090509050905061026051808015615052578204905090506101c0526102205115613a175761020080516101c0518082106150525780820390509050815250613a34565b61020080516101c051818183011061505257808201905090508152505b6402540be4006101c0511015613a7d5750506101a051610200518082028215828483041417156150525780905090509050670de0b6b3a764000080820490509050815250613ad3565b81516001018083528114156138f85750506308c379a0610240526020610260526010610280527f446964206e6f7420636f6e7665726765000000000000000000000000000000006102a05261028050606461025cfd5b565b601c5464e8d4a5100080820282158284830414171561505257809050905090508152601d54662386f26fc1000080820282158284830414171561505257809050905090506006548082028215828483041417156150525780905090509050670de0b6b3a764000080820490509050816020015250565b600d5461014052600b54610160526fffffffffffffffffffffffffffffffff6101605116610180526101605160801c6101a05261014051421015613cbe57600a546101c052600c546101e05261014080516101e0518082106150525780820390509050815250426101e05180821061505257808203905090506101e052610140516101e0518082106150525780820390509050610200526101c05160801c6102005180820282158284830414171561505257809050905090506101a0516101e05180820282158284830414171561505257809050905090508181830110615052578082019050905061014051808015615052578204905090506101a0526fffffffffffffffffffffffffffffffff6101c05116610200518082028215828483041417156150525780905090509050610180516101e0518082028215828483041417156150525780905090509050818183011061505257808201905090506101405180801561505257820490509050610180525b6101a051815261018051816020015250565b601054610180526101405161016051818183011061505257808201905090506101a05261018051670de0b6b3a7640000808202821582848304141715615052578090509050905061018051670de0b6b3a764000081818301106150525780820190509050673782dace9d9000006101405180820282158284830414171561505257809050905090506101a051808015615052578204905090506101605180820282158284830414171561505257809050905090506101a051808015615052578204905090508082106150525780820390509050808015615052578204905090506101a0526016546101a0518082028215828483041417156150525780905090509050601754670de0b6b3a76400006101a0518082106150525780820390509050808202821582848304141715615052578090509050905081818301106150525780820190509050670de0b6b3a764000080820490509050815250565b6102a0516002808204905090506102c0526102a051670de0b6b3a7640000808202821582848304141715615052578090509050905060065460028082028215828483041417156150525780905090509050808015615052578204905090506102e0526102c051610140526102e05161016052600161018052613eaf6103006127a3565b61030051815250565b613ec3610580613b4b565b61058080516105405280602001516105605250602154610580526022546105a05273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486105c05273db25f211ab05b1c97d595516f45794528a807ad86105e05261060060006002818352015b6370a082316106205230610640526020610620602461063c6105c06106005160028110156150525760200201515afa1561505257601f3d1115615052576106205160016106005160028110156150525702601c01558151600101808352811415613f22575050602354610600526105a05161058051111561412157610580516105a051808210615052578082039050905060185480820282158284830414171561505257809050905090506404a817c800808204905090506106205260006106205111156141205760295461064052600061064051181561411f5761060051670de0b6b3a764000080820282158284830414171561505257809050905090506106005161062051808210615052578082039050905080801561505257820490509050670de0b6b3a7640000808210615052578082039050905061066052636962f8456106a052610640516106c052610660516106e05260206106a060446106bc6000733d229e1b4faab62f621ef2f6a610961f7bd7b23b5af11561505257601f3d1115615052576106a0516106805261058080516106205160028082028215828483041417156150525780905090509050808210615052578082039050905081525061058051602155610640517f6059a38198b1dc42b3791087d1ff0fbd72b3179553c25f678cd246f52ffaaf59610680516106a05260206106a0a25b5b5b6318160ddd610640526020610640600461065c733d229e1b4faab62f621ef2f6a610961f7bd7b23b5afa1561505257601f3d1115615052576106405161062052610540516106c052610560516106e05261417c610660613ad5565b610660805161070052806020015161072052506106c0516102a0526106e0516102c052610700516102e05261072051610300526141ba6106a0612945565b6106a0516106405261064051601e55670de0b6b3a7640000610640516102a0526141e5610660613e2c565b61066051808202821582848304141715615052578090509050905061062051808015615052578204905090506023556105a05161058051111561422a57610580516022555b565b6007546108005260085461082052600654610840526009546108605260006108805242610860511015614340576014546108a05242610860518082106150525780820390509050670de0b6b3a764000080820282158284830414171561505257809050905090506108a05180801561505257820490509050610140526142b36108e0613815565b6108e0516108c05261082051670de0b6b3a76400006108c05180821061505257808203905090508082028215828483041417156150525780905090509050610800516108c051808202821582848304141715615052578090509050905081818301106150525780820190509050670de0b6b3a7640000808204905090506108005261080051600755426009555b6107e0516108a0526107e05161438457610740516102a052610760516102c052610780516102e0526107a0516103005261437b6108c0612945565b6108c0516108a0525b60006107c051111561439d576107c0516108205261445c565b610780516108c0526107a0516108e0526108c051620f424080820490509050610900526108c080516109005181818301106150525780820190509050815250610840516109005180820282158284830414171561505257809050905090506107a051610740516101405261076051610160526108c051610180526108e0516101a0526108a0516101c05260016101e0526144386109206130e8565b61092051808210615052578082039050905080801561505257820490509050610820525b610820516008556318160ddd6108e05260206108e060046108fc733d229e1b4faab62f621ef2f6a610961f7bd7b23b5afa1561505257601f3d1115615052576108e0516108c0526021546108e052602354610900526108a051600280820490509050610920526108a051670de0b6b3a7640000808202821582848304141715615052578090509050905060026108405180820282158284830414171561505257809050905090508080156150525782049050905061094052670de0b6b3a764000061096052670de0b6b3a764000061098052600061090051111561464f576109205161014052610940516101605260016101805261455b6109c06127a3565b6109c0516109a052670de0b6b3a76400006109a05180820282158284830414171561505257809050905090506108c05180801561505257820490509050610980526108e051610980518082028215828483041417156150525780905090509050610900518080156150525782049050905061096052600d546109c052610900516109805110156145ef576109c051156145f2565b60005b1561463c576308c379a06109e0526020610a00526004610a20527f4c6f737300000000000000000000000000000000000000000000000000000000610a4052610a205060646109fcfd5b60016109c051141561464e576000600d555b5b610960516021556024546109a0526109a0516146cf57610960516002600e548082028215828483041417156150525780905090509050818183011061505257808201905090506109805160028082028215828483041417156150525780905090509050670de0b6b3a76400008082106150525780820390509050116146d2565b60005b156146e35760016109a05260016024555b6109a051156149df576012546109c05261080051670de0b6b3a7640000808202821582848304141715615052578090509050905061084051808015615052578204905090506109e052670de0b6b3a76400006109e0511115614763576109e08051670de0b6b3a76400008082106150525780820390509050815250614783565b670de0b6b3a76400006109e05180821061505257808203905090506109e0525b6109c0516109e051111561479d57600061090051116147a0565b60005b156149de57610840516109e0516109c051808210615052578082039050905080820282158284830414171561505257809050905090506109c051610800518082028215828483041417156150525780905090509050818183011061505257808201905090506109e051808015615052578204905090506108805261078051610920526107a051610880518082028215828483041417156150525780905090509050610840518080156150525782049050905061094052610740516102a052610760516102c052610920516102e0526109405161030052614881610a20612945565b610a2051610a0052610a005160028082049050905061092052610a0051670de0b6b3a7640000808202821582848304141715615052578090509050905060026108805180820282158284830414171561505257809050905090508080156150525782049050905061094052670de0b6b3a764000061092051610140526109405161016052600161018052614916610a206127a3565b610a205180820282158284830414171561505257809050905090506108c0518080156150525782049050905061090052670de0b6b3a764000061090051111561499757610960516002610900518082028215828483041417156150525780905090509050670de0b6b3a764000080821061505257808203905090501161499a565b60005b156149bd5761088051600655610a0051601e55610900516023556149ee566149dd565b60006024556108a051601e55610980516023556149d8613eb8565b6149ee565b5b5b6108a051601e55610980516023555b565b61020051610140526102205161016052614a0b610260613cd0565b6102605160028082028215828483041417156150525780905090509050600480820490509050610240526000610260526102a060006002818352015b60206102a051026101c0015161028052610260805161028051818183011061505257808201905090508152508151600101808352811415614a47575050610260516002808204905090506102805260006102a0526102e060006002818352015b60206102e051026101c001516102c052610280516102c0511115614af8576102a080516102c05161028051808210615052578082039050905081818301106150525780820190509050815250614b27565b6102a08051610280516102c0518082106150525780820390509050818183011061505257808201905090508152505b8151600101808352811415614aa7575050610240516102a05180820282158284830414171561505257809050905090506102605180801561505257820490509050620186a081818301106150525780820190509050815250565b6318160ddd610620526020610620600461063c733d229e1b4faab62f621ef2f6a610961f7bd7b23b5afa1561505257601f3d11156150525761062051610600526106005161058051116150525760026105a051101561505257601c5461062052601d5461064052600061066052600654662386f26fc100008082028215828483041417156150525780905090509050610680526106205164e8d4a5100080820282158284830414171561505257809050905090506106a05261064051610680518082028215828483041417156150525780905090509050670de0b6b3a7640000808204905090506106c0526105a051614c87576c0c9f2c9cd04674edea40000000610680525b6105c05115614cc857610540516102a052610560516102c0526106a0516102e0526106c05161030052614cbb6106e0612945565b6106e05161066052614cd0565b601e54610660525b610660516106e0526106a051610140526106c05161016052614cf3610720613cd0565b6107205161070052610580516106e05180820282158284830414171561505257809050905090506106005180801561505257820490509050610720526106e0805161072051610700516107205180820282158284830414171561505257809050905090506404a817c8008082049050905060018181830110615052578082019050905080821061505257808203905090508082106150525780820390509050815250610540516101405261056051610160526106a051610180526106c0516101a0526106e0516101c0526105a0516101e052614dd06107606130e8565b61076051610740526106a06105a0516002811015615052576020020151610740518082106150525780820390509050670de0b6b3a76400008082028215828483041417156150525780905090509050610680518080156150525782049050905061076052610740516106a06105a05160028110156150525760200201526000610780526105e05115614e8057620186a0610760511115614e7857620186a06105805111614e7b565b60005b614e83565b60005b156150235760006107a05264e8d4a510006107c05260016105a0511415614eda576106205164e8d4a5100080820282158284830414171561505257809050905090506107a052662386f26fc100006107c052614f02565b61064051662386f26fc1000080820282158284830414171561505257809050905090506107a0525b6107a05161072051808202821582848304141715615052578090509050905061066051808015615052578204905090506107a0526107a051670de0b6b3a76400008082028215828483041417156150525780905090509050610760516107c0518082028215828483041417156150525780905090509050610720516106206105a051600281101561505257602002015180820282158284830414171561505257809050905090506107c05180820282158284830414171561505257809050905090506106605180801561505257820490509050808210615052578082039050905080801561505257820490509050610780526105a051615022576ec097ce7bc90715b34b9f10000000006107805180801561505257820490509050610780525b5b6107605181526107805160208201526106e0516040820152606081016106a05181526106c05181602001525050565b600080fd5b61015b6151b20361015b60003961015b6151b2036000f35b600080fd000000000000000000000000babe61887f1de2713c6f97e567623453d3c79f67000000000000000000000000ecb456ea5365865ebab8a2661b0c503410e9b347000000000000000000000000000000000000000000000000000000000bebc20000000000000000000000000000000000000000000000000000005af3107a400000000000000000000000000000000000000000000000000000000000004c4b400000000000000000000000000000000000000000000000000000000002aea54000000000000000000000000000000000000000000000000000000002540be4000000000000000000000000000000000000000000000000000011c37937e0800000000000000000000000000000000000000000000000000000000500918bd800000000000000000000000000000000000000000000000000000000012a05f2000000000000000000000000000000000000000000000000000000000000000258000000000000000000000000000000000000000000000000101925daa3740000
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000babe61887f1de2713c6f97e567623453d3c79f67000000000000000000000000ecb456ea5365865ebab8a2661b0c503410e9b347000000000000000000000000000000000000000000000000000000000bebc20000000000000000000000000000000000000000000000000000005af3107a400000000000000000000000000000000000000000000000000000000000004c4b400000000000000000000000000000000000000000000000000000000002aea54000000000000000000000000000000000000000000000000000000002540be4000000000000000000000000000000000000000000000000000011c37937e0800000000000000000000000000000000000000000000000000000000500918bd800000000000000000000000000000000000000000000000000000000012a05f2000000000000000000000000000000000000000000000000000000000000000258000000000000000000000000000000000000000000000000101925daa3740000
-----Decoded View---------------
Arg [0] : owner (address): 0xbabe61887f1de2713c6f97e567623453d3C79f67
Arg [1] : admin_fee_receiver (address): 0xeCb456EA5365865EbAb8a2661B0c503410e9B347
Arg [2] : A (uint256): 200000000
Arg [3] : gamma (uint256): 100000000000000
Arg [4] : mid_fee (uint256): 5000000
Arg [5] : out_fee (uint256): 45000000
Arg [6] : allowed_extra_profit (uint256): 10000000000
Arg [7] : fee_gamma (uint256): 5000000000000000
Arg [8] : adjustment_step (uint256): 5500000000000
Arg [9] : admin_fee (uint256): 5000000000
Arg [10] : ma_half_time (uint256): 600
Arg [11] : initial_price (uint256): 1160000000000000000
-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 000000000000000000000000babe61887f1de2713c6f97e567623453d3c79f67
Arg [1] : 000000000000000000000000ecb456ea5365865ebab8a2661b0c503410e9b347
Arg [2] : 000000000000000000000000000000000000000000000000000000000bebc200
Arg [3] : 00000000000000000000000000000000000000000000000000005af3107a4000
Arg [4] : 00000000000000000000000000000000000000000000000000000000004c4b40
Arg [5] : 0000000000000000000000000000000000000000000000000000000002aea540
Arg [6] : 00000000000000000000000000000000000000000000000000000002540be400
Arg [7] : 0000000000000000000000000000000000000000000000000011c37937e08000
Arg [8] : 00000000000000000000000000000000000000000000000000000500918bd800
Arg [9] : 000000000000000000000000000000000000000000000000000000012a05f200
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000258
Arg [11] : 000000000000000000000000000000000000000000000000101925daa3740000
Loading...
Loading
Loading...
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.