Source Code
Latest 25 from a total of 7,071 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Remove_liquidity | 420638781 | 13 days ago | IN | 0 ETH | 0.00000175 | ||||
| Remove_liquidity | 418552274 | 19 days ago | IN | 0 ETH | 0.00000146 | ||||
| Remove_liquidity | 415614086 | 28 days ago | IN | 0 ETH | 0.00000099 | ||||
| Remove_liquidity | 411839019 | 38 days ago | IN | 0 ETH | 0.00000102 | ||||
| Remove_liquidity | 409776801 | 44 days ago | IN | 0 ETH | 0.00000085 | ||||
| Remove_liquidity... | 407979230 | 50 days ago | IN | 0 ETH | 0.00000101 | ||||
| Remove_liquidity... | 407166890 | 52 days ago | IN | 0 ETH | 0.00000699 | ||||
| Remove_liquidity... | 406952096 | 53 days ago | IN | 0 ETH | 0.0000037 | ||||
| Remove_liquidity | 402048622 | 67 days ago | IN | 0 ETH | 0.00000284 | ||||
| Add_liquidity | 401795256 | 67 days ago | IN | 0.0752 ETH | 0.00000141 | ||||
| Remove_liquidity... | 400564870 | 71 days ago | IN | 0 ETH | 0.00000102 | ||||
| Add_liquidity | 396944927 | 81 days ago | IN | 0.15 ETH | 0.00000122 | ||||
| Exchange | 393522463 | 91 days ago | IN | 0.002 ETH | 0.00000099 | ||||
| Exchange | 393515840 | 91 days ago | IN | 0.002 ETH | 0.00000099 | ||||
| Exchange | 393515610 | 91 days ago | IN | 0.002 ETH | 0.00000099 | ||||
| Exchange | 393515156 | 91 days ago | IN | 0.008 ETH | 0.00000099 | ||||
| Exchange | 393507007 | 91 days ago | IN | 0.005 ETH | 0.00000139 | ||||
| Exchange | 393503294 | 91 days ago | IN | 0.001 ETH | 0.00000099 | ||||
| Exchange | 393502215 | 91 days ago | IN | 0.005 ETH | 0.00000098 | ||||
| Exchange | 393501686 | 91 days ago | IN | 0.001 ETH | 0.00000099 | ||||
| Exchange | 393500969 | 91 days ago | IN | 0.001 ETH | 0.00000099 | ||||
| Exchange | 393492130 | 91 days ago | IN | 0.001 ETH | 0.00000099 | ||||
| Exchange | 392874668 | 93 days ago | IN | 0.01 ETH | 0.00000099 | ||||
| Exchange | 392857301 | 93 days ago | IN | 0.015 ETH | 0.00000119 | ||||
| Remove_liquidity... | 385809899 | 114 days ago | IN | 0 ETH | 0.00000102 |
Latest 25 internal transactions (View All)
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 424250160 | 3 days ago | 0.00337261 ETH | ||||
| 424178883 | 3 days ago | 0.11640154 ETH | ||||
| 423755000 | 4 days ago | 0.00790196 ETH | ||||
| 423670960 | 4 days ago | 0.00064701 ETH | ||||
| 423670958 | 4 days ago | 0.00066174 ETH | ||||
| 423664968 | 4 days ago | 0.00286001 ETH | ||||
| 423662511 | 4 days ago | 0.00042367 ETH | ||||
| 423662384 | 4 days ago | 0.0005287 ETH | ||||
| 423660269 | 4 days ago | 0.00021954 ETH | ||||
| 423660060 | 4 days ago | 0.00109974 ETH | ||||
| 423655781 | 4 days ago | 0.00083452 ETH | ||||
| 423655741 | 4 days ago | 0.00100328 ETH | ||||
| 423655128 | 4 days ago | 0.00059444 ETH | ||||
| 423642547 | 4 days ago | 0.00166505 ETH | ||||
| 423639981 | 4 days ago | 0.00158061 ETH | ||||
| 423638562 | 4 days ago | 0.0001261 ETH | ||||
| 423637369 | 4 days ago | 0.00033742 ETH | ||||
| 423636119 | 4 days ago | 0.00023966 ETH | ||||
| 423573080 | 5 days ago | 0.00000333 ETH | ||||
| 423560516 | 5 days ago | 0.00024735 ETH | ||||
| 423558930 | 5 days ago | 0.00077547 ETH | ||||
| 423520562 | 5 days ago | 0.0005997 ETH | ||||
| 423520447 | 5 days ago | 0.00074131 ETH | ||||
| 423520424 | 5 days ago | 0.00171099 ETH | ||||
| 423517936 | 5 days ago | 0.00115159 ETH |
Cross-Chain Transactions
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Vyper_contract
Compiler Version
vyper:0.3.1
Contract Source Code (Vyper language format)
# @version 0.3.1
"""
@title ETH/wstETH StableSwap
@author Curve.Fi
@license Copyright (c) Curve.Fi, 2021-2022 - all rights reserved
"""
from vyper.interfaces import ERC20
# External Contracts
interface Oracle:
def latestAnswer() -> int256: view
interface CurveToken:
def mint(_to: address, _value: uint256) -> bool: nonpayable
def burnFrom(_to: address, _value: uint256) -> bool: nonpayable
# Events
event TokenExchange:
buyer: indexed(address)
sold_id: int128
tokens_sold: uint256
bought_id: int128
tokens_bought: uint256
event AddLiquidity:
provider: indexed(address)
token_amounts: uint256[N_COINS]
fees: uint256[N_COINS]
invariant: uint256
token_supply: uint256
event RemoveLiquidity:
provider: indexed(address)
token_amounts: uint256[N_COINS]
fees: uint256[N_COINS]
token_supply: uint256
event RemoveLiquidityOne:
provider: indexed(address)
token_amount: uint256
coin_amount: uint256
event RemoveLiquidityImbalance:
provider: indexed(address)
token_amounts: uint256[N_COINS]
fees: uint256[N_COINS]
invariant: uint256
token_supply: uint256
event CommitNewAdmin:
deadline: indexed(uint256)
admin: indexed(address)
event NewAdmin:
admin: indexed(address)
event CommitNewFee:
deadline: indexed(uint256)
fee: uint256
admin_fee: uint256
event NewFee:
fee: uint256
admin_fee: uint256
event RampA:
old_A: uint256
new_A: uint256
initial_time: uint256
future_time: uint256
event StopRampA:
A: uint256
t: uint256
# These constants must be set prior to compiling
N_COINS: constant(int128) = 2
ORACLE: immutable(address)
# fixed constants
FEE_DENOMINATOR: constant(uint256) = 10 ** 10
LENDING_PRECISION: constant(uint256) = 10 ** 18
PRECISION: constant(uint256) = 10 ** 18 # The precision to convert to
MAX_ADMIN_FEE: constant(uint256) = 10 * 10 ** 9
MAX_FEE: constant(uint256) = 5 * 10 ** 9
MAX_A: constant(uint256) = 10 ** 6
MAX_A_CHANGE: constant(uint256) = 10
ADMIN_ACTIONS_DELAY: constant(uint256) = 3 * 86400
MIN_RAMP_TIME: constant(uint256) = 86400
coins: public(address[N_COINS])
balances: public(uint256[N_COINS])
fee: public(uint256) # fee * 1e10
admin_fee: public(uint256) # admin_fee * 1e10
owner: public(address)
lp_token: public(address)
A_PRECISION: constant(uint256) = 100
initial_A: public(uint256)
future_A: public(uint256)
initial_A_time: public(uint256)
future_A_time: public(uint256)
admin_actions_deadline: public(uint256)
transfer_ownership_deadline: public(uint256)
future_fee: public(uint256)
future_admin_fee: public(uint256)
future_owner: public(address)
is_killed: bool
kill_deadline: uint256
KILL_DEADLINE_DT: constant(uint256) = 2 * 30 * 86400
@external
def __init__(
_owner: address,
_coins: address[N_COINS],
_pool_token: address,
_A: uint256,
_fee: uint256,
_admin_fee: uint256,
_oracle: address,
):
"""
@notice Contract constructor
@param _owner Contract owner address
@param _coins Addresses of ERC20 contracts of wrapped coins
@param _pool_token Address of the token representing LP share
@param _A Amplification coefficient multiplied by n * (n - 1)
@param _fee Fee to charge for exchanges
@param _admin_fee Admin fee
"""
assert _coins[0] == 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
assert _coins[1] != ZERO_ADDRESS
self.coins = _coins
self.initial_A = _A * A_PRECISION
self.future_A = _A * A_PRECISION
self.fee = _fee
self.admin_fee = _admin_fee
self.owner = _owner
self.kill_deadline = block.timestamp + KILL_DEADLINE_DT
self.lp_token = _pool_token
ORACLE = _oracle
@view
@internal
def _A() -> uint256:
"""
Handle ramping A up or down
"""
t1: uint256 = self.future_A_time
A1: uint256 = self.future_A
if block.timestamp < t1:
A0: uint256 = self.initial_A
t0: uint256 = self.initial_A_time
# Expressions in uint256 cannot have negative numbers, thus "if"
if A1 > A0:
return A0 + (A1 - A0) * (block.timestamp - t0) / (t1 - t0)
else:
return A0 - (A0 - A1) * (block.timestamp - t0) / (t1 - t0)
else: # when t1 == 0 or block.timestamp >= t1
return A1
@view
@external
def A() -> uint256:
return self._A() / A_PRECISION
@view
@external
def A_precise() -> uint256:
return self._A()
@view
@internal
def _stored_rates() -> uint256[N_COINS]:
return [
convert(PRECISION, uint256),
convert(Oracle(ORACLE).latestAnswer(), uint256)
]
@view
@internal
def _xp(rates: uint256[N_COINS]) -> uint256[N_COINS]:
result: uint256[N_COINS] = rates
for i in range(N_COINS):
result[i] = result[i] * self.balances[i] / PRECISION
return result
@internal
@pure
def get_D(xp: uint256[N_COINS], amp: uint256) -> uint256:
S: uint256 = 0
Dprev: uint256 = 0
for _x in xp:
S += _x
if S == 0:
return 0
D: uint256 = S
Ann: uint256 = amp * N_COINS
for _i in range(255):
D_P: uint256 = D
for _x in xp:
D_P = D_P * D / (_x * N_COINS) # If division by 0, this will be borked: only withdrawal will work. And that is good
Dprev = D
D = (Ann * S / A_PRECISION + D_P * N_COINS) * D / ((Ann - A_PRECISION) * D / A_PRECISION + (N_COINS + 1) * D_P)
# Equality with the precision of 1
if D > Dprev:
if D - Dprev <= 1:
return D
else:
if Dprev - D <= 1:
return D
# convergence typically occurs in 4 rounds or less, this should be unreachable!
# if it does happen the pool is borked and LPs can withdraw via `remove_liquidity`
raise
@view
@internal
def get_D_mem(rates: uint256[N_COINS], _balances: uint256[N_COINS], amp: uint256) -> uint256:
result: uint256[N_COINS] = rates
for i in range(N_COINS):
result[i] = result[i] * _balances[i] / PRECISION
return self.get_D(result, amp)
@view
@external
def get_virtual_price() -> uint256:
"""
@notice The current virtual price of the pool LP token
@dev Useful for calculating profits
@return LP token virtual price normalized to 1e18
"""
D: uint256 = self.get_D(self._xp(self._stored_rates()), self._A())
# D is in the units similar to DAI (e.g. converted to precision 1e18)
# When balanced, D = n * x_u - total virtual value of the portfolio
token_supply: uint256 = ERC20(self.lp_token).totalSupply()
return D * PRECISION / token_supply
@view
@external
def calc_token_amount(amounts: uint256[N_COINS], is_deposit: bool) -> uint256:
"""
@notice Calculate addition or reduction in token supply from a deposit or withdrawal
@dev This calculation accounts for slippage, but not fees.
Needed to prevent front-running, not for precise calculations!
@param amounts Amount of each coin being deposited
@param is_deposit set True for deposits, False for withdrawals
@return Expected amount of LP tokens received
"""
amp: uint256 = self._A()
rates: uint256[N_COINS] = self._stored_rates()
_balances: uint256[N_COINS] = self.balances
D0: uint256 = self.get_D_mem(rates, _balances, amp)
for i in range(N_COINS):
_amount: uint256 = amounts[i]
if is_deposit:
_balances[i] += _amount
else:
_balances[i] -= _amount
D1: uint256 = self.get_D_mem(rates, _balances, amp)
token_amount: uint256 = ERC20(self.lp_token).totalSupply()
diff: uint256 = 0
if is_deposit:
diff = D1 - D0
else:
diff = D0 - D1
return diff * token_amount / D0
@payable
@external
@nonreentrant('lock')
def add_liquidity(amounts: uint256[N_COINS], min_mint_amount: uint256) -> uint256:
"""
@notice Deposit coins into the pool
@param amounts List of amounts of coins to deposit
@param min_mint_amount Minimum amount of LP tokens to mint from the deposit
@return Amount of LP tokens received by depositing
"""
assert not self.is_killed
amp: uint256 = self._A()
rates: uint256[N_COINS] = self._stored_rates()
_lp_token: address = self.lp_token
token_supply: uint256 = ERC20(_lp_token).totalSupply()
# Initial invariant
D0: uint256 = 0
old_balances: uint256[N_COINS] = self.balances
if token_supply != 0:
D0 = self.get_D_mem(rates, old_balances, amp)
new_balances: uint256[N_COINS] = old_balances
for i in range(N_COINS):
if token_supply == 0:
assert amounts[i] > 0
new_balances[i] += amounts[i]
# Invariant after change
D1: uint256 = self.get_D_mem(rates, new_balances, amp)
assert D1 > D0
# We need to recalculate the invariant accounting for fees
# to calculate fair user's share
D2: uint256 = D1
fees: uint256[N_COINS] = empty(uint256[N_COINS])
mint_amount: uint256 = 0
if token_supply != 0:
# Only account for fees if we are not the first to deposit
_fee: uint256 = self.fee * N_COINS / (4 * (N_COINS - 1))
_admin_fee: uint256 = self.admin_fee
for i in range(N_COINS):
ideal_balance: uint256 = D1 * old_balances[i] / D0
difference: uint256 = 0
if ideal_balance > new_balances[i]:
difference = ideal_balance - new_balances[i]
else:
difference = new_balances[i] - ideal_balance
fees[i] = _fee * difference / FEE_DENOMINATOR
self.balances[i] = new_balances[i] - (fees[i] * _admin_fee / FEE_DENOMINATOR)
new_balances[i] -= fees[i]
D2 = self.get_D_mem(rates, new_balances, amp)
mint_amount = token_supply * (D2 - D0) / D0
else:
self.balances = new_balances
mint_amount = D1 # Take the dust if there was any
assert mint_amount >= min_mint_amount, "Slippage screwed you"
# Take coins from the sender
assert msg.value == amounts[0]
if amounts[1] > 0:
assert ERC20(self.coins[1]).transferFrom(msg.sender, self, amounts[1])
# Mint pool tokens
CurveToken(_lp_token).mint(msg.sender, mint_amount)
log AddLiquidity(msg.sender, amounts, fees, D1, token_supply + mint_amount)
return mint_amount
@view
@internal
def get_y(i: int128, j: int128, x: uint256, xp_: uint256[N_COINS]) -> uint256:
# x in the input is converted to the same price/precision
assert i != j # dev: same coin
assert j >= 0 # dev: j below zero
assert j < N_COINS # dev: j above N_COINS
# should be unreachable, but good for safety
assert i >= 0
assert i < N_COINS
A_: uint256 = self._A()
D: uint256 = self.get_D(xp_, A_)
Ann: uint256 = A_ * N_COINS
c: uint256 = D
S_: uint256 = 0
_x: uint256 = 0
y_prev: uint256 = 0
for _i in range(N_COINS):
if _i == i:
_x = x
elif _i != j:
_x = xp_[_i]
else:
continue
S_ += _x
c = c * D / (_x * N_COINS)
c = c * D * A_PRECISION / (Ann * N_COINS)
b: uint256 = S_ + D * A_PRECISION / Ann # - D
y: uint256 = D
for _i in range(255):
y_prev = y
y = (y*y + c) / (2 * y + b - D)
# Equality with the precision of 1
if y > y_prev:
if y - y_prev <= 1:
return y
else:
if y_prev - y <= 1:
return y
raise
@view
@external
def get_dy(i: int128, j: int128, dx: uint256) -> uint256:
# dx and dy in c-units
rates: uint256[N_COINS] = self._stored_rates()
xp: uint256[N_COINS] = self._xp(rates)
x: uint256 = xp[i] + dx * rates[i] / PRECISION
y: uint256 = self.get_y(i, j, x, xp)
dy: uint256 = xp[j] - y
_fee: uint256 = self.fee * dy / FEE_DENOMINATOR
return (dy - _fee) * PRECISION / rates[j]
@view
@external
def get_dx(i: int128, j: int128, dy: uint256) -> uint256:
# dx and dy in c-units
rates: uint256[N_COINS] = self._stored_rates()
xp: uint256[N_COINS] = self._xp(rates)
y: uint256 = xp[j] - (dy * FEE_DENOMINATOR / (FEE_DENOMINATOR - self.fee)) * rates[j] / PRECISION
x: uint256 = self.get_y(j, i, y, xp)
dx: uint256 = (x - xp[i]) * PRECISION / rates[i]
return dx
@payable
@external
@nonreentrant('lock')
def exchange(i: int128, j: int128, dx: uint256, min_dy: uint256) -> uint256:
"""
@notice Perform an exchange between two coins
@dev Index values can be found via the `coins` public getter method
@param i Index value for the coin to send
@param j Index valie of the coin to recieve
@param dx Amount of `i` being exchanged
@param min_dy Minimum amount of `j` to receive
@return Actual amount of `j` received
"""
assert not self.is_killed # dev: is killed
rates: uint256[N_COINS] = self._stored_rates()
xp: uint256[N_COINS] = self._xp(rates)
x: uint256 = xp[i] + dx * rates[i] / PRECISION
y: uint256 = self.get_y(i, j, x, xp)
dy: uint256 = xp[j] - y - 1 # -1 just in case there were some rounding errors
dy_fee: uint256 = dy * self.fee / FEE_DENOMINATOR
dy_admin_fee: uint256 = dy_fee * self.admin_fee / FEE_DENOMINATOR
self.balances[i] = x * PRECISION / rates[i]
self.balances[j] = (y + (dy_fee - dy_admin_fee)) * PRECISION / rates[j]
dy = (dy - dy_fee) * PRECISION / rates[j]
assert dy >= min_dy, "Exchange resulted in fewer coins than expected"
coin: address = self.coins[1]
if i == 0:
assert msg.value == dx
assert ERC20(coin).transfer(msg.sender, dy)
else:
assert msg.value == 0
assert ERC20(coin).transferFrom(msg.sender, self, dx)
raw_call(msg.sender, b"", value=dy)
log TokenExchange(msg.sender, i, dx, j, dy)
return dy
@external
@nonreentrant('lock')
def remove_liquidity(_amount: uint256, min_amounts: uint256[N_COINS]) -> uint256[N_COINS]:
"""
@notice Withdraw coins from the pool
@dev Withdrawal amounts are based on current deposit ratios
@param _amount Quantity of LP tokens to burn in the withdrawal
@param min_amounts Minimum amounts of underlying coins to receive
@return List of amounts of coins that were withdrawn
"""
_lp_token: address = self.lp_token
total_supply: uint256 = ERC20(_lp_token).totalSupply()
amounts: uint256[N_COINS] = empty(uint256[N_COINS])
for i in range(N_COINS):
_balance: uint256 = self.balances[i]
value: uint256 = _balance * _amount / total_supply
assert value >= min_amounts[i], "Withdrawal resulted in fewer coins than expected"
self.balances[i] = _balance - value
amounts[i] = value
if i == 0:
raw_call(msg.sender, b"", value=value)
else:
assert ERC20(self.coins[1]).transfer(msg.sender, value)
CurveToken(_lp_token).burnFrom(msg.sender, _amount) # Will raise if not enough
log RemoveLiquidity(msg.sender, amounts, empty(uint256[N_COINS]), total_supply - _amount)
return amounts
@external
@nonreentrant('lock')
def remove_liquidity_imbalance(amounts: uint256[N_COINS], max_burn_amount: uint256) -> uint256:
"""
@notice Withdraw coins from the pool in an imbalanced amount
@param amounts List of amounts of underlying coins to withdraw
@param max_burn_amount Maximum amount of LP token to burn in the withdrawal
@return Actual amount of the LP token burned in the withdrawal
"""
assert not self.is_killed
amp: uint256 = self._A()
rates: uint256[N_COINS] = self._stored_rates()
old_balances: uint256[N_COINS] = self.balances
D0: uint256 = self.get_D_mem(rates, old_balances, amp)
new_balances: uint256[N_COINS] = old_balances
for i in range(N_COINS):
new_balances[i] -= amounts[i]
D1: uint256 = self.get_D_mem(rates, new_balances, amp)
fees: uint256[N_COINS] = empty(uint256[N_COINS])
_fee: uint256 = self.fee * N_COINS / (4 * (N_COINS - 1))
_admin_fee: uint256 = self.admin_fee
for i in range(N_COINS):
ideal_balance: uint256 = D1 * old_balances[i] / D0
new_balance: uint256 = new_balances[i]
difference: uint256 = 0
if ideal_balance > new_balance:
difference = ideal_balance - new_balance
else:
difference = new_balance - ideal_balance
fees[i] = _fee * difference / FEE_DENOMINATOR
self.balances[i] = new_balance - (fees[i] * _admin_fee / FEE_DENOMINATOR)
new_balances[i] = new_balance - fees[i]
D2: uint256 = self.get_D_mem(rates, new_balances, amp)
lp_token: address = self.lp_token
token_supply: uint256 = ERC20(lp_token).totalSupply()
token_amount: uint256 = (D0 - D2) * token_supply / D0
assert token_amount != 0
assert token_amount <= max_burn_amount, "Slippage screwed you"
CurveToken(lp_token).burnFrom(msg.sender, token_amount) # dev: insufficient funds
if amounts[0] != 0:
raw_call(msg.sender, b"", value=amounts[0])
if amounts[1] != 0:
assert ERC20(self.coins[1]).transfer(msg.sender, amounts[1])
log RemoveLiquidityImbalance(msg.sender, amounts, fees, D1, token_supply - token_amount)
return token_amount
@pure
@internal
def get_y_D(A_: uint256, i: int128, xp: uint256[N_COINS], D: uint256) -> uint256:
"""
Calculate x[i] if one reduces D from being calculated for xp to D
Done by solving quadratic equation iteratively.
x_1**2 + x_1 * (sum' - (A*n**n - 1) * D / (A * n**n)) = D ** (n + 1) / (n ** (2 * n) * prod' * A)
x_1**2 + b*x_1 = c
x_1 = (x_1**2 + c) / (2*x_1 + b)
"""
# x in the input is converted to the same price/precision
assert i >= 0 # dev: i below zero
assert i < N_COINS # dev: i above N_COINS
Ann: uint256 = A_ * N_COINS
c: uint256 = D
S_: uint256 = 0
_x: uint256 = 0
y_prev: uint256 = 0
for _i in range(N_COINS):
if _i != i:
_x = xp[_i]
else:
continue
S_ += _x
c = c * D / (_x * N_COINS)
c = c * D * A_PRECISION / (Ann * N_COINS)
b: uint256 = S_ + D * A_PRECISION / Ann
y: uint256 = D
for _i in range(255):
y_prev = y
y = (y*y + c) / (2 * y + b - D)
# Equality with the precision of 1
if y > y_prev:
if y - y_prev <= 1:
return y
else:
if y_prev - y <= 1:
return y
raise
@view
@internal
def _calc_withdraw_one_coin(_token_amount: uint256, i: int128) -> (uint256, uint256):
# First, need to calculate
# * Get current D
# * Solve Eqn against y_i for D - _token_amount
amp: uint256 = self._A()
rates: uint256[N_COINS] = self._stored_rates()
xp: uint256[N_COINS] = self._xp(rates)
D0: uint256 = self.get_D(xp, amp)
total_supply: uint256 = ERC20(self.lp_token).totalSupply()
D1: uint256 = D0 - _token_amount * D0 / total_supply
new_y: uint256 = self.get_y_D(amp, i, xp, D1)
xp_reduced: uint256[N_COINS] = xp
_fee: uint256 = self.fee * N_COINS / (4 * (N_COINS - 1))
for j in range(N_COINS):
dx_expected: uint256 = 0
xp_j: uint256 = xp[j]
if j == i:
dx_expected = xp_j * D1 / D0 - new_y
else:
dx_expected = xp_j - xp_j * D1 / D0
xp_reduced[j] -= _fee * dx_expected / FEE_DENOMINATOR
dy: uint256 = xp_reduced[i] - self.get_y_D(amp, i, xp_reduced, D1)
rate: uint256 = rates[i]
dy = (dy - 1) * PRECISION / rate # Withdraw less to account for rounding errors
dy_0: uint256 = (xp[i] - new_y) * PRECISION / rate # w/o fees
return dy, dy_0 - dy
@view
@external
def calc_withdraw_one_coin(_token_amount: uint256, i: int128) -> uint256:
"""
@notice Calculate the amount received when withdrawing a single coin
@param _token_amount Amount of LP tokens to burn in the withdrawal
@param i Index value of the coin to withdraw
@return Amount of coin received
"""
return self._calc_withdraw_one_coin(_token_amount, i)[0]
@external
@nonreentrant('lock')
def remove_liquidity_one_coin(_token_amount: uint256, i: int128, _min_amount: uint256) -> uint256:
"""
@notice Withdraw a single coin from the pool
@param _token_amount Amount of LP tokens to burn in the withdrawal
@param i Index value of the coin to withdraw
@param _min_amount Minimum amount of coin to receive
@return Amount of coin received
"""
assert not self.is_killed # dev: is killed
dy: uint256 = 0
dy_fee: uint256 = 0
dy, dy_fee = self._calc_withdraw_one_coin(_token_amount, i)
assert dy >= _min_amount, "Not enough coins removed"
self.balances[i] -= (dy + dy_fee * self.admin_fee / FEE_DENOMINATOR)
CurveToken(self.lp_token).burnFrom(msg.sender, _token_amount) # dev: insufficient funds
if i == 0:
raw_call(msg.sender, b"", value=dy)
else:
assert ERC20(self.coins[1]).transfer(msg.sender, dy)
log RemoveLiquidityOne(msg.sender, _token_amount, dy)
return dy
### Admin functions ###
@external
def ramp_A(_future_A: uint256, _future_time: uint256):
assert msg.sender == self.owner # dev: only owner
assert block.timestamp >= self.initial_A_time + MIN_RAMP_TIME
assert _future_time >= block.timestamp + MIN_RAMP_TIME # dev: insufficient time
_initial_A: uint256 = self._A()
_future_A_p: uint256 = _future_A * A_PRECISION
assert _future_A > 0 and _future_A < MAX_A
if _future_A_p < _initial_A:
assert _future_A_p * MAX_A_CHANGE >= _initial_A
else:
assert _future_A_p <= _initial_A * MAX_A_CHANGE
self.initial_A = _initial_A
self.future_A = _future_A_p
self.initial_A_time = block.timestamp
self.future_A_time = _future_time
log RampA(_initial_A, _future_A_p, block.timestamp, _future_time)
@external
def stop_ramp_A():
assert msg.sender == self.owner # dev: only owner
current_A: uint256 = self._A()
self.initial_A = current_A
self.future_A = current_A
self.initial_A_time = block.timestamp
self.future_A_time = block.timestamp
# now (block.timestamp < t1) is always False, so we return saved A
log StopRampA(current_A, block.timestamp)
@external
def commit_new_fee(new_fee: uint256, new_admin_fee: uint256):
assert msg.sender == self.owner # dev: only owner
assert self.admin_actions_deadline == 0 # dev: active action
assert new_fee <= MAX_FEE # dev: fee exceeds maximum
assert new_admin_fee <= MAX_ADMIN_FEE # dev: admin fee exceeds maximum
_deadline: uint256 = block.timestamp + ADMIN_ACTIONS_DELAY
self.admin_actions_deadline = _deadline
self.future_fee = new_fee
self.future_admin_fee = new_admin_fee
log CommitNewFee(_deadline, new_fee, new_admin_fee)
@external
@nonreentrant('lock')
def apply_new_fee():
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
_fee: uint256 = self.future_fee
_admin_fee: uint256 = self.future_admin_fee
self.fee = _fee
self.admin_fee = _admin_fee
log NewFee(_fee, _admin_fee)
@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
@nonreentrant('lock')
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
@view
@external
def admin_balances(i: uint256) -> uint256:
if i == 0:
return self.balance - self.balances[0]
return ERC20(self.coins[i]).balanceOf(self) - self.balances[i]
@external
@nonreentrant('lock')
def withdraw_admin_fees():
assert msg.sender == self.owner # dev: only owner
amount: uint256 = self.balance - self.balances[0]
if amount != 0:
raw_call(msg.sender, b"", value=amount)
amount = ERC20(self.coins[1]).balanceOf(self) - self.balances[1]
if amount != 0:
assert ERC20(self.coins[1]).transfer(msg.sender, amount)
@external
@nonreentrant('lock')
def donate_admin_fees():
assert msg.sender == self.owner # dev: only owner
for i in range(N_COINS):
if i == 0:
self.balances[0] = self.balance
else:
self.balances[i] = ERC20(self.coins[i]).balanceOf(self)
@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
@view
@external
def oracle() -> address:
return ORACLEContract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"name":"TokenExchange","inputs":[{"name":"buyer","type":"address","indexed":true},{"name":"sold_id","type":"int128","indexed":false},{"name":"tokens_sold","type":"uint256","indexed":false},{"name":"bought_id","type":"int128","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":"fees","type":"uint256[2]","indexed":false},{"name":"invariant","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":"fees","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_amount","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"RemoveLiquidityImbalance","inputs":[{"name":"provider","type":"address","indexed":true},{"name":"token_amounts","type":"uint256[2]","indexed":false},{"name":"fees","type":"uint256[2]","indexed":false},{"name":"invariant","type":"uint256","indexed":false},{"name":"token_supply","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":"CommitNewFee","inputs":[{"name":"deadline","type":"uint256","indexed":true},{"name":"fee","type":"uint256","indexed":false},{"name":"admin_fee","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"NewFee","inputs":[{"name":"fee","type":"uint256","indexed":false},{"name":"admin_fee","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"RampA","inputs":[{"name":"old_A","type":"uint256","indexed":false},{"name":"new_A","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":"A","type":"uint256","indexed":false},{"name":"t","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"_owner","type":"address"},{"name":"_coins","type":"address[2]"},{"name":"_pool_token","type":"address"},{"name":"_A","type":"uint256"},{"name":"_fee","type":"uint256"},{"name":"_admin_fee","type":"uint256"},{"name":"_oracle","type":"address"}],"outputs":[]},{"stateMutability":"view","type":"function","name":"A","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"A_precise","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"get_virtual_price","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"calc_token_amount","inputs":[{"name":"amounts","type":"uint256[2]"},{"name":"is_deposit","type":"bool"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"payable","type":"function","name":"add_liquidity","inputs":[{"name":"amounts","type":"uint256[2]"},{"name":"min_mint_amount","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"get_dy","inputs":[{"name":"i","type":"int128"},{"name":"j","type":"int128"},{"name":"dx","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"get_dx","inputs":[{"name":"i","type":"int128"},{"name":"j","type":"int128"},{"name":"dy","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"payable","type":"function","name":"exchange","inputs":[{"name":"i","type":"int128"},{"name":"j","type":"int128"},{"name":"dx","type":"uint256"},{"name":"min_dy","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"remove_liquidity","inputs":[{"name":"_amount","type":"uint256"},{"name":"min_amounts","type":"uint256[2]"}],"outputs":[{"name":"","type":"uint256[2]"}]},{"stateMutability":"nonpayable","type":"function","name":"remove_liquidity_imbalance","inputs":[{"name":"amounts","type":"uint256[2]"},{"name":"max_burn_amount","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"calc_withdraw_one_coin","inputs":[{"name":"_token_amount","type":"uint256"},{"name":"i","type":"int128"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"remove_liquidity_one_coin","inputs":[{"name":"_token_amount","type":"uint256"},{"name":"i","type":"int128"},{"name":"_min_amount","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"ramp_A","inputs":[{"name":"_future_A","type":"uint256"},{"name":"_future_time","type":"uint256"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"stop_ramp_A","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"commit_new_fee","inputs":[{"name":"new_fee","type":"uint256"},{"name":"new_admin_fee","type":"uint256"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"apply_new_fee","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"revert_new_parameters","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"commit_transfer_ownership","inputs":[{"name":"_owner","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"apply_transfer_ownership","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"revert_transfer_ownership","inputs":[],"outputs":[]},{"stateMutability":"view","type":"function","name":"admin_balances","inputs":[{"name":"i","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"withdraw_admin_fees","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"donate_admin_fees","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"kill_me","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"unkill_me","inputs":[],"outputs":[]},{"stateMutability":"view","type":"function","name":"oracle","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"coins","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"balances","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"fee","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"admin_fee","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"lp_token","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"initial_A","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"future_A","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"initial_A_time","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"future_A_time","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"admin_actions_deadline","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"transfer_ownership_deadline","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"future_fee","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"future_admin_fee","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"future_owner","inputs":[],"outputs":[{"name":"","type":"address"}]}]Contract Creation Code
60206136276080396080518060a01c6136225760e0526020613627016020816080396080518060a01c61362257610100526020602082016080396080518060a01c61362257610120525060206060613627016080396080518060a01c6136225761014052602060e0613627016080396080518060a01c613622576101605273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee61010051186136225760006101205114613622576101005160015561012051600255602060806136270160803960805160648082028215828483041417156136225790509050600955602060806136270160803960805160648082028215828483041417156136225790509050600a55602060a061362701608039608051600555602060c06136270160803960805160065560e05160075542624f1a00818183011061362257808201905090506013556101405160085561016051610180526135fa56600436101561000d57612591565b60046000601c37600051630b4c7e4d811861061a5760005461349f57600160005560125461349f57610040610360612597565b61036051610340526100536103a06126d2565b6103a0805161036052806020015161038052506008546103a0526318160ddd6103e05260206103e060046103fc6103a0515afa610095573d600060003e3d6000fd5b601f3d111561349f576103e0516103c05260006103e052600354610400526004546104205260006103c0511461010157610360516102405261038051610260526104005161028052610420516102a052610340516102c0526100f8610440612a33565b610440516103e0525b6104005161044052610420516104605261048060006002818352015b6103c0516101395760006020610480510260040135111561349f575b61044061048051600281101561349f576020020180516020610480510260040135818183011061349f5780820190509050815250815160010180835281141561011d575050610360516102405261038051610260526104405161028052610460516102a052610340516102c0526101b16104a0612a33565b6104a051610480526103e05161048051111561349f57610480516104a0526060366104c03760006103c05114156101fd5761044051600355610460516004556104805161050052610473565b600554600280820282158284830414171561349f5790509050600480820490509050610520526006546105405261056060006002818352015b6104805161040061056051600281101561349f57602002015180820282158284830414171561349f57905090506103e05180801561349f578204905090506105805260006105a05261044061056051600281101561349f57602002015161058051116102cc5761044061056051600281101561349f5760200201516105805180821061349f57808203905090506105a0526102f8565b6105805161044061056051600281101561349f57602002015180821061349f57808203905090506105a0525b610520516105a05180820282158284830414171561349f57905090506402540be400808204905090506104c061056051600281101561349f57602002015261044061056051600281101561349f5760200201516104c061056051600281101561349f5760200201516105405180820282158284830414171561349f57905090506402540be4008082049050905080821061349f5780820390509050600161056051600281101561349f57026003015561044061056051600281101561349f576020020180516104c061056051600281101561349f57602002015180821061349f57808203905090508152508151600101808352811415610236575050610360516102405261038051610260526104405161028052610460516102a052610340516102c052610427610560612a33565b610560516104a0526103c0516104a0516103e05180821061349f578082039050905080820282158284830414171561349f57905090506103e05180801561349f57820490509050610500525b6044356105005110156104f7576014610520527f536c697070616765207363726577656420796f750000000000000000000000006105405261052050610520518061054001818260206001820306601f82010390500336823750506308c379a06104e0526020610500526105205160206001820306601f82010390506044016104fcfd5b600435341861349f5760006024351115610558576323b872dd6105205233610540523061056052602435610580526020610520606461053c60006002545af1610545573d600060003e3d6000fd5b601f3d111561349f57610520511561349f575b6340c10f1961052052336105405261050051610560526020610520604461053c60006103a0515af161058f573d600060003e3d6000fd5b601f3d111561349f5761052050337f26f55a85081d24974e85c6c00045d0f0453991e95873f52bff0d21af4079a76860043561052052602435610540526104c051610560526104e05161058052610480516105a0526103c05161050051818183011061349f57808201905090506105c05260c0610520a2610500516105205260206105206000600055f35b633df021248118610af3576004358060801d81607f1d1861349f57610420526024358060801d81607f1d1861349f576104405260005461349f57600160005560125461349f5761066b6104a06126d2565b6104a0805161046052806020015161048052506104605160e05261048051610100526106986104e0612726565b6104e080516104a05280602001516104c052506104a061042051600281101561349f57602002015160443561046061042051600281101561349f57602002015180820282158284830414171561349f5790509050670de0b6b3a764000080820490509050818183011061349f57808201905090506104e052610420516102405261044051610260526104e051610280526104a0516102a0526104c0516102c052610743610520612aee565b61052051610500526104a061044051600281101561349f5760200201516105005180821061349f5780820390509050600180821061349f5780820390509050610520526105205160055480820282158284830414171561349f57905090506402540be40080820490509050610540526105405160065480820282158284830414171561349f57905090506402540be40080820490509050610560526104e051670de0b6b3a764000080820282158284830414171561349f579050905061046061042051600281101561349f57602002015180801561349f57820490509050600161042051600281101561349f57026003015561050051610540516105605180821061349f5780820390509050818183011061349f5780820190509050670de0b6b3a764000080820282158284830414171561349f579050905061046061044051600281101561349f57602002015180801561349f57820490509050600161044051600281101561349f570260030155610520516105405180821061349f5780820390509050670de0b6b3a764000080820282158284830414171561349f579050905061046061044051600281101561349f57602002015180801561349f57820490509050610520526064356105205110156109b457602e610580527f45786368616e676520726573756c74656420696e20666577657220636f696e736105a0527f207468616e2065787065637465640000000000000000000000000000000000006105c0526105805061058051806105a001818260206001820306601f82010390500336823750506308c379a0610540526020610560526105805160206001820306601f820103905060440161055cfd5b600254610580526104205115610a45573461349f576323b872dd6105a052336105c052306105e0526044356106005260206105a060646105bc6000610580515af1610a04573d600060003e3d6000fd5b601f3d111561349f576105a0511561349f5760006105a0526105a050600060006105a0516105c061052051335af1610a98573d600060003e3d6000fd610a98565b604435341861349f5763a9059cbb6105a052336105c052610520516105e05260206105a060446105bc6000610580515af1610a85573d600060003e3d6000fd5b601f3d111561349f576105a0511561349f575b337f8b3e96f2b889fa771c53c981b40daf005f63f637f1869f707052d15a3dd97140610420516105a0526044356105c052610440516105e052610520516106005260806105a0a2610520516105a05260206105a06000600055f35b3461349f5763f446c1d08118610b2657610b0e610160612597565b61016051606480820490509050610180526020610180f35b6376a2f0f08118610b4b57610b3c610160612597565b61016051610180526020610180f35b63bb7b8b808118610c5357610b616102606126d2565b61026080516102e052806020015161030052506102e05160e0526103005161010052610b8e6102a0612726565b6102a080516103605280602001516103805250610bac610320612597565b610320516103a0526103605160e05261038051610100526103a05161012052610bd66103406127c6565b61034051610240526318160ddd610280526020610280600461029c6008545afa610c05573d600060003e3d6000fd5b601f3d111561349f57610280516102605261024051670de0b6b3a764000080820282158284830414171561349f57905090506102605180801561349f57820490509050610280526020610280f35b63ed8e84f38118610e6c576044358060011c61349f5761034052610c78610380612597565b6103805161036052610c8b6103c06126d2565b6103c080516103805280602001516103a052506003546103c0526004546103e05261038051610240526103a051610260526103c051610280526103e0516102a052610360516102c052610cdf610420612a33565b610420516104005261042060006002818352015b60206104205102600401356104405261034051610d3a576103c061042051600281101561349f576020020180516104405180821061349f5780820390509050815250610d68565b6103c061042051600281101561349f5760200201805161044051818183011061349f57808201905090508152505b8151600101808352811415610cf357505061038051610240526103a051610260526103c051610280526103e0516102a052610360516102c052610dac610440612a33565b61044051610420526318160ddd610460526020610460600461047c6008545afa610ddb573d600060003e3d6000fd5b601f3d111561349f57610460516104405260006104605261034051610e1957610400516104205180821061349f578082039050905061046052610e34565b610420516104005180821061349f5780820390509050610460525b610460516104405180820282158284830414171561349f57905090506104005180801561349f57820490509050610480526020610480f35b635e0d443f8118611041576004358060801d81607f1d1861349f57610420526024358060801d81607f1d1861349f5761044052610eaa6104a06126d2565b6104a0805161046052806020015161048052506104605160e0526104805161010052610ed76104e0612726565b6104e080516104a05280602001516104c052506104a061042051600281101561349f57602002015160443561046061042051600281101561349f57602002015180820282158284830414171561349f5790509050670de0b6b3a764000080820490509050818183011061349f57808201905090506104e052610420516102405261044051610260526104e051610280526104a0516102a0526104c0516102c052610f82610520612aee565b61052051610500526104a061044051600281101561349f5760200201516105005180821061349f5780820390509050610520526005546105205180820282158284830414171561349f57905090506402540be4008082049050905061054052610520516105405180821061349f5780820390509050670de0b6b3a764000080820282158284830414171561349f579050905061046061044051600281101561349f57602002015180801561349f57820490509050610560526020610560f35b6367df02ca8118611214576004358060801d81607f1d1861349f57610420526024358060801d81607f1d1861349f576104405261107f6104a06126d2565b6104a0805161046052806020015161048052506104605160e05261048051610100526110ac6104e0612726565b6104e080516104a05280602001516104c052506104a061044051600281101561349f5760200201516044356402540be40080820282158284830414171561349f57905090506402540be40060055480821061349f578082039050905080801561349f5782049050905061046061044051600281101561349f57602002015180820282158284830414171561349f5790509050670de0b6b3a76400008082049050905080821061349f57808203905090506104e052610440516102405261042051610260526104e051610280526104a0516102a0526104c0516102c052611193610520612aee565b6105205161050052610500516104a061042051600281101561349f57602002015180821061349f5780820390509050670de0b6b3a764000080820282158284830414171561349f579050905061046061042051600281101561349f57602002015180801561349f578204905090506105205261052051610540526020610540f35b635b36389c81186115005760005461349f57600160005560085460e0526318160ddd610120526020610120600461013c60e0515afa611258573d600060003e3d6000fd5b601f3d111561349f5761012051610100526040366101203761016060006002818352015b600161016051600281101561349f570260030154610180526101805160043580820282158284830414171561349f57905090506101005180801561349f578204905090506101a05260206101605102602401356101a05110156113755760306101c0527f5769746864726177616c20726573756c74656420696e20666577657220636f696101e0527f6e73207468616e20657870656374656400000000000000000000000000000000610200526101c0506101c051806101e001818260206001820306601f82010390500336823750506308c379a06101805260206101a0526101c05160206001820306601f820103905060440161019cfd5b610180516101a05180821061349f5780820390509050600161016051600281101561349f5702600301556101a05161012061016051600281101561349f576020020152610160511561140e5763a9059cbb6101c052336101e0526101a0516102005260206101c060446101dc60006002545af16113f7573d600060003e3d6000fd5b601f3d111561349f576101c0511561349f57611439565b60006101c0526101c050600060006101c0516101e06101a051335af1611439573d600060003e3d6000fd5b815160010180835281141561127c5750506379cc67906101605233610180526004356101a0526020610160604461017c600060e0515af161147f573d600060003e3d6000fd5b601f3d111561349f5761016050337f7c363854ccf79623411f8995b362bce5eddff18c927edc6f5dbbb5e05819a82c610120516101605261014051610180526040366101a0376101005160043580821061349f57808203905090506101e05260a0610160a26101205161016052610140516101805260406101606000600055f35b63e31032738118611a985760005461349f57600160005560125461349f57611529610360612597565b610360516103405261153c6103a06126d2565b6103a0805161036052806020015161038052506003546103a0526004546103c052610360516102405261038051610260526103a051610280526103c0516102a052610340516102c052611590610400612a33565b610400516103e0526103a051610400526103c0516104205261044060006002818352015b61040061044051600281101561349f57602002018051602061044051026004013580821061349f578082039050905081525081516001018083528114156115b4575050610360516102405261038051610260526104005161028052610420516102a052610340516102c05261162a610460612a33565b610460516104405260403661046037600554600280820282158284830414171561349f57905090506004808204905090506104a0526006546104c0526104e060006002818352015b610440516103a06104e051600281101561349f57602002015180820282158284830414171561349f57905090506103e05180801561349f57820490509050610500526104006104e051600281101561349f576020020151610520526000610540526105205161050051116116ff57610520516105005180821061349f57808203905090506105405261171a565b610500516105205180821061349f5780820390509050610540525b6104a0516105405180820282158284830414171561349f57905090506402540be400808204905090506104606104e051600281101561349f576020020152610520516104606104e051600281101561349f5760200201516104c05180820282158284830414171561349f57905090506402540be4008082049050905080821061349f578082039050905060016104e051600281101561349f570260030155610520516104606104e051600281101561349f57602002015180821061349f57808203905090506104006104e051600281101561349f5760200201528151600101808352811415611672575050610360516102405261038051610260526104005161028052610420516102a052610340516102c052611838610500612a33565b610500516104e052600854610500526318160ddd610540526020610540600461055c610500515afa61186f573d600060003e3d6000fd5b601f3d111561349f5761054051610520526103e0516104e05180821061349f57808203905090506105205180820282158284830414171561349f57905090506103e05180801561349f57820490509050610540526000610540511461349f57604435610540511115611952576014610560527f536c697070616765207363726577656420796f750000000000000000000000006105805261056050610560518061058001818260206001820306601f82010390500336823750506308c379a0610520526020610540526105605160206001820306601f820103905060440161053cfd5b6379cc6790610560523361058052610540516105a0526020610560604461057c6000610500515af1611989573d600060003e3d6000fd5b601f3d111561349f57610560506000600435146119ca57600061056052610560506000600061056051610580600435335af16119ca573d600060003e3d6000fd5b600060243514611a1c5763a9059cbb6105605233610580526024356105a0526020610560604461057c60006002545af1611a09573d600060003e3d6000fd5b601f3d111561349f57610560511561349f575b337f2b5508378d7e19e0d5fa338419034731416c4f5b219a10379956f764317fd47e6004356105605260243561058052610460516105a052610480516105c052610440516105e052610520516105405180821061349f57808203905090506106005260c0610560a2610540516105605260206105606000600055f35b63cc2b27d78118611ae0576024358060801d81607f1d1861349f576104a052600435610280526104a0516102a052611ad16104c06130ce565b6104c051610500526020610500f35b631a4d01d28118611d3a576024358060801d81607f1d1861349f576104a05260005461349f57600160005560125461349f576040366104c037600435610280526104a0516102a052611b336105006130ce565b61050080516104c05260208101516104e052506044356104c0511015611bca576018610500527f4e6f7420656e6f75676820636f696e732072656d6f76656400000000000000006105205261050050610500518061052001818260206001820306601f82010390500336823750506308c379a06104c05260206104e0526105005160206001820306601f82010390506044016104dcfd5b60016104a051600281101561349f570260030180546104c0516104e05160065480820282158284830414171561349f57905090506402540be40080820490509050818183011061349f578082019050905080821061349f57808203905090508155506379cc6790610500523361052052600435610540526020610500604461051c60006008545af1611c61573d600060003e3d6000fd5b601f3d111561349f57610500506104a05115611cc45763a9059cbb6105005233610520526104c051610540526020610500604461051c60006002545af1611cad573d600060003e3d6000fd5b601f3d111561349f57610500511561349f57611cef565b6000610500526105005060006000610500516105206104c051335af1611cef573d600060003e3d6000fd5b337f9e96dd3b997a2a257eec4df9bb6eaf626e206df5f543bd963682d143300be310600435610500526104c051610520526040610500a26104c0516105005260206105006000600055f35b633c157e648118611e8d57600754331861349f57600b5462015180818183011061349f5780820190509050421061349f574262015180818183011061349f57808201905090506024351061349f57611d93610180612597565b6101805161016052600435606480820282158284830414171561349f579050905061018052600060043511611dc9576000611dd2565b620f4240600435105b1561349f57610160516101805110611e0c5761016051600a80820282158284830414171561349f5790509050610180511161349f57611e30565b6101605161018051600a80820282158284830414171561349f57905090501061349f575b6101605160095561018051600a5542600b55602435600c557fa2b71ec6df949300b59aab36b55e189697b750119dd349fcfa8c0f779e83c254610160516101a052610180516101c052426101e0526024356102005260806101a0a1005b63551a65888118611f0057600754331861349f57611eac610180612597565b61018051610160526101605160095561016051600a5542600b5542600c557f46e22fb3709ad289f62ce63d469248536dbc78d82b84a3d7e74ad606dc2019386101605161018052426101a0526040610180a1005b635b5a14678118611f9b57600754331861349f57600d5461349f5764012a05f2006004351161349f576402540be4006024351161349f57426203f480818183011061349f578082019050905060e05260e051600d55600435600f5560243560105560e0517f351fc5da2fbf480f2225debf3664a4bc90fa9923743aad58b4603f648e931fe060043561010052602435610120526040610100a2005b634f12fe97811861202a5760005461349f576001600055600754331861349f57600d54421061349f576000600d541461349f576000600d55600f5460e0526010546101005260e051600555610100516006557fbe12859b636aed607d5230b2cc2711f68d70e51060e6cca1f575ef5d2fcc95d160e0516101205261010051610140526040610120a16000600055005b63226840fb811861204557600754331861349f576000600d55005b636b441a4081186120c4576004358060a01c61349f5760e052600754331861349f57600e5461349f57426203f480818183011061349f57808201905090506101005261010051600e5560e05160115560e051610100517f181aa3aa17d4cbf99265dd4443eba009433d3cde79d60164fde1d1a192beb9356000610120a3005b636a1c05ae81186121395760005461349f576001600055600754331861349f57600e54421061349f576000600e541461349f576000600e5560115460e05260e05160075560e0517f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c6000610100a26000600055005b6386fbf193811861215457600754331861349f576000600e55005b63e2e7d26481186121f657600435612184574760035480821061349f578082039050905060e052602060e06121f4565b6370a0823160e0523061010052602060e0602460fc6001600435600281101561349f5702600101545afa6121bd573d600060003e3d6000fd5b601f3d111561349f5760e0516001600435600281101561349f57026003015480821061349f57808203905090506101205260206101205bf35b6330c5408581186123055760005461349f576001600055600754331861349f574760035480821061349f578082039050905060e052600060e0511461225f5760006101005261010050600060006101005161012060e051335af161225f573d600060003e3d6000fd5b6370a082316101005230610120526020610100602461011c6002545afa61228b573d600060003e3d6000fd5b601f3d111561349f576101005160045480821061349f578082039050905060e052600060e051146122fe5763a9059cbb61010052336101205260e051610140526020610100604461011c60006002545af16122eb573d600060003e3d6000fd5b601f3d111561349f57610100511561349f575b6000600055005b63524c390181186123b65760005461349f576001600055600754331861349f5760e060006002818352015b60e05115612399576370a082316101005230610120526020610100602461011c600160e051600281101561349f5702600101545afa612374573d600060003e3d6000fd5b601f3d111561349f5761010051600160e051600281101561349f57026003015561239e565b476003555b81516001018083528114156123305750506000600055005b63e369885381186123db57600754331861349f5742601354111561349f576001601255005b633046f97281186123f657600754331861349f576000601255005b637dc0d1d081186124165760206020380360803960805160e052602060e0f35b63c6610657811861243d576001600435600281101561349f57026001015460e052602060e0f35b634903b0d18118612464576001600435600281101561349f57026003015460e052602060e0f35b63ddca3f43811861247b5760055460e052602060e0f35b63fee3f7f981186124925760065460e052602060e0f35b638da5cb5b81186124a95760075460e052602060e0f35b6382c6306681186124c05760085460e052602060e0f35b635409491a81186124d75760095460e052602060e0f35b63b4b577ad81186124ee57600a5460e052602060e0f35b632081066c811861250557600b5460e052602060e0f35b6314052288811861251c57600c5460e052602060e0f35b63405e28f8811861253357600d5460e052602060e0f35b63e0a0b586811861254a57600e5460e052602060e0f35b6358680d0b811861256157600f5460e052602060e0f35b63e382446281186125785760105460e052602060e0f35b631ec0cdc1811861258f5760115460e052602060e0f35b505b60006000fd5b600c5460e052600a546101005260e05142106125bd57610100518152506126d0566126d0565b60095461012052600b54610140526101205161010051116126555761012051610120516101005180821061349f5780820390509050426101405180821061349f578082039050905080820282158284830414171561349f579050905060e0516101405180821061349f578082039050905080801561349f5782049050905080821061349f57808203905090508152506126d0566126d0565b61012051610100516101205180821061349f5780820390509050426101405180821061349f578082039050905080820282158284830414171561349f579050905060e0516101405180821061349f578082039050905080801561349f57820490509050818183011061349f57808201905090508152506126d0565b565b670de0b6b3a764000081526350d25bcd60e052602060e0600460fc6020602038036080396080515afa61270a573d600060003e3d6000fd5b601f3d111561349f5760e0516000811261349f57816020015250565b60e05161012052610100516101405261016060006002818352015b61012061016051600281101561349f576020020151600161016051600281101561349f57026003015480820282158284830414171561349f5790509050670de0b6b3a76400008082049050905061012061016051600281101561349f576020020152815160010180835281141561274157505061012051815261014051816020015250565b604036610140376101a060006002818352015b60206101a0510260e0015161018052610140805161018051818183011061349f578082019050905081525081516001018083528114156127d957505061014051612827576000815250612a31565b610140516101805261012051600280820282158284830414171561349f57905090506101a0526101c0600060ff818352015b610180516101e05261022060006002818352015b6020610220510260e00151610200526101e0516101805180820282158284830414171561349f579050905061020051600280820282158284830414171561349f579050905080801561349f578204905090506101e052815160010180835281141561286d57505061018051610160526101a0516101405180820282158284830414171561349f57905090506064808204905090506101e051600280820282158284830414171561349f5790509050818183011061349f57808201905090506101805180820282158284830414171561349f57905090506101a051606480821061349f57808203905090506101805180820282158284830414171561349f579050905060648082049050905060036101e05180820282158284830414171561349f5790509050818183011061349f578082019050905080801561349f57820490509050610180526101605161018051116129ef576001610160516101805180821061349f578082039050905011612a1a57505061018051815250612a3156612a1a565b6001610180516101605180821061349f578082039050905011612a1a57505061018051815250612a31565b815160010180835281141561285957505060006000fd5b565b610240516102e052610260516103005261032060006002818352015b6102e061032051600281101561349f57602002015161028061032051600281101561349f57602002015180820282158284830414171561349f5790509050670de0b6b3a7640000808204905090506102e061032051600281101561349f5760200201528151600101808352811415612a4f5750506102e05160e05261030051610100526102c05161012052612ae56103206127c6565b61032051815250565b61026051610240511461349f576000610260511261349f57600261026051121561349f576000610240511261349f57600261024051121561349f57612b34610300612597565b610300516102e0526102a05160e0526102c051610100526102e05161012052612b5e6103206127c6565b61032051610300526102e051600280820282158284830414171561349f5790509050610320526103005161034052606036610360376103c060006002818352015b610240516103c05118612bb9576102805161038052612bea565b610260516103c0511415612bd057612c4e56612bea565b6102a06103c051600281101561349f576020020151610380525b610360805161038051818183011061349f5780820190509050815250610340516103005180820282158284830414171561349f579050905061038051600280820282158284830414171561349f579050905080801561349f57820490509050610340525b8151600101808352811415612b9f575050610340516103005180820282158284830414171561349f5790509050606480820282158284830414171561349f579050905061032051600280820282158284830414171561349f579050905080801561349f57820490509050610340526103605161030051606480820282158284830414171561349f57905090506103205180801561349f57820490509050818183011061349f57808201905090506103c052610300516103e052610400600060ff818352015b6103e0516103a0526103e0516103e05180820282158284830414171561349f579050905061034051818183011061349f578082019050905060026103e05180820282158284830414171561349f57905090506103c051818183011061349f57808201905090506103005180821061349f578082039050905080801561349f578204905090506103e0526103a0516103e05111612dd85760016103a0516103e05180821061349f578082039050905011612e035750506103e051815250612e1a56612e03565b60016103e0516103a05180821061349f578082039050905011612e035750506103e051815250612e1a565b8151600101808352811415612d1357505060006000fd5b565b6000610100511261349f57600261010051121561349f5760e051600280820282158284830414171561349f579050905061018052610160516101a0526060366101c03761022060006002818352015b61010051610220511415612e8257612f0056612e9c565b61012061022051600281101561349f5760200201516101e0525b6101c080516101e051818183011061349f57808201905090508152506101a0516101605180820282158284830414171561349f57905090506101e051600280820282158284830414171561349f579050905080801561349f578204905090506101a0525b8151600101808352811415612e6b5750506101a0516101605180820282158284830414171561349f5790509050606480820282158284830414171561349f579050905061018051600280820282158284830414171561349f579050905080801561349f578204905090506101a0526101c05161016051606480820282158284830414171561349f57905090506101805180801561349f57820490509050818183011061349f5780820190509050610220526101605161024052610260600060ff818352015b6102405161020052610240516102405180820282158284830414171561349f57905090506101a051818183011061349f578082019050905060026102405180820282158284830414171561349f579050905061022051818183011061349f57808201905090506101605180821061349f578082039050905080801561349f578204905090506102405261020051610240511161308a576001610200516102405180821061349f5780820390509050116130b5575050610240518152506130cc566130b5565b6001610240516102005180821061349f5780820390509050116130b5575050610240518152506130cc565b8151600101808352811415612fc557505060006000fd5b565b6130d96102e0612597565b6102e0516102c0526130ec6103206126d2565b61032080516102e052806020015161030052506102e05160e0526103005161010052613119610360612726565b610360805161032052806020015161034052506103205160e05261034051610100526102c0516101205261314e6103806127c6565b61038051610360526318160ddd6103a05260206103a060046103bc6008545afa61317d573d600060003e3d6000fd5b601f3d111561349f576103a0516103805261036051610280516103605180820282158284830414171561349f57905090506103805180801561349f5782049050905080821061349f57808203905090506103a0526102c05160e0526102a05161010052610320516101205261034051610140526103a051610160526132036103e0612e1c565b6103e0516103c052610320516103e0526103405161040052600554600280820282158284830414171561349f57905090506004808204905090506104205261044060006002818352015b60006104605261032061044051600281101561349f576020020151610480526102a05161044051186132c157610480516103a05180820282158284830414171561349f57905090506103605180801561349f578204905090506103c05180821061349f578082039050905061046052613305565b61048051610480516103a05180820282158284830414171561349f57905090506103605180801561349f5782049050905080821061349f5780820390509050610460525b6103e061044051600281101561349f57602002018051610420516104605180820282158284830414171561349f57905090506402540be4008082049050905080821061349f5780820390509050815250815160010180835281141561324d5750506103e06102a051600281101561349f5760200201516102c05160e0526102a051610100526103e0516101205261040051610140526103a051610160526133ad610460612e1c565b6104605180821061349f5780820390509050610440526102e06102a051600281101561349f5760200201516104605261044051600180821061349f5780820390509050670de0b6b3a764000080820282158284830414171561349f57905090506104605180801561349f57820490509050610440526103206102a051600281101561349f5760200201516103c05180821061349f5780820390509050670de0b6b3a764000080820282158284830414171561349f57905090506104605180801561349f5782049050905061048052610440518152610480516104405180821061349f5780820390509050602082015250565b600080fd5b6101566135fa036101566101a0396101566135fa0361018051816101a00152806020016101a0f35b600080fd000000000000000000000000745748bcfd8f9c2de519a71d789be8a63dd7d66c000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000005979d7b546e38e414f7e9822514be443a4800529000000000000000000000000dbcd16e622c95acb2650b38ec799f76bfc557a0b000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000003d0900000000000000000000000000000000000000000000000000000000012a05f200000000000000000000000000b1552c5e96b312d0bf8b554186f846c40614a540
Deployed Bytecode
0x600436101561000d57612591565b60046000601c37600051630b4c7e4d811861061a5760005461349f57600160005560125461349f57610040610360612597565b61036051610340526100536103a06126d2565b6103a0805161036052806020015161038052506008546103a0526318160ddd6103e05260206103e060046103fc6103a0515afa610095573d600060003e3d6000fd5b601f3d111561349f576103e0516103c05260006103e052600354610400526004546104205260006103c0511461010157610360516102405261038051610260526104005161028052610420516102a052610340516102c0526100f8610440612a33565b610440516103e0525b6104005161044052610420516104605261048060006002818352015b6103c0516101395760006020610480510260040135111561349f575b61044061048051600281101561349f576020020180516020610480510260040135818183011061349f5780820190509050815250815160010180835281141561011d575050610360516102405261038051610260526104405161028052610460516102a052610340516102c0526101b16104a0612a33565b6104a051610480526103e05161048051111561349f57610480516104a0526060366104c03760006103c05114156101fd5761044051600355610460516004556104805161050052610473565b600554600280820282158284830414171561349f5790509050600480820490509050610520526006546105405261056060006002818352015b6104805161040061056051600281101561349f57602002015180820282158284830414171561349f57905090506103e05180801561349f578204905090506105805260006105a05261044061056051600281101561349f57602002015161058051116102cc5761044061056051600281101561349f5760200201516105805180821061349f57808203905090506105a0526102f8565b6105805161044061056051600281101561349f57602002015180821061349f57808203905090506105a0525b610520516105a05180820282158284830414171561349f57905090506402540be400808204905090506104c061056051600281101561349f57602002015261044061056051600281101561349f5760200201516104c061056051600281101561349f5760200201516105405180820282158284830414171561349f57905090506402540be4008082049050905080821061349f5780820390509050600161056051600281101561349f57026003015561044061056051600281101561349f576020020180516104c061056051600281101561349f57602002015180821061349f57808203905090508152508151600101808352811415610236575050610360516102405261038051610260526104405161028052610460516102a052610340516102c052610427610560612a33565b610560516104a0526103c0516104a0516103e05180821061349f578082039050905080820282158284830414171561349f57905090506103e05180801561349f57820490509050610500525b6044356105005110156104f7576014610520527f536c697070616765207363726577656420796f750000000000000000000000006105405261052050610520518061054001818260206001820306601f82010390500336823750506308c379a06104e0526020610500526105205160206001820306601f82010390506044016104fcfd5b600435341861349f5760006024351115610558576323b872dd6105205233610540523061056052602435610580526020610520606461053c60006002545af1610545573d600060003e3d6000fd5b601f3d111561349f57610520511561349f575b6340c10f1961052052336105405261050051610560526020610520604461053c60006103a0515af161058f573d600060003e3d6000fd5b601f3d111561349f5761052050337f26f55a85081d24974e85c6c00045d0f0453991e95873f52bff0d21af4079a76860043561052052602435610540526104c051610560526104e05161058052610480516105a0526103c05161050051818183011061349f57808201905090506105c05260c0610520a2610500516105205260206105206000600055f35b633df021248118610af3576004358060801d81607f1d1861349f57610420526024358060801d81607f1d1861349f576104405260005461349f57600160005560125461349f5761066b6104a06126d2565b6104a0805161046052806020015161048052506104605160e05261048051610100526106986104e0612726565b6104e080516104a05280602001516104c052506104a061042051600281101561349f57602002015160443561046061042051600281101561349f57602002015180820282158284830414171561349f5790509050670de0b6b3a764000080820490509050818183011061349f57808201905090506104e052610420516102405261044051610260526104e051610280526104a0516102a0526104c0516102c052610743610520612aee565b61052051610500526104a061044051600281101561349f5760200201516105005180821061349f5780820390509050600180821061349f5780820390509050610520526105205160055480820282158284830414171561349f57905090506402540be40080820490509050610540526105405160065480820282158284830414171561349f57905090506402540be40080820490509050610560526104e051670de0b6b3a764000080820282158284830414171561349f579050905061046061042051600281101561349f57602002015180801561349f57820490509050600161042051600281101561349f57026003015561050051610540516105605180821061349f5780820390509050818183011061349f5780820190509050670de0b6b3a764000080820282158284830414171561349f579050905061046061044051600281101561349f57602002015180801561349f57820490509050600161044051600281101561349f570260030155610520516105405180821061349f5780820390509050670de0b6b3a764000080820282158284830414171561349f579050905061046061044051600281101561349f57602002015180801561349f57820490509050610520526064356105205110156109b457602e610580527f45786368616e676520726573756c74656420696e20666577657220636f696e736105a0527f207468616e2065787065637465640000000000000000000000000000000000006105c0526105805061058051806105a001818260206001820306601f82010390500336823750506308c379a0610540526020610560526105805160206001820306601f820103905060440161055cfd5b600254610580526104205115610a45573461349f576323b872dd6105a052336105c052306105e0526044356106005260206105a060646105bc6000610580515af1610a04573d600060003e3d6000fd5b601f3d111561349f576105a0511561349f5760006105a0526105a050600060006105a0516105c061052051335af1610a98573d600060003e3d6000fd610a98565b604435341861349f5763a9059cbb6105a052336105c052610520516105e05260206105a060446105bc6000610580515af1610a85573d600060003e3d6000fd5b601f3d111561349f576105a0511561349f575b337f8b3e96f2b889fa771c53c981b40daf005f63f637f1869f707052d15a3dd97140610420516105a0526044356105c052610440516105e052610520516106005260806105a0a2610520516105a05260206105a06000600055f35b3461349f5763f446c1d08118610b2657610b0e610160612597565b61016051606480820490509050610180526020610180f35b6376a2f0f08118610b4b57610b3c610160612597565b61016051610180526020610180f35b63bb7b8b808118610c5357610b616102606126d2565b61026080516102e052806020015161030052506102e05160e0526103005161010052610b8e6102a0612726565b6102a080516103605280602001516103805250610bac610320612597565b610320516103a0526103605160e05261038051610100526103a05161012052610bd66103406127c6565b61034051610240526318160ddd610280526020610280600461029c6008545afa610c05573d600060003e3d6000fd5b601f3d111561349f57610280516102605261024051670de0b6b3a764000080820282158284830414171561349f57905090506102605180801561349f57820490509050610280526020610280f35b63ed8e84f38118610e6c576044358060011c61349f5761034052610c78610380612597565b6103805161036052610c8b6103c06126d2565b6103c080516103805280602001516103a052506003546103c0526004546103e05261038051610240526103a051610260526103c051610280526103e0516102a052610360516102c052610cdf610420612a33565b610420516104005261042060006002818352015b60206104205102600401356104405261034051610d3a576103c061042051600281101561349f576020020180516104405180821061349f5780820390509050815250610d68565b6103c061042051600281101561349f5760200201805161044051818183011061349f57808201905090508152505b8151600101808352811415610cf357505061038051610240526103a051610260526103c051610280526103e0516102a052610360516102c052610dac610440612a33565b61044051610420526318160ddd610460526020610460600461047c6008545afa610ddb573d600060003e3d6000fd5b601f3d111561349f57610460516104405260006104605261034051610e1957610400516104205180821061349f578082039050905061046052610e34565b610420516104005180821061349f5780820390509050610460525b610460516104405180820282158284830414171561349f57905090506104005180801561349f57820490509050610480526020610480f35b635e0d443f8118611041576004358060801d81607f1d1861349f57610420526024358060801d81607f1d1861349f5761044052610eaa6104a06126d2565b6104a0805161046052806020015161048052506104605160e0526104805161010052610ed76104e0612726565b6104e080516104a05280602001516104c052506104a061042051600281101561349f57602002015160443561046061042051600281101561349f57602002015180820282158284830414171561349f5790509050670de0b6b3a764000080820490509050818183011061349f57808201905090506104e052610420516102405261044051610260526104e051610280526104a0516102a0526104c0516102c052610f82610520612aee565b61052051610500526104a061044051600281101561349f5760200201516105005180821061349f5780820390509050610520526005546105205180820282158284830414171561349f57905090506402540be4008082049050905061054052610520516105405180821061349f5780820390509050670de0b6b3a764000080820282158284830414171561349f579050905061046061044051600281101561349f57602002015180801561349f57820490509050610560526020610560f35b6367df02ca8118611214576004358060801d81607f1d1861349f57610420526024358060801d81607f1d1861349f576104405261107f6104a06126d2565b6104a0805161046052806020015161048052506104605160e05261048051610100526110ac6104e0612726565b6104e080516104a05280602001516104c052506104a061044051600281101561349f5760200201516044356402540be40080820282158284830414171561349f57905090506402540be40060055480821061349f578082039050905080801561349f5782049050905061046061044051600281101561349f57602002015180820282158284830414171561349f5790509050670de0b6b3a76400008082049050905080821061349f57808203905090506104e052610440516102405261042051610260526104e051610280526104a0516102a0526104c0516102c052611193610520612aee565b6105205161050052610500516104a061042051600281101561349f57602002015180821061349f5780820390509050670de0b6b3a764000080820282158284830414171561349f579050905061046061042051600281101561349f57602002015180801561349f578204905090506105205261052051610540526020610540f35b635b36389c81186115005760005461349f57600160005560085460e0526318160ddd610120526020610120600461013c60e0515afa611258573d600060003e3d6000fd5b601f3d111561349f5761012051610100526040366101203761016060006002818352015b600161016051600281101561349f570260030154610180526101805160043580820282158284830414171561349f57905090506101005180801561349f578204905090506101a05260206101605102602401356101a05110156113755760306101c0527f5769746864726177616c20726573756c74656420696e20666577657220636f696101e0527f6e73207468616e20657870656374656400000000000000000000000000000000610200526101c0506101c051806101e001818260206001820306601f82010390500336823750506308c379a06101805260206101a0526101c05160206001820306601f820103905060440161019cfd5b610180516101a05180821061349f5780820390509050600161016051600281101561349f5702600301556101a05161012061016051600281101561349f576020020152610160511561140e5763a9059cbb6101c052336101e0526101a0516102005260206101c060446101dc60006002545af16113f7573d600060003e3d6000fd5b601f3d111561349f576101c0511561349f57611439565b60006101c0526101c050600060006101c0516101e06101a051335af1611439573d600060003e3d6000fd5b815160010180835281141561127c5750506379cc67906101605233610180526004356101a0526020610160604461017c600060e0515af161147f573d600060003e3d6000fd5b601f3d111561349f5761016050337f7c363854ccf79623411f8995b362bce5eddff18c927edc6f5dbbb5e05819a82c610120516101605261014051610180526040366101a0376101005160043580821061349f57808203905090506101e05260a0610160a26101205161016052610140516101805260406101606000600055f35b63e31032738118611a985760005461349f57600160005560125461349f57611529610360612597565b610360516103405261153c6103a06126d2565b6103a0805161036052806020015161038052506003546103a0526004546103c052610360516102405261038051610260526103a051610280526103c0516102a052610340516102c052611590610400612a33565b610400516103e0526103a051610400526103c0516104205261044060006002818352015b61040061044051600281101561349f57602002018051602061044051026004013580821061349f578082039050905081525081516001018083528114156115b4575050610360516102405261038051610260526104005161028052610420516102a052610340516102c05261162a610460612a33565b610460516104405260403661046037600554600280820282158284830414171561349f57905090506004808204905090506104a0526006546104c0526104e060006002818352015b610440516103a06104e051600281101561349f57602002015180820282158284830414171561349f57905090506103e05180801561349f57820490509050610500526104006104e051600281101561349f576020020151610520526000610540526105205161050051116116ff57610520516105005180821061349f57808203905090506105405261171a565b610500516105205180821061349f5780820390509050610540525b6104a0516105405180820282158284830414171561349f57905090506402540be400808204905090506104606104e051600281101561349f576020020152610520516104606104e051600281101561349f5760200201516104c05180820282158284830414171561349f57905090506402540be4008082049050905080821061349f578082039050905060016104e051600281101561349f570260030155610520516104606104e051600281101561349f57602002015180821061349f57808203905090506104006104e051600281101561349f5760200201528151600101808352811415611672575050610360516102405261038051610260526104005161028052610420516102a052610340516102c052611838610500612a33565b610500516104e052600854610500526318160ddd610540526020610540600461055c610500515afa61186f573d600060003e3d6000fd5b601f3d111561349f5761054051610520526103e0516104e05180821061349f57808203905090506105205180820282158284830414171561349f57905090506103e05180801561349f57820490509050610540526000610540511461349f57604435610540511115611952576014610560527f536c697070616765207363726577656420796f750000000000000000000000006105805261056050610560518061058001818260206001820306601f82010390500336823750506308c379a0610520526020610540526105605160206001820306601f820103905060440161053cfd5b6379cc6790610560523361058052610540516105a0526020610560604461057c6000610500515af1611989573d600060003e3d6000fd5b601f3d111561349f57610560506000600435146119ca57600061056052610560506000600061056051610580600435335af16119ca573d600060003e3d6000fd5b600060243514611a1c5763a9059cbb6105605233610580526024356105a0526020610560604461057c60006002545af1611a09573d600060003e3d6000fd5b601f3d111561349f57610560511561349f575b337f2b5508378d7e19e0d5fa338419034731416c4f5b219a10379956f764317fd47e6004356105605260243561058052610460516105a052610480516105c052610440516105e052610520516105405180821061349f57808203905090506106005260c0610560a2610540516105605260206105606000600055f35b63cc2b27d78118611ae0576024358060801d81607f1d1861349f576104a052600435610280526104a0516102a052611ad16104c06130ce565b6104c051610500526020610500f35b631a4d01d28118611d3a576024358060801d81607f1d1861349f576104a05260005461349f57600160005560125461349f576040366104c037600435610280526104a0516102a052611b336105006130ce565b61050080516104c05260208101516104e052506044356104c0511015611bca576018610500527f4e6f7420656e6f75676820636f696e732072656d6f76656400000000000000006105205261050050610500518061052001818260206001820306601f82010390500336823750506308c379a06104c05260206104e0526105005160206001820306601f82010390506044016104dcfd5b60016104a051600281101561349f570260030180546104c0516104e05160065480820282158284830414171561349f57905090506402540be40080820490509050818183011061349f578082019050905080821061349f57808203905090508155506379cc6790610500523361052052600435610540526020610500604461051c60006008545af1611c61573d600060003e3d6000fd5b601f3d111561349f57610500506104a05115611cc45763a9059cbb6105005233610520526104c051610540526020610500604461051c60006002545af1611cad573d600060003e3d6000fd5b601f3d111561349f57610500511561349f57611cef565b6000610500526105005060006000610500516105206104c051335af1611cef573d600060003e3d6000fd5b337f9e96dd3b997a2a257eec4df9bb6eaf626e206df5f543bd963682d143300be310600435610500526104c051610520526040610500a26104c0516105005260206105006000600055f35b633c157e648118611e8d57600754331861349f57600b5462015180818183011061349f5780820190509050421061349f574262015180818183011061349f57808201905090506024351061349f57611d93610180612597565b6101805161016052600435606480820282158284830414171561349f579050905061018052600060043511611dc9576000611dd2565b620f4240600435105b1561349f57610160516101805110611e0c5761016051600a80820282158284830414171561349f5790509050610180511161349f57611e30565b6101605161018051600a80820282158284830414171561349f57905090501061349f575b6101605160095561018051600a5542600b55602435600c557fa2b71ec6df949300b59aab36b55e189697b750119dd349fcfa8c0f779e83c254610160516101a052610180516101c052426101e0526024356102005260806101a0a1005b63551a65888118611f0057600754331861349f57611eac610180612597565b61018051610160526101605160095561016051600a5542600b5542600c557f46e22fb3709ad289f62ce63d469248536dbc78d82b84a3d7e74ad606dc2019386101605161018052426101a0526040610180a1005b635b5a14678118611f9b57600754331861349f57600d5461349f5764012a05f2006004351161349f576402540be4006024351161349f57426203f480818183011061349f578082019050905060e05260e051600d55600435600f5560243560105560e0517f351fc5da2fbf480f2225debf3664a4bc90fa9923743aad58b4603f648e931fe060043561010052602435610120526040610100a2005b634f12fe97811861202a5760005461349f576001600055600754331861349f57600d54421061349f576000600d541461349f576000600d55600f5460e0526010546101005260e051600555610100516006557fbe12859b636aed607d5230b2cc2711f68d70e51060e6cca1f575ef5d2fcc95d160e0516101205261010051610140526040610120a16000600055005b63226840fb811861204557600754331861349f576000600d55005b636b441a4081186120c4576004358060a01c61349f5760e052600754331861349f57600e5461349f57426203f480818183011061349f57808201905090506101005261010051600e5560e05160115560e051610100517f181aa3aa17d4cbf99265dd4443eba009433d3cde79d60164fde1d1a192beb9356000610120a3005b636a1c05ae81186121395760005461349f576001600055600754331861349f57600e54421061349f576000600e541461349f576000600e5560115460e05260e05160075560e0517f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c6000610100a26000600055005b6386fbf193811861215457600754331861349f576000600e55005b63e2e7d26481186121f657600435612184574760035480821061349f578082039050905060e052602060e06121f4565b6370a0823160e0523061010052602060e0602460fc6001600435600281101561349f5702600101545afa6121bd573d600060003e3d6000fd5b601f3d111561349f5760e0516001600435600281101561349f57026003015480821061349f57808203905090506101205260206101205bf35b6330c5408581186123055760005461349f576001600055600754331861349f574760035480821061349f578082039050905060e052600060e0511461225f5760006101005261010050600060006101005161012060e051335af161225f573d600060003e3d6000fd5b6370a082316101005230610120526020610100602461011c6002545afa61228b573d600060003e3d6000fd5b601f3d111561349f576101005160045480821061349f578082039050905060e052600060e051146122fe5763a9059cbb61010052336101205260e051610140526020610100604461011c60006002545af16122eb573d600060003e3d6000fd5b601f3d111561349f57610100511561349f575b6000600055005b63524c390181186123b65760005461349f576001600055600754331861349f5760e060006002818352015b60e05115612399576370a082316101005230610120526020610100602461011c600160e051600281101561349f5702600101545afa612374573d600060003e3d6000fd5b601f3d111561349f5761010051600160e051600281101561349f57026003015561239e565b476003555b81516001018083528114156123305750506000600055005b63e369885381186123db57600754331861349f5742601354111561349f576001601255005b633046f97281186123f657600754331861349f576000601255005b637dc0d1d081186124165760206020380360803960805160e052602060e0f35b63c6610657811861243d576001600435600281101561349f57026001015460e052602060e0f35b634903b0d18118612464576001600435600281101561349f57026003015460e052602060e0f35b63ddca3f43811861247b5760055460e052602060e0f35b63fee3f7f981186124925760065460e052602060e0f35b638da5cb5b81186124a95760075460e052602060e0f35b6382c6306681186124c05760085460e052602060e0f35b635409491a81186124d75760095460e052602060e0f35b63b4b577ad81186124ee57600a5460e052602060e0f35b632081066c811861250557600b5460e052602060e0f35b6314052288811861251c57600c5460e052602060e0f35b63405e28f8811861253357600d5460e052602060e0f35b63e0a0b586811861254a57600e5460e052602060e0f35b6358680d0b811861256157600f5460e052602060e0f35b63e382446281186125785760105460e052602060e0f35b631ec0cdc1811861258f5760115460e052602060e0f35b505b60006000fd5b600c5460e052600a546101005260e05142106125bd57610100518152506126d0566126d0565b60095461012052600b54610140526101205161010051116126555761012051610120516101005180821061349f5780820390509050426101405180821061349f578082039050905080820282158284830414171561349f579050905060e0516101405180821061349f578082039050905080801561349f5782049050905080821061349f57808203905090508152506126d0566126d0565b61012051610100516101205180821061349f5780820390509050426101405180821061349f578082039050905080820282158284830414171561349f579050905060e0516101405180821061349f578082039050905080801561349f57820490509050818183011061349f57808201905090508152506126d0565b565b670de0b6b3a764000081526350d25bcd60e052602060e0600460fc6020602038036080396080515afa61270a573d600060003e3d6000fd5b601f3d111561349f5760e0516000811261349f57816020015250565b60e05161012052610100516101405261016060006002818352015b61012061016051600281101561349f576020020151600161016051600281101561349f57026003015480820282158284830414171561349f5790509050670de0b6b3a76400008082049050905061012061016051600281101561349f576020020152815160010180835281141561274157505061012051815261014051816020015250565b604036610140376101a060006002818352015b60206101a0510260e0015161018052610140805161018051818183011061349f578082019050905081525081516001018083528114156127d957505061014051612827576000815250612a31565b610140516101805261012051600280820282158284830414171561349f57905090506101a0526101c0600060ff818352015b610180516101e05261022060006002818352015b6020610220510260e00151610200526101e0516101805180820282158284830414171561349f579050905061020051600280820282158284830414171561349f579050905080801561349f578204905090506101e052815160010180835281141561286d57505061018051610160526101a0516101405180820282158284830414171561349f57905090506064808204905090506101e051600280820282158284830414171561349f5790509050818183011061349f57808201905090506101805180820282158284830414171561349f57905090506101a051606480821061349f57808203905090506101805180820282158284830414171561349f579050905060648082049050905060036101e05180820282158284830414171561349f5790509050818183011061349f578082019050905080801561349f57820490509050610180526101605161018051116129ef576001610160516101805180821061349f578082039050905011612a1a57505061018051815250612a3156612a1a565b6001610180516101605180821061349f578082039050905011612a1a57505061018051815250612a31565b815160010180835281141561285957505060006000fd5b565b610240516102e052610260516103005261032060006002818352015b6102e061032051600281101561349f57602002015161028061032051600281101561349f57602002015180820282158284830414171561349f5790509050670de0b6b3a7640000808204905090506102e061032051600281101561349f5760200201528151600101808352811415612a4f5750506102e05160e05261030051610100526102c05161012052612ae56103206127c6565b61032051815250565b61026051610240511461349f576000610260511261349f57600261026051121561349f576000610240511261349f57600261024051121561349f57612b34610300612597565b610300516102e0526102a05160e0526102c051610100526102e05161012052612b5e6103206127c6565b61032051610300526102e051600280820282158284830414171561349f5790509050610320526103005161034052606036610360376103c060006002818352015b610240516103c05118612bb9576102805161038052612bea565b610260516103c0511415612bd057612c4e56612bea565b6102a06103c051600281101561349f576020020151610380525b610360805161038051818183011061349f5780820190509050815250610340516103005180820282158284830414171561349f579050905061038051600280820282158284830414171561349f579050905080801561349f57820490509050610340525b8151600101808352811415612b9f575050610340516103005180820282158284830414171561349f5790509050606480820282158284830414171561349f579050905061032051600280820282158284830414171561349f579050905080801561349f57820490509050610340526103605161030051606480820282158284830414171561349f57905090506103205180801561349f57820490509050818183011061349f57808201905090506103c052610300516103e052610400600060ff818352015b6103e0516103a0526103e0516103e05180820282158284830414171561349f579050905061034051818183011061349f578082019050905060026103e05180820282158284830414171561349f57905090506103c051818183011061349f57808201905090506103005180821061349f578082039050905080801561349f578204905090506103e0526103a0516103e05111612dd85760016103a0516103e05180821061349f578082039050905011612e035750506103e051815250612e1a56612e03565b60016103e0516103a05180821061349f578082039050905011612e035750506103e051815250612e1a565b8151600101808352811415612d1357505060006000fd5b565b6000610100511261349f57600261010051121561349f5760e051600280820282158284830414171561349f579050905061018052610160516101a0526060366101c03761022060006002818352015b61010051610220511415612e8257612f0056612e9c565b61012061022051600281101561349f5760200201516101e0525b6101c080516101e051818183011061349f57808201905090508152506101a0516101605180820282158284830414171561349f57905090506101e051600280820282158284830414171561349f579050905080801561349f578204905090506101a0525b8151600101808352811415612e6b5750506101a0516101605180820282158284830414171561349f5790509050606480820282158284830414171561349f579050905061018051600280820282158284830414171561349f579050905080801561349f578204905090506101a0526101c05161016051606480820282158284830414171561349f57905090506101805180801561349f57820490509050818183011061349f5780820190509050610220526101605161024052610260600060ff818352015b6102405161020052610240516102405180820282158284830414171561349f57905090506101a051818183011061349f578082019050905060026102405180820282158284830414171561349f579050905061022051818183011061349f57808201905090506101605180821061349f578082039050905080801561349f578204905090506102405261020051610240511161308a576001610200516102405180821061349f5780820390509050116130b5575050610240518152506130cc566130b5565b6001610240516102005180821061349f5780820390509050116130b5575050610240518152506130cc565b8151600101808352811415612fc557505060006000fd5b565b6130d96102e0612597565b6102e0516102c0526130ec6103206126d2565b61032080516102e052806020015161030052506102e05160e0526103005161010052613119610360612726565b610360805161032052806020015161034052506103205160e05261034051610100526102c0516101205261314e6103806127c6565b61038051610360526318160ddd6103a05260206103a060046103bc6008545afa61317d573d600060003e3d6000fd5b601f3d111561349f576103a0516103805261036051610280516103605180820282158284830414171561349f57905090506103805180801561349f5782049050905080821061349f57808203905090506103a0526102c05160e0526102a05161010052610320516101205261034051610140526103a051610160526132036103e0612e1c565b6103e0516103c052610320516103e0526103405161040052600554600280820282158284830414171561349f57905090506004808204905090506104205261044060006002818352015b60006104605261032061044051600281101561349f576020020151610480526102a05161044051186132c157610480516103a05180820282158284830414171561349f57905090506103605180801561349f578204905090506103c05180821061349f578082039050905061046052613305565b61048051610480516103a05180820282158284830414171561349f57905090506103605180801561349f5782049050905080821061349f5780820390509050610460525b6103e061044051600281101561349f57602002018051610420516104605180820282158284830414171561349f57905090506402540be4008082049050905080821061349f5780820390509050815250815160010180835281141561324d5750506103e06102a051600281101561349f5760200201516102c05160e0526102a051610100526103e0516101205261040051610140526103a051610160526133ad610460612e1c565b6104605180821061349f5780820390509050610440526102e06102a051600281101561349f5760200201516104605261044051600180821061349f5780820390509050670de0b6b3a764000080820282158284830414171561349f57905090506104605180801561349f57820490509050610440526103206102a051600281101561349f5760200201516103c05180821061349f5780820390509050670de0b6b3a764000080820282158284830414171561349f57905090506104605180801561349f5782049050905061048052610440518152610480516104405180821061349f5780820390509050602082015250565b600080fd000000000000000000000000b1552c5e96b312d0bf8b554186f846c40614a540
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000745748bcfd8f9c2de519a71d789be8a63dd7d66c000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000005979d7b546e38e414f7e9822514be443a4800529000000000000000000000000dbcd16e622c95acb2650b38ec799f76bfc557a0b000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000003d0900000000000000000000000000000000000000000000000000000000012a05f200000000000000000000000000b1552c5e96b312d0bf8b554186f846c40614a540
-----Decoded View---------------
Arg [0] : _owner (address): 0x745748bcFd8F9c2De519a71D789be8A63dd7d66C
Arg [1] : _coins (address[2]): 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE,0x5979D7b546E38E414F7E9822514be443A4800529
Arg [2] : _pool_token (address): 0xDbcD16e622c95AcB2650b38eC799f76BFC557a0b
Arg [3] : _A (uint256): 50
Arg [4] : _fee (uint256): 4000000
Arg [5] : _admin_fee (uint256): 5000000000
Arg [6] : _oracle (address): 0xB1552C5e96B312d0Bf8b554186F846C40614a540
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 000000000000000000000000745748bcfd8f9c2de519a71d789be8a63dd7d66c
Arg [1] : 000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
Arg [2] : 0000000000000000000000005979d7b546e38e414f7e9822514be443a4800529
Arg [3] : 000000000000000000000000dbcd16e622c95acb2650b38ec799f76bfc557a0b
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000032
Arg [5] : 00000000000000000000000000000000000000000000000000000000003d0900
Arg [6] : 000000000000000000000000000000000000000000000000000000012a05f200
Arg [7] : 000000000000000000000000b1552c5e96b312d0bf8b554186f846c40614a540
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$146,150.41
Net Worth in ETH
51.050134
Token Allocations
WSTETH
48.29%
ETH
47.96%
AIRENA
3.75%
Others
0.00%
Multichain Portfolio | 35 Chains
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.