Contract 0x3eF6A01A0f81D6046290f3e2A8c5b843e738E604 3

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x828897ee678a6d900526d63654ca387a69a74109338a25d942d930f4f1a948beAdd_liquidity178741462021-09-28 17:08:3714 mins ago0x4c895ab84ea2e27f1394799a1e21d34dbc3ef052 IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.06250314176
0x586f883e1a2f4afd7b725280c207c1371c0ee478150a08c80eb269be571cfc11Exchange178715442021-09-28 16:13:461 hr 9 mins ago0x1702f2d0df7c99011a690461c34e51bd81cbab48 IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.036930425677
0x6c369290db16b360058da5fbe4ffa8a1083364c6e2fc48975a27d4b32ef899a4Exchange178708002021-09-28 15:58:381 hr 24 mins ago0xe0188ad346ce4d74e8c2ba432f1ef0e8855e2174 IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.039371129751
0xd5df9e50791db5999945cc444193729b7197ca2883505dd91aed88867a573d01Remove_liquidity178702672021-09-28 15:44:521 hr 38 mins ago0x1702f2d0df7c99011a690461c34e51bd81cbab48 IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.036616229217
0x647f33a2b6a4aeb3fa70391b72f653ce8b4d78f8d351c926dba21f55bab66e00Add_liquidity178686912021-09-28 15:05:582 hrs 17 mins ago0x18563fdcf0a65492561f38d66fbf377fe384067e IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.048796130822
0x7cae410ae5281e43d78065bacb53291d15d73d48d3a5588cd4714bb2936e97afAdd_liquidity178679932021-09-28 14:48:162 hrs 34 mins ago0x1c9d0b3152759e97dec45a0f4e30ae4aacf94676 IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.048874383744
0x8e21ae0d6340829823c4194324a4df922bd6a2713b0ce18518f74bf7dd678cb2Add_liquidity178678582021-09-28 14:45:172 hrs 37 mins ago0x7a1a6ddb2a0dda63aa7fe91ba17c600f329433c3 IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.033448917873
0x13a44ebd999e0970c248572fbd83e9b8c3405452cf47942fcd6d2773dd74a49fExchange178677532021-09-28 14:42:172 hrs 40 mins ago0x0bcd590a7bc197eab00bc00c19035d89bf8b0d9f IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.03274863408
0x268b812cd59d06d3c3a1e8dc8935f440fbde161a2bcaf9e9aa70e0252234766aAdd_liquidity178646662021-09-28 13:38:403 hrs 44 mins ago0x5b1b5d7f419c8c26a6ed51b46db09ae6376a82da IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.021913206481
0xda8f4157c1a2aa8b587db5f5ef7355d1c746777338fb424c1344c9e06bf90195Add_liquidity178625712021-09-28 12:43:344 hrs 39 mins ago0x64783d4a88318ae43bfdfe8d6178c454456b40b0 IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.023244755688
0xe6dbc7a046aacb127ac1074e3f2e2e6162455776755d44bececfbce8c9fc0aa0Add_liquidity178580732021-09-28 10:42:186 hrs 40 mins ago0x27f383aabde02b06a586399cc26654ae23277498 IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.02267112488
0x673b58a3d18b242d0e73dd557df87e634b82493d242c87e4535f6b314c3ddb23Add_liquidity178571132021-09-28 10:21:507 hrs 1 min ago0x2728e32174fc95de00695007c9134fa03dc8b434 IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.025684228639
0xd8b130cf9eb28de816053d9a8ff8d284f73d5d56761a67398a31cd63776a6484Add_liquidity178563282021-09-28 10:07:227 hrs 15 mins ago0x7b78507d6df5927db2e6ce2f134b55985ffd5f08 IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.021981963
0xd8eb7c12c781078f3ccea443611c6a9aa45f64033d146e34290b5bf9aa0307a5Add_liquidity178557062021-09-28 9:55:457 hrs 27 mins ago0xf3f5c252e8acd60671f92c7f72cf33661221ef42 IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.02623667996
0x30a5f1503dc8b90eb38dbf6c853f00b86957393cb7f629c1f62ca6f4e8fef72cAdd_liquidity178555712021-09-28 9:53:397 hrs 29 mins ago0xb89729bc7eebbfad2f3dd073ee8f200d1116ae8b IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.027801937501
0x279d46841a1b8d148951a3537d6ace9773f3fe917b5af022f8a1a32f3977c53cAdd_liquidity178473092021-09-28 7:07:1210 hrs 15 mins ago0x61380f8fb1ab63e3820e7f64cbe3f52a0d3200a6 IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.038363096808
0x59ccfae768fb21db2cc77c972cec359e7a5b5ca236c1a39af954ce19bb0d999cAdd_liquidity178463082021-09-28 6:44:5810 hrs 38 mins ago0xbce03405638247f5ca3ea767b2367b1af307ea81 IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.033125304232
0xe0c0ae4e6c4e050c069681c3e90190ce0a5a463e7e84495641797180690acd3dAdd_liquidity178407282021-09-28 4:39:0612 hrs 44 mins ago0x39d067a4250d064434de78a794dc84f10a51699e IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.02375293274
0x79d469a20ad3f5068359cb9899cc84889941fb8d8c04332752f0a02d64c536abAdd_liquidity178396482021-09-28 4:16:1313 hrs 6 mins ago0x7f6720bf2494543d4915907dfab178c59cbc556d IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.021815476344
0x8b21c4738586761f9b44a4380ffb5c2ca42c964da098d773bfca425723b2eb72Add_liquidity178396142021-09-28 4:15:3613 hrs 7 mins ago0x52bcd5cd02a62e10ee7faa7d9d762f094bd140d8 IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.022105608807
0x13b10ed3b73f4955d0eda026574a65506316e1304ad7f6a365d23ef9b155fc63Add_liquidity178390432021-09-28 4:05:2413 hrs 17 mins ago0x7f6720bf2494543d4915907dfab178c59cbc556d IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.02163032727
0x0c68fc8935689acf77fd90d1e055297f508c3bb3eafff25f90ff61aeaa9f84b3Add_liquidity178388992021-09-28 4:02:1113 hrs 20 mins ago0x1e37e31150e136e6f6eaa8583993b83ad3907ea3 IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.022238069473
0xcc994392bd6262f36e4284a9420a5943d2af50f3c0bf28c1496331b8142142d5Exchange178388952021-09-28 4:02:0813 hrs 20 mins ago0x3f03409918d8a54feacf3adc09a7af8e62a41400 IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.01729285748
0x1fbb698be23b98bc99c799ec98f50452c9a33a7bfd8b832ed8738271c5dded66Exchange178374272021-09-28 3:30:1613 hrs 52 mins ago0x3f03409918d8a54feacf3adc09a7af8e62a41400 IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.024096380657
0x2b2092efb701b78cce7fdd01878fc9bead57cd104b38c97fe222a1a71f03ea36Add_liquidity178366682021-09-28 3:11:5014 hrs 11 mins ago0xe9e6dac7bb4f1fd654e5a06b79066c62fa25fde9 IN  0x3ef6a01a0f81d6046290f3e2a8c5b843e738e6040 FTM0.024868012576
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x5b63f8c1b9c3ca3fc2bc08abaf0ef7f233b0460efb4793a141063f9ab6c34ba994641312021-06-11 22:34:58108 days 18 hrs ago 0x7eeac6cddbd1d0b8af061742d41877d7f707289a  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Vyper_contract

Compiler Version
vyper:0.2.12

Optimization Enabled:
N/A

Other Settings:
, None license

Contract Source Code (Vyper language format)

# @version 0.2.12
"""
@title StableSwap wBTC/renBTC
@author Curve.Fi
@license Copyright (c) Curve.Fi, 2020 - all rights reserved
@notice Minimal pool implementation with no lending
"""

from vyper.interfaces import ERC20

interface CurveToken:
    def totalSupply() -> uint256: view
    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
    token_supply: 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
PRECISION_MUL: constant(uint256[N_COINS]) = [10000000000, 10000000000]
RATES: constant(uint256[N_COINS]) = [10000000000000000000000000000, 10000000000000000000000000000]

# fixed constants
FEE_DENOMINATOR: constant(uint256) = 10 ** 10
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
):
    """
    @notice Contract constructor
    @param _owner Contract owner address
    @param _coins Addresses of ERC20 conracts of 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
    """
    for i in range(N_COINS):
        assert _coins[i] != 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


@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 _xp() -> uint256[N_COINS]:
    result: uint256[N_COINS] = RATES
    for i in range(N_COINS):
        result[i] = result[i] * self.balances[i] / PRECISION
    return result


@pure
@internal
def _xp_mem(_balances: uint256[N_COINS]) -> uint256[N_COINS]:
    result: uint256[N_COINS] = RATES
    for i in range(N_COINS):
        result[i] = result[i] * _balances[i] / PRECISION
    return result


@pure
@internal
def _get_D(_xp: uint256[N_COINS], _amp: uint256) -> uint256:
    """
    D invariant calculation in non-overflowing integer operations
    iteratively

    A * sum(x_i) * n**n + D = A * D * n**n + D**(n+1) / (n**n * prod(x_i))

    Converging solution:
    D[j+1] = (A * n**n * sum(x_i) - D[j]**(n+1) / (n**n prod(x_i))) / (A * n**n - 1)
    """
    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(_balances: uint256[N_COINS], _amp: uint256) -> uint256:
    return self._get_D(self._xp_mem(_balances), _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._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()
    balances: uint256[N_COINS] = self.balances
    D0: uint256 = self._get_D_mem(balances, amp)
    for i in range(N_COINS):
        if _is_deposit:
            balances[i] += _amounts[i]
        else:
            balances[i] -= _amounts[i]
    D1: uint256 = self._get_D_mem(balances, amp)
    token_amount: uint256 = CurveToken(self.lp_token).totalSupply()
    diff: uint256 = 0
    if _is_deposit:
        diff = D1 - D0
    else:
        diff = D0 - D1
    return diff * token_amount / D0


@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  # dev: is killed

    amp: uint256 = self._A()
    old_balances: uint256[N_COINS] = self.balances

    # Initial invariant
    D0: uint256 = self._get_D_mem(old_balances, amp)

    lp_token: address = self.lp_token
    token_supply: uint256 = CurveToken(lp_token).totalSupply()
    new_balances: uint256[N_COINS] = old_balances
    for i in range(N_COINS):
        if token_supply == 0:
            assert _amounts[i] > 0  # dev: initial deposit requires all coins
        # balances store amounts of c-tokens
        new_balances[i] += _amounts[i]

    # Invariant after change
    D1: uint256 = self._get_D_mem(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
            new_balance: uint256 = new_balances[i]
            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] -= fees[i]
        D2 = self._get_D_mem(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
    for i in range(N_COINS):
        if _amounts[i] > 0:
            # "safeTransferFrom" which works for ERC20s which return bool or not
            _response: Bytes[32] = raw_call(
                self.coins[i],
                concat(
                    method_id("transferFrom(address,address,uint256)"),
                    convert(msg.sender, bytes32),
                    convert(self, bytes32),
                    convert(_amounts[i], bytes32),
                ),
                max_outsize=32,
            )
            if len(_response) > 0:
                assert convert(_response, bool)  # dev: failed transfer
            # end "safeTransferFrom"

    # 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:
    """
    Calculate x[j] if one makes x[i] = x

    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 != 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:
    xp: uint256[N_COINS] = self._xp()
    rates: uint256[N_COINS] = RATES

    x: uint256 = xp[i] + (_dx * rates[i] / PRECISION)
    y: uint256 = self._get_y(i, j, x, xp)
    dy: uint256 = xp[j] - y - 1
    fee: uint256 = self.fee * dy / FEE_DENOMINATOR
    return (dy - fee) * PRECISION / rates[j]


@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

    old_balances: uint256[N_COINS] = self.balances
    xp: uint256[N_COINS] = self._xp_mem(old_balances)

    rates: uint256[N_COINS] = 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

    # Convert all to real units
    dy = (dy - dy_fee) * PRECISION / rates[j]
    assert dy >= _min_dy, "Exchange resulted in fewer coins than expected"

    dy_admin_fee: uint256 = dy_fee * self.admin_fee / FEE_DENOMINATOR
    dy_admin_fee = dy_admin_fee * PRECISION / rates[j]

    # Change balances exactly in same way as we change actual ERC20 coin amounts
    self.balances[i] = old_balances[i] + _dx
    # When rounding errors happen, we undercharge admin fee in favor of LP
    self.balances[j] = old_balances[j] - dy - dy_admin_fee

    _response: Bytes[32] = raw_call(
        self.coins[i],
        concat(
            method_id("transferFrom(address,address,uint256)"),
            convert(msg.sender, bytes32),
            convert(self, bytes32),
            convert(_dx, bytes32),
        ),
        max_outsize=32,
    )
    if len(_response) > 0:
        assert convert(_response, bool)

    _response = raw_call(
        self.coins[j],
        concat(
            method_id("transfer(address,uint256)"),
            convert(msg.sender, bytes32),
            convert(dy, bytes32),
        ),
        max_outsize=32,
    )
    if len(_response) > 0:
        assert convert(_response, bool)

    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 = CurveToken(lp_token).totalSupply()
    amounts: uint256[N_COINS] = empty(uint256[N_COINS])

    for i in range(N_COINS):
        old_balance: uint256 = self.balances[i]
        value: uint256 = old_balance * _amount / total_supply
        assert value >= _min_amounts[i], "Withdrawal resulted in fewer coins than expected"
        self.balances[i] = old_balance - value
        amounts[i] = value
        _response: Bytes[32] = raw_call(
            self.coins[i],
            concat(
                method_id("transfer(address,uint256)"),
                convert(msg.sender, bytes32),
                convert(value, bytes32),
            ),
            max_outsize=32,
        )
        if len(_response) > 0:
            assert convert(_response, bool)

    CurveToken(lp_token).burnFrom(msg.sender, _amount)  # dev: insufficient funds

    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  # dev: is killed

    amp: uint256 = self._A()
    old_balances: uint256[N_COINS] = self.balances
    D0: uint256 = self._get_D_mem(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(new_balances, amp)

    fee: uint256 = self.fee * N_COINS / (4 * (N_COINS - 1))
    admin_fee: uint256 = self.admin_fee
    fees: uint256[N_COINS] = empty(uint256[N_COINS])
    for i in range(N_COINS):
        new_balance: uint256 = new_balances[i]
        ideal_balance: uint256 = D1 * old_balances[i] / D0
        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(new_balances, amp)

    lp_token: address = self.lp_token
    token_supply: uint256 = CurveToken(lp_token).totalSupply()
    token_amount: uint256 = (D0 - D2) * token_supply / D0
    assert token_amount != 0  # dev: zero tokens burned
    token_amount += 1  # In case of rounding errors - make it unfavorable for the "attacker"
    assert token_amount <= _max_burn_amount, "Slippage screwed you"

    CurveToken(lp_token).burnFrom(msg.sender, token_amount)  # dev: insufficient funds
    for i in range(N_COINS):
        if _amounts[i] != 0:
            _response: Bytes[32] = raw_call(
                self.coins[i],
                concat(
                    method_id("transfer(address,uint256)"),
                    convert(msg.sender, bytes32),
                    convert(_amounts[i], bytes32),
                ),
                max_outsize=32,
            )
            if len(_response) > 0:
                assert convert(_response, bool)

    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, uint256):
    # First, need to calculate
    # * Get current D
    # * Solve Eqn against y_i for D - _token_amount
    amp: uint256 = self._A()
    xp: uint256[N_COINS] = self._xp()
    D0: uint256 = self._get_D(xp, amp)

    total_supply: uint256 = CurveToken(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
        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)
    precisions: uint256[N_COINS] = PRECISION_MUL
    dy = (dy - 1) / precisions[i]  # Withdraw less to account for rounding errors
    dy_0: uint256 = (xp[i] - new_y) / precisions[i]  # w/o fees

    return dy, dy_0 - dy, total_supply


@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
    total_supply: uint256 = 0
    dy, dy_fee, total_supply = 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

    _response: Bytes[32] = raw_call(
        self.coins[i],
        concat(
            method_id("transfer(address,uint256)"),
            convert(msg.sender, bytes32),
            convert(dy, bytes32),
        ),
        max_outsize=32,
    )
    if len(_response) > 0:
        assert convert(_response, bool)

    log RemoveLiquidityOne(msg.sender, _token_amount, dy, total_supply - _token_amount)

    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
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
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:
    return ERC20(self.coins[i]).balanceOf(self) - self.balances[i]


@external
def withdraw_admin_fees():
    assert msg.sender == self.owner  # dev: only owner

    for i in range(N_COINS):
        coin: address = self.coins[i]
        value: uint256 = ERC20(coin).balanceOf(self) - self.balances[i]
        if value > 0:
            _response: Bytes[32] = raw_call(
                coin,
                concat(
                    method_id("transfer(address,uint256)"),
                    convert(msg.sender, bytes32),
                    convert(value, bytes32),
                ),
                max_outsize=32,
            )  # dev: failed transfer
            if len(_response) > 0:
                assert convert(_response, bool)


@external
def donate_admin_fees():
    assert msg.sender == self.owner  # dev: only owner
    for i in range(N_COINS):
        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

Contract Security Audit

Contract ABI

[{"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},{"name":"token_supply","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"}],"outputs":[]},{"stateMutability":"view","type":"function","name":"A","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":10374},{"stateMutability":"view","type":"function","name":"A_precise","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":10336},{"stateMutability":"view","type":"function","name":"get_virtual_price","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":1020424},{"stateMutability":"view","type":"function","name":"calc_token_amount","inputs":[{"name":"_amounts","type":"uint256[2]"},{"name":"_is_deposit","type":"bool"}],"outputs":[{"name":"","type":"uint256"}],"gas":4025403},{"stateMutability":"nonpayable","type":"function","name":"add_liquidity","inputs":[{"name":"_amounts","type":"uint256[2]"},{"name":"_min_mint_amount","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":6217815},{"stateMutability":"view","type":"function","name":"get_dy","inputs":[{"name":"i","type":"int128"},{"name":"j","type":"int128"},{"name":"_dx","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":2460710},{"stateMutability":"nonpayable","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"}],"gas":2641329},{"stateMutability":"nonpayable","type":"function","name":"remove_liquidity","inputs":[{"name":"_amount","type":"uint256"},{"name":"_min_amounts","type":"uint256[2]"}],"outputs":[{"name":"","type":"uint256[2]"}],"gas":188799},{"stateMutability":"nonpayable","type":"function","name":"remove_liquidity_imbalance","inputs":[{"name":"_amounts","type":"uint256[2]"},{"name":"_max_burn_amount","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":6217461},{"stateMutability":"view","type":"function","name":"calc_withdraw_one_coin","inputs":[{"name":"_token_amount","type":"uint256"},{"name":"i","type":"int128"}],"outputs":[{"name":"","type":"uint256"}],"gas":1276},{"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"}],"gas":3908396},{"stateMutability":"nonpayable","type":"function","name":"ramp_A","inputs":[{"name":"_future_A","type":"uint256"},{"name":"_future_time","type":"uint256"}],"outputs":[],"gas":159339},{"stateMutability":"nonpayable","type":"function","name":"stop_ramp_A","inputs":[],"outputs":[],"gas":154800},{"stateMutability":"nonpayable","type":"function","name":"commit_new_fee","inputs":[{"name":"_new_fee","type":"uint256"},{"name":"_new_admin_fee","type":"uint256"}],"outputs":[],"gas":112758},{"stateMutability":"nonpayable","type":"function","name":"apply_new_fee","inputs":[],"outputs":[],"gas":103439},{"stateMutability":"nonpayable","type":"function","name":"revert_new_parameters","inputs":[],"outputs":[],"gas":22892},{"stateMutability":"nonpayable","type":"function","name":"commit_transfer_ownership","inputs":[{"name":"_owner","type":"address"}],"outputs":[],"gas":76930},{"stateMutability":"nonpayable","type":"function","name":"apply_transfer_ownership","inputs":[],"outputs":[],"gas":65607},{"stateMutability":"nonpayable","type":"function","name":"revert_transfer_ownership","inputs":[],"outputs":[],"gas":22982},{"stateMutability":"view","type":"function","name":"admin_balances","inputs":[{"name":"i","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":7838},{"stateMutability":"nonpayable","type":"function","name":"withdraw_admin_fees","inputs":[],"outputs":[],"gas":36554},{"stateMutability":"nonpayable","type":"function","name":"donate_admin_fees","inputs":[],"outputs":[],"gas":82682},{"stateMutability":"nonpayable","type":"function","name":"kill_me","inputs":[],"outputs":[],"gas":40295},{"stateMutability":"nonpayable","type":"function","name":"unkill_me","inputs":[],"outputs":[],"gas":23132},{"stateMutability":"view","type":"function","name":"coins","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"address"}],"gas":3217},{"stateMutability":"view","type":"function","name":"balances","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":3247},{"stateMutability":"view","type":"function","name":"fee","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3168},{"stateMutability":"view","type":"function","name":"admin_fee","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3198},{"stateMutability":"view","type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3228},{"stateMutability":"view","type":"function","name":"lp_token","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3258},{"stateMutability":"view","type":"function","name":"initial_A","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3288},{"stateMutability":"view","type":"function","name":"future_A","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3318},{"stateMutability":"view","type":"function","name":"initial_A_time","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3348},{"stateMutability":"view","type":"function","name":"future_A_time","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3378},{"stateMutability":"view","type":"function","name":"admin_actions_deadline","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3408},{"stateMutability":"view","type":"function","name":"transfer_ownership_deadline","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3438},{"stateMutability":"view","type":"function","name":"future_fee","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3468},{"stateMutability":"view","type":"function","name":"future_admin_fee","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3498},{"stateMutability":"view","type":"function","name":"future_owner","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3528}]

60e06147ef6101403960206147ef60c03960c05160a01c1561002057600080fd5b602060206147ef0160c03960c05160a01c1561003b57600080fd5b602060406147ef0160c03960c05160a01c1561005657600080fd5b602060606147ef0160c03960c05160a01c1561007157600080fd5b61022060006002818352015b6000610160610220516002811061009357600080fd5b6020020151186100a257600080fd5b815160010180835281141561007d575b5050600060c052602060c020610160518155610180516001820155506101c051606480820282158284830414176100e857600080fd5b809050905090506006556101c0516064808202821582848304141761010c57600080fd5b809050905090506007556101e051600255610200516003556101405160045542624f1a0081818301101561013f57600080fd5b808201905090506010556101a0516005556147d756600436101561000d57613122565b600035601c52600051341561002157600080fd5b63f446c1d08114156100505760065801613128565b610140526101405160648082049050905060005260206000f35b6376a2f0f08114156100765760065801613128565b610140526101405160005260206000f35b63bb7b8b808114156101db5761014051600658016132c0565b61016052610180526101405261016080516101a05280602001516101c052506101405161016051610180516101a0516101c05160065801613128565b6101e0526101c0526101a0526101805261016052610140526101e051610200526101405161016051610180516101a0516101c0516101e051610200516101a051610220526101c051610240526102005161026052610260516102405161022051600658016134b8565b6102c052610200526101e0526101c0526101a0526101805261016052610140526102c0516101405260206101e060046318160ddd6101805261019c6005545afa61017d57600080fd5b601f3d1161018a57600080fd5b6000506101e0516101605261014051670de0b6b3a764000080820282158284830414176101b657600080fd5b809050905090506101605180806101cc57600080fd5b82049050905060005260206000f35b63ed8e84f381141561047e5760443560011c156101f757600080fd5b6101405160065801613128565b6101605261014052610160516101405260018060c052602060c020546101605260018160c052602060c020015461018052506101405161016051610180516101a051610160516101c052610180516101e0526101405161020052610200516101e0516101c051600658016137b2565b610260526101a052610180526101605261014052610260516101a0526101c060006002818352015b604435156102f3576101606101c051600281106102b757600080fd5b60200201805160046101c051600281106102d057600080fd5b60200201358181830110156102e457600080fd5b8082019050905081525061033d565b6101606101c0516002811061030757600080fd5b60200201805160046101c0516002811061032057600080fd5b60200201358082101561033257600080fd5b808203905090508152505b815160010180835281141561029b575b50506101405161016051610180516101a0516101c051610160516101e0526101805161020052610140516102205261022051610200516101e051600658016137b2565b610280526101c0526101a052610180526101605261014052610280516101c052602061026060046318160ddd6102005261021c6005545afa6103d157600080fd5b601f3d116103de57600080fd5b600050610260516101e0526000610200526044351561041c576101c0516101a0518082101561040c57600080fd5b808203905090506102005261043d565b6101a0516101c0518082101561043157600080fd5b80820390509050610200525b610200516101e051808202821582848304141761045957600080fd5b809050905090506101a051808061046f57600080fd5b82049050905060005260206000f35b630b4c7e4d811415610cd9576011541561049757600080fd5b6001601155600f54156104a957600080fd5b6101405160065801613128565b6101605261014052610160516101405260018060c052602060c020546101605260018160c052602060c020015461018052506101405161016051610180516101a051610160516101c052610180516101e0526101405161020052610200516101e0516101c051600658016137b2565b610260526101a052610180526101605261014052610260516101a0526005546101c052602061026060046318160ddd6102005261021c6101c0515afa61056a57600080fd5b601f3d1161057757600080fd5b600050610260516101e0526101605161020052610180516102205261024060006002818352015b6101e05115156105cc576000600461024051600281106105bd57600080fd5b6020020135116105cc57600080fd5b61020061024051600281106105e057600080fd5b602002018051600461024051600281106105f957600080fd5b602002013581818301101561060d57600080fd5b808201905090508152505b815160010180835281141561059e575b50506101405161016051610180516101a0516101c0516101e05161020051610220516102405161020051610260526102205161028052610140516102a0526102a0516102805161026051600658016137b2565b610300526102405261022052610200526101e0526101c0526101a05261018052610160526101405261030051610240526101a05161024051116106bd57600080fd5b61024051610260526060366102803760006101e05111156109e757600254600280820282158284830414176106f157600080fd5b809050905090506004808204905090506102e0526003546103005261032060006002818352015b61024051610160610320516002811061073057600080fd5b6020020151808202821582848304141761074957600080fd5b809050905090506101a051808061075f57600080fd5b82049050905061034052600061036052610200610320516002811061078357600080fd5b602002015161038052610380516103405111156107bf576103405161038051808210156107af57600080fd5b80820390509050610360526107e0565b6103805161034051808210156107d457600080fd5b80820390509050610360525b6102e0516103605180820282158284830414176107fc57600080fd5b809050905090506402540be40080820490509050610280610320516002811061082457600080fd5b602002015261038051610280610320516002811061084157600080fd5b602002015161030051808202821582848304141761085e57600080fd5b809050905090506402540be400808204905090508082101561087f57600080fd5b80820390509050610320516002811061089757600080fd5b600160c052602060c020015561020061032051600281106108b757600080fd5b60200201805161028061032051600281106108d157600080fd5b6020020151808210156108e357600080fd5b808203905090508152505b8151600101808352811415610718575b5050610140610320525b6103205151602061032051016103205261032061032051101561092a57610908565b610200516103405261022051610360526101405161038052610380516103605161034051600658016137b2565b6103e052610300610320525b610320515260206103205103610320526101406103205110151561098657610963565b6103e051610260526101e051610260516101a051808210156109a757600080fd5b8082039050905080820282158284830414176109c257600080fd5b809050905090506101a05180806109d857600080fd5b8204905090506102c052610a0a565b600160c052602060c02061020051815561022051600182015550610240516102c0525b6044356102c05110151515610a5e576308c379a06102e0526020610300526014610320527f536c697070616765207363726577656420796f75000000000000000000000000610340526103205060646102fcfd5b6102e060006002818352015b600060046102e05160028110610a7f57600080fd5b60200201351115610c065760006004610360527f23b872dd00000000000000000000000000000000000000000000000000000000610380526103606004806020846103c001018260208501600060045af1505080518201915050336020826103c0010152602081019050306020826103c001015260208101905060046102e05160028110610b0c57600080fd5b60200201356020826103c0010152602081019050806103c0526103c090508051602001806104808284600060045af1610b4457600080fd5b50506020610560610480516104a060006102e05160028110610b6557600080fd5b600060c052602060c02001545af1610b7c57600080fd5b60203d80821115610b8d5780610b8f565b815b90509050610540526105408051602001806103008284600060045af1610bb457600080fd5b50506000610300511115610c0657610300806020015160008251806020901315610bdd57600080fd5b8091901215610beb57600080fd5b806020036101000a82049050905090501515610c0657600080fd5b8151600101808352811415610a6a575b5050602061038060446340c10f196102e05233610300526102c051610320526102fc60006101c0515af1610c4957600080fd5b601f3d11610c5657600080fd5b60005061038050604060046102e03761028051610320526102a0516103405261024051610360526101e0516102c051818183011015610c9457600080fd5b8082019050905061038052337f26f55a85081d24974e85c6c00045d0f0453991e95873f52bff0d21af4079a76860c06102e0a26102c051600052600060115560206000f35b635e0d443f811415610f5b5760043580806000811215610cf557195b607f1c15610d0257600080fd5b90505060243580806000811215610d1557195b607f1c15610d2257600080fd5b9050506101405161016051600658016132c0565b610180526101a0526101605261014052610180805161014052806020015161016052506b204fce5e3e25026110000000610180526b204fce5e3e250261100000006101a05261014060043560028110610d8e57600080fd5b602002015160443561018060043560028110610da957600080fd5b60200201518082028215828483041417610dc257600080fd5b80905090509050670de0b6b3a764000080820490509050818183011015610de857600080fd5b808201905090506101c0526101405161016051610180516101a0516101c0516101e05160406004610200376101c05161024052610140516102605261016051610280526102805161026051610240516102205161020051600658016138bf565b6102e0526101e0526101c0526101a0526101805261016052610140526102e0516101e05261014060243560028110610e7f57600080fd5b60200201516101e05180821015610e9557600080fd5b80820390509050600180821015610eab57600080fd5b8082039050905061020052600254610200518082028215828483041417610ed157600080fd5b809050905090506402540be4008082049050905061022052610200516102205180821015610efe57600080fd5b80820390509050670de0b6b3a76400008082028215828483041417610f2257600080fd5b8090509050905061018060243560028110610f3c57600080fd5b60200201518080610f4c57600080fd5b82049050905060005260206000f35b633df021248114156117175760115415610f7457600080fd5b600160115560043580806000811215610f8957195b607f1c15610f9657600080fd5b90505060243580806000811215610fa957195b607f1c15610fb657600080fd5b905050600f5415610fc657600080fd5b60018060c052602060c020546101405260018160c052602060c020015461016052506101405161016051610180516101a051610140516101c052610160516101e0526101e0516101c051600658016133ba565b61024052610260526101a05261018052610160526101405261024080516101805280602001516101a052506b204fce5e3e250261100000006101c0526b204fce5e3e250261100000006101e0526101806004356002811061107957600080fd5b60200201516044356101c06004356002811061109457600080fd5b602002015180820282158284830414176110ad57600080fd5b80905090509050670de0b6b3a7640000808204905090508181830110156110d357600080fd5b80820190509050610200526101405161016051610180516101a0516101c0516101e051610200516102205160406004610240376102005161028052610180516102a0526101a0516102c0526102c0516102a051610280516102605161024051600658016138bf565b6103205261022052610200526101e0526101c0526101a05261018052610160526101405261032051610220526101806024356002811061117a57600080fd5b6020020151610220518082101561119057600080fd5b808203905090506001808210156111a657600080fd5b80820390509050610240526102405160025480820282158284830414176111cc57600080fd5b809050905090506402540be40080820490509050610260526102405161026051808210156111f957600080fd5b80820390509050670de0b6b3a7640000808202821582848304141761121d57600080fd5b809050905090506101c06024356002811061123757600080fd5b6020020151808061124757600080fd5b8204905090506102405260643561024051101515156112ca576308c379a06102805260206102a052602e6102c0527f45786368616e676520726573756c74656420696e20666577657220636f696e736102e0527f207468616e206578706563746564000000000000000000000000000000000000610300526102c050608461029cfd5b6102605160035480820282158284830414176112e557600080fd5b809050905090506402540be400808204905090506102805261028051670de0b6b3a7640000808202821582848304141761131e57600080fd5b809050905090506101c06024356002811061133857600080fd5b6020020151808061134857600080fd5b820490509050610280526101406004356002811061136557600080fd5b602002015160443581818301101561137c57600080fd5b808201905090506004356002811061139357600080fd5b600160c052602060c0200155610140602435600281106113b257600080fd5b602002015161024051808210156113c857600080fd5b8082039050905061028051808210156113e057600080fd5b80820390509050602435600281106113f757600080fd5b600160c052602060c020015560006004610300527f23b872dd000000000000000000000000000000000000000000000000000000006103205261030060048060208461036001018260208501600060045af15050805182019150503360208261036001015260208101905030602082610360010152602081019050604435602082610360010152602081019050806103605261036090508051602001806104208284600060045af16114a857600080fd5b50506020610500610420516104406000600435600281106114c857600080fd5b600060c052602060c02001545af16114df57600080fd5b60203d808211156114f057806114f2565b815b905090506104e0526104e08051602001806102a08284600060045af161151757600080fd5b505060006102a0511115611569576102a080602001516000825180602090131561154057600080fd5b809190121561154e57600080fd5b806020036101000a8204905090509050151561156957600080fd5b60006004610300527fa9059cbb000000000000000000000000000000000000000000000000000000006103205261030060048060208461036001018260208501600060045af15050805182019150503360208261036001015260208101905061024051602082610360010152602081019050806103605261036090508051602001806104008284600060045af16115ff57600080fd5b505060206104c06104005161042060006024356002811061161f57600080fd5b600060c052602060c02001545af161163657600080fd5b60203d808211156116475780611649565b815b905090506104a0526104a08051602001806102a08284600060045af161166e57600080fd5b505060006102a05111156116c0576102a080602001516000825180602090131561169757600080fd5b80919012156116a557600080fd5b806020036101000a820490509050905015156116c057600080fd5b6004356103005260443561032052602435610340526102405161036052337f8b3e96f2b889fa771c53c981b40daf005f63f637f1869f707052d15a3dd971406080610300a261024051600052600060115560206000f35b635b36389c811415611ae1576011541561173057600080fd5b60016011556005546101405260206101e060046318160ddd6101805261019c610140515afa61175e57600080fd5b601f3d1161176b57600080fd5b6000506101e05161016052604036610180376101c060006002818352015b6101c0516002811061179a57600080fd5b600160c052602060c02001546101e0526101e05160043580820282158284830414176117c557600080fd5b809050905090506101605180806117db57600080fd5b8204905090506102005260246101c051600281106117f857600080fd5b60200201356102005110151515611873576308c379a0610220526020610240526030610260527f5769746864726177616c20726573756c74656420696e20666577657220636f69610280527f6e73207468616e206578706563746564000000000000000000000000000000006102a05261026050608461023cfd5b6101e051610200518082101561188857600080fd5b808203905090506101c051600281106118a057600080fd5b600160c052602060c0200155610200516101806101c051600281106118c457600080fd5b602002015260006004610280527fa9059cbb000000000000000000000000000000000000000000000000000000006102a0526102806004806020846102e001018260208501600060045af1505080518201915050336020826102e0010152602081019050610200516020826102e0010152602081019050806102e0526102e090508051602001806103808284600060045af161195f57600080fd5b50506020610440610380516103a060006101c0516002811061198057600080fd5b600060c052602060c02001545af161199757600080fd5b60203d808211156119a857806119aa565b815b90509050610420526104208051602001806102208284600060045af16119cf57600080fd5b50506000610220511115611a21576102208060200151600082518060209013156119f857600080fd5b8091901215611a0657600080fd5b806020036101000a82049050905090501515611a2157600080fd5b8151600101808352811415611789575b5050602061026060446379cc67906101c052336101e052600435610200526101dc6000610140515af1611a6357600080fd5b601f3d11611a7057600080fd5b60005061026050610180516101c0526101a0516101e052604036610200376101605160043580821015611aa257600080fd5b8082039050905061024052337f7c363854ccf79623411f8995b362bce5eddff18c927edc6f5dbbb5e05819a82c60a06101c0a260006011556040610180f35b63e31032738114156122d75760115415611afa57600080fd5b6001601155600f5415611b0c57600080fd5b6101405160065801613128565b6101605261014052610160516101405260018060c052602060c020546101605260018160c052602060c020015461018052506101405161016051610180516101a051610160516101c052610180516101e0526101405161020052610200516101e0516101c051600658016137b2565b610260526101a052610180526101605261014052610260516101a052610160516101c052610180516101e05261020060006002818352015b6101c06102005160028110611bd457600080fd5b60200201805160046102005160028110611bed57600080fd5b602002013580821015611bff57600080fd5b808203905090508152505b8151600101808352811415611bc0575b50506101405161016051610180516101a0516101c0516101e051610200516101c051610220526101e051610240526101405161026052610260516102405161022051600658016137b2565b6102c052610200526101e0526101c0526101a0526101805261016052610140526102c0516102005260025460028082028215828483041417611ca657600080fd5b809050905090506004808204905090506102205260035461024052604036610260376102a060006002818352015b6101c06102a05160028110611ce857600080fd5b60200201516102c052610200516101606102a05160028110611d0957600080fd5b60200201518082028215828483041417611d2257600080fd5b809050905090506101a0518080611d3857600080fd5b8204905090506102e0526000610300526102c0516102e0511115611d7b576102e0516102c05180821015611d6b57600080fd5b8082039050905061030052611d9c565b6102c0516102e05180821015611d9057600080fd5b80820390509050610300525b61022051610300518082028215828483041417611db857600080fd5b809050905090506402540be400808204905090506102606102a05160028110611de057600080fd5b60200201526102c0516102606102a05160028110611dfd57600080fd5b6020020151610240518082028215828483041417611e1a57600080fd5b809050905090506402540be4008082049050905080821015611e3b57600080fd5b808203905090506102a05160028110611e5357600080fd5b600160c052602060c02001556102c0516102606102a05160028110611e7757600080fd5b602002015180821015611e8957600080fd5b808203905090506101c06102a05160028110611ea457600080fd5b60200201525b8151600101808352811415611cd4575b50506101405161016051610180516101a0516101c0516101e05161020051610220516102405161026051610280516102a0516101c0516102c0526101e0516102e0526101405161030052610300516102e0516102c051600658016137b2565b610360526102a05261028052610260526102405261022052610200526101e0526101c0526101a052610180526101605261014052610360516102a0526005546102c052602061036060046318160ddd6103005261031c6102c0515afa611f7e57600080fd5b601f3d11611f8b57600080fd5b600050610360516102e0526101a0516102a05180821015611fab57600080fd5b808203905090506102e0518082028215828483041417611fca57600080fd5b809050905090506101a0518080611fe057600080fd5b8204905090506103005260006103005118611ffa57600080fd5b6103008051600181818301101561201057600080fd5b80820190509050815250604435610300511115151561206e576308c379a0610320526020610340526014610360527f536c697070616765207363726577656420796f750000000000000000000000006103805261036050606461033cfd5b60206103c060446379cc6790610320523361034052610300516103605261033c60006102c0515af161209f57600080fd5b601f3d116120ac57600080fd5b6000506103c05061032060006002818352015b6000600461032051600281106120d457600080fd5b6020020135181561224b57600060046103a0527fa9059cbb000000000000000000000000000000000000000000000000000000006103c0526103a060048060208461040001018260208501600060045af1505080518201915050336020826104000101526020810190506004610320516002811061215157600080fd5b6020020135602082610400010152602081019050806104005261040090508051602001806104a08284600060045af161218957600080fd5b505060206105606104a0516104c0600061032051600281106121aa57600080fd5b600060c052602060c02001545af16121c157600080fd5b60203d808211156121d257806121d4565b815b90509050610540526105408051602001806103408284600060045af16121f957600080fd5b5050600061034051111561224b5761034080602001516000825180602090131561222257600080fd5b809190121561223057600080fd5b806020036101000a8204905090509050151561224b57600080fd5b81516001018083528114156120bf575b5050604060046103203761026051610360526102805161038052610200516103a0526102e051610300518082101561229257600080fd5b808203905090506103c052337f2b5508378d7e19e0d5fa338419034731416c4f5b219a10379956f764317fd47e60c0610320a261030051600052600060115560206000f35b63cc2b27d781141561236b57602435808060008112156122f357195b607f1c1561230057600080fd5b9050506004356101405260243561016052610160516101405160065801614093565b6101c0526101e052610200526101c08080808051610220525050602081019050808080516102405250506020810190508080805161026052505050506102205160005260206000f35b631a4d01d281141561271f576011541561238457600080fd5b60016011556024358080600081121561239957195b607f1c156123a657600080fd5b905050600f54156123b657600080fd5b606036610140376101405161016051610180516004356101a0526024356101c0526101c0516101a05160065801614093565b6102205261024052610260526101805261016052610140526102208080808051610280525050602081019050808080516102a0525050602081019050808080516102c052505050506102808051610140528060200151610160528060400151610180525060443561014051101515156124a0576308c379a06101a05260206101c05260186101e0527f4e6f7420656e6f75676820636f696e732072656d6f7665640000000000000000610200526101e05060646101bcfd5b602435600281106124b057600080fd5b600160c052602060c020018054610140516101605160035480820282158284830414176124dc57600080fd5b809050905090506402540be400808204905090508181830110156124ff57600080fd5b808201905090508082101561251357600080fd5b80820390509050815550602061024060446379cc67906101a052336101c0526004356101e0526101bc60006005545af161254c57600080fd5b601f3d1161255957600080fd5b6000506102405060006004610200527fa9059cbb000000000000000000000000000000000000000000000000000000006102205261020060048060208461026001018260208501600060045af15050805182019150503360208261026001015260208101905061014051602082610260010152602081019050806102605261026090508051602001806103008284600060045af16125f657600080fd5b505060206103c06103005161032060006024356002811061261657600080fd5b600060c052602060c02001545af161262d57600080fd5b60203d8082111561263e5780612640565b815b905090506103a0526103a08051602001806101a08284600060045af161266557600080fd5b505060006101a05111156126b7576101a080602001516000825180602090131561268e57600080fd5b809190121561269c57600080fd5b806020036101000a820490509050905015156126b757600080fd5b60043561020052610140516102205261018051600435808210156126da57600080fd5b8082039050905061024052337f5ad056f2e28a8cec232015406b843668c1e36cda598127ec3b8c59b8c72773a06060610200a261014051600052600060115560206000f35b633c157e648114156128c057600454331461273957600080fd5b6008546201518081818301101561274f57600080fd5b8082019050905042101561276257600080fd5b426201518081818301101561277657600080fd5b80820190509050602435101561278b57600080fd5b6101405160065801613128565b61016052610140526101605161014052600435606480820282158284830414176127c157600080fd5b8090509050905061016052600060043511156127e457620f4240600435106127e7565b60005b6127f057600080fd5b61014051610160511015612833576101405161016051600a808202821582848304141761281c57600080fd5b80905090509050101561282e57600080fd5b612863565b61014051600a808202821582848304141761284d57600080fd5b8090509050905061016051111561286357600080fd5b6101405160065561016051600755426008556024356009556101405161018052610160516101a052426101c0526024356101e0527fa2b71ec6df949300b59aab36b55e189697b750119dd349fcfa8c0f779e83c2546080610180a1005b63551a65888114156129435760045433146128da57600080fd5b6101405160065801613128565b6101605261014052610160516101405261014051600655610140516007554260085542600955610140516101605242610180527f46e22fb3709ad289f62ce63d469248536dbc78d82b84a3d7e74ad606dc2019386040610160a1005b635b5a14678114156129ff57600454331461295d57600080fd5b600a541561296a57600080fd5b64012a05f200600435111561297e57600080fd5b6402540be400602435111561299257600080fd5b426203f4808181830110156129a657600080fd5b808201905090506101405261014051600a55600435600c55602435600d556004356101605260243561018052610140517f351fc5da2fbf480f2225debf3664a4bc90fa9923743aad58b4603f648e931fe06040610160a2005b634f12fe97811415612a91576004543314612a1957600080fd5b600a54421015612a2857600080fd5b6000600a5418612a3757600080fd5b6000600a55600c5461014052600d546101605261014051600255610160516003556101405161018052610160516101a0527fbe12859b636aed607d5230b2cc2711f68d70e51060e6cca1f575ef5d2fcc95d16040610180a1005b63226840fb811415612ab2576004543314612aab57600080fd5b6000600a55005b636b441a40811415612b445760043560a01c15612ace57600080fd5b6004543314612adc57600080fd5b600b5415612ae957600080fd5b426203f480818183011015612afd57600080fd5b808201905090506101405261014051600b55600435600e55600435610140517f181aa3aa17d4cbf99265dd4443eba009433d3cde79d60164fde1d1a192beb93560006000a3005b636a1c05ae811415612bbb576004543314612b5e57600080fd5b600b54421015612b6d57600080fd5b6000600b5418612b7c57600080fd5b6000600b55600e546101405261014051600455610140517f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c60006000a2005b6386fbf193811415612bdc576004543314612bd557600080fd5b6000600b55005b63e2e7d264811415612c745760206101c060246370a0823161014052306101605261015c60043560028110612c1057600080fd5b600060c052602060c02001545afa612c2757600080fd5b601f3d11612c3457600080fd5b6000506101c05160043560028110612c4b57600080fd5b600160c052602060c020015480821015612c6457600080fd5b8082039050905060005260206000f35b6330c54085811415612e8a576004543314612c8e57600080fd5b61014060006002818352015b6101405160028110612cab57600080fd5b600060c052602060c020015461016052602061022060246370a082316101a052306101c0526101bc610160515afa612ce257600080fd5b601f3d11612cef57600080fd5b600050610220516101405160028110612d0757600080fd5b600160c052602060c020015480821015612d2057600080fd5b80820390509050610180526000610180511115612e765760006004610200527fa9059cbb000000000000000000000000000000000000000000000000000000006102205261020060048060208461026001018260208501600060045af15050805182019150503360208261026001015260208101905061018051602082610260010152602081019050806102605261026090508051602001806103008284600060045af1612dcd57600080fd5b505060206103c0610300516103206000610160515af1612dec57600080fd5b60203d80821115612dfd5780612dff565b815b905090506103a0526103a08051602001806101a08284600060045af1612e2457600080fd5b505060006101a0511115612e76576101a0806020015160008251806020901315612e4d57600080fd5b8091901215612e5b57600080fd5b806020036101000a82049050905090501515612e7657600080fd5b8151600101808352811415612c9a575b5050005b63524c3901811415612f36576004543314612ea457600080fd5b61014060006002818352015b60206101e060246370a0823161016052306101805261017c6101405160028110612ed957600080fd5b600060c052602060c02001545afa612ef057600080fd5b601f3d11612efd57600080fd5b6000506101e0516101405160028110612f1557600080fd5b600160c052602060c02001555b8151600101808352811415612eb0575b5050005b63e3698853811415612f65576004543314612f5057600080fd5b4260105411612f5e57600080fd5b6001600f55005b633046f972811415612f86576004543314612f7f57600080fd5b6000600f55005b63c6610657811415612fb75760043560028110612fa257600080fd5b600060c052602060c020015460005260206000f35b634903b0d1811415612fe85760043560028110612fd357600080fd5b600160c052602060c020015460005260206000f35b63ddca3f438114156130005760025460005260206000f35b63fee3f7f98114156130185760035460005260206000f35b638da5cb5b8114156130305760045460005260206000f35b6382c630668114156130485760055460005260206000f35b635409491a8114156130605760065460005260206000f35b63b4b577ad8114156130785760075460005260206000f35b632081066c8114156130905760085460005260206000f35b63140522888114156130a85760095460005260206000f35b63405e28f88114156130c057600a5460005260206000f35b63e0a0b5868114156130d857600b5460005260206000f35b6358680d0b8114156130f057600c5460005260206000f35b63e382446281141561310857600d5460005260206000f35b631ec0cdc181141561312057600e5460005260206000f35b505b60006000fd5b610140526009546101605260075461018052610160514210156132ae576006546101a0526008546101c0526101a051610180511115613208576101a051610180516101a0518082101561317a57600080fd5b80820390509050426101c0518082101561319357600080fd5b8082039050905080820282158284830414176131ae57600080fd5b80905090509050610160516101c051808210156131ca57600080fd5b8082039050905080806131dc57600080fd5b8204905090508181830110156131f157600080fd5b8082019050905060005260005161014051566132a9565b6101a0516101a051610180518082101561322157600080fd5b80820390509050426101c0518082101561323a57600080fd5b80820390509050808202821582848304141761325557600080fd5b80905090509050610160516101c0518082101561327157600080fd5b80820390509050808061328357600080fd5b8204905090508082101561329657600080fd5b8082039050905060005260005161014051565b6132be565b6101805160005260005161014051565b005b610140526b204fce5e3e25026110000000610160526b204fce5e3e25026110000000610180526101a060006002818352015b6101606101a0516002811061330657600080fd5b60200201516101a0516002811061331c57600080fd5b600160c052602060c0200154808202821582848304141761333c57600080fd5b80905090509050670de0b6b3a7640000808204905090506101606101a0516002811061336757600080fd5b60200201525b81516001018083528114156132f2575b505060406101a0525b60006101a051111515613398576133b4565b60206101a05103610160015160206101a051036101a052613386565b61014051565b6101805261014052610160526b204fce5e3e250261100000006101a0526b204fce5e3e250261100000006101c0526101e060006002818352015b6101a06101e0516002811061340857600080fd5b60200201516101406101e0516002811061342157600080fd5b6020020151808202821582848304141761343a57600080fd5b80905090509050670de0b6b3a7640000808204905090506101a06101e0516002811061346557600080fd5b60200201525b81516001018083528114156133f4575b505060406101e0525b60006101e051111515613496576134b2565b60206101e051036101a0015160206101e051036101e052613484565b61018051565b6101a0526101405261016052610180526040366101c03761022060006002818352015b602061022051026101400151610200526101c080516102005181818301101561350357600080fd5b808201905090508152505b81516001018083528114156134db575b50506101c05115156135385760006000526000516101a051565b6101c05161020052610180516002808202821582848304141761355a57600080fd5b8090509050905061022052610240600060ff818352015b61020051610260526102a060006002818352015b60206102a05102610140015161028052610260516102005180820282158284830414176135b157600080fd5b8090509050905061028051600280820282158284830414176135d257600080fd5b8090509050905080806135e457600080fd5b820490509050610260525b8151600101808352811415613585575b5050610200516101e052610220516101c051808202821582848304141761362557600080fd5b80905090509050606480820490509050610260516002808202821582848304141761364f57600080fd5b8090509050905081818301101561366557600080fd5b8082019050905061020051808202821582848304141761368457600080fd5b809050905090506102205160648082101561369e57600080fd5b808203905090506102005180820282158284830414176136bd57600080fd5b8090509050905060648082049050905060036102605180820282158284830414176136e757600080fd5b809050905090508181830110156136fd57600080fd5b80820190509050808061370f57600080fd5b820490509050610200526101e051610200511115613763576001610200516101e0518082101561373e57600080fd5b8082039050905011151561375e576102005160005250506000516101a051565b61379a565b60016101e051610200518082101561377a57600080fd5b8082039050905011151561379a576102005160005250506000516101a051565b8151600101808352811415613571575b505060006000fd5b6101a0526101405261016052610180526101405161016051610180516101a051610140516101c052610160516101e0526101e0516101c051600658016133ba565b61024052610260526101a05261018052610160526101405261024080516102805280602001516102a052506101405161016051610180516101a0516101c0516101e05161020051610220516102405161026051610280516102a051610280516102c0526102a0516102e0526101805161030052610300516102e0516102c051600658016134b8565b610360526102a05261028052610260526102405261022052610200526101e0526101c0526101a052610180526101605261014052610360516000526000516101a051565b6101e0526101405261016052610180526101a0526101c0526101605161014051186138e957600080fd5b60006101605112156138fa57600080fd5b6002610160511261390a57600080fd5b600061014051121561391b57600080fd5b6002610140511261392b57600080fd5b6101405161016051610180516101a0516101c0516101e0516102005160065801613128565b61022052610200526101e0526101c0526101a05261018052610160526101405261022051610200526101405161016051610180516101a0516101c0516101e05161020051610220516101a051610240526101c051610260526102005161028052610280516102605161024051600658016134b8565b6102e05261022052610200526101e0526101c0526101a0526101805261016052610140526102e051610220526102005160028082028215828483041417613a0b57600080fd5b80905090509050610240526102205161026052606036610280376102e060006002818352015b610140516102e0511415613a4c57610180516102a052613a81565b610160516102e0511815613a7c576101a06102e05160028110613a6e57600080fd5b60200201516102a052613a81565b613afd565b61028080516102a051818183011015613a9957600080fd5b8082019050905081525061026051610220518082028215828483041417613abf57600080fd5b809050905090506102a05160028082028215828483041417613ae057600080fd5b809050905090508080613af257600080fd5b820490509050610260525b8151600101808352811415613a31575b505061026051610220518082028215828483041417613b2b57600080fd5b8090509050905060648082028215828483041417613b4857600080fd5b809050905090506102405160028082028215828483041417613b6957600080fd5b809050905090508080613b7b57600080fd5b82049050905061026052610280516102205160648082028215828483041417613ba357600080fd5b80905090509050610240518080613bb957600080fd5b820490509050818183011015613bce57600080fd5b808201905090506102e0526102205161030052610320600060ff818352015b610300516102c05261030051610300518082028215828483041417613c1157600080fd5b8090509050905061026051818183011015613c2b57600080fd5b808201905090506002610300518082028215828483041417613c4c57600080fd5b809050905090506102e051818183011015613c6657600080fd5b808201905090506102205180821015613c7e57600080fd5b808203905090508080613c9057600080fd5b820490509050610300526102c051610300511115613ce4576001610300516102c05180821015613cbf57600080fd5b80820390509050111515613cdf576103005160005250506000516101e051565b613d1b565b60016102c0516103005180821015613cfb57600080fd5b80820390509050111515613d1b576103005160005250506000516101e051565b8151600101808352811415613bed575b505060006000fd5b6101e0526101405261016052610180526101a0526101c0526000610160511215613d5c57600080fd5b60026101605112613d6c57600080fd5b6101405160028082028215828483041417613d8657600080fd5b80905090509050610200526101c05161022052606036610240376102a060006002818352015b610160516102a0511815613ddc576101806102a05160028110613dce57600080fd5b602002015161026052613de1565b613e5d565b610240805161026051818183011015613df957600080fd5b80820190509050815250610220516101c0518082028215828483041417613e1f57600080fd5b809050905090506102605160028082028215828483041417613e4057600080fd5b809050905090508080613e5257600080fd5b820490509050610220525b8151600101808352811415613dac575b5050610220516101c0518082028215828483041417613e8b57600080fd5b8090509050905060648082028215828483041417613ea857600080fd5b809050905090506102005160028082028215828483041417613ec957600080fd5b809050905090508080613edb57600080fd5b82049050905061022052610240516101c05160648082028215828483041417613f0357600080fd5b80905090509050610200518080613f1957600080fd5b820490509050818183011015613f2e57600080fd5b808201905090506102a0526101c0516102c0526102e0600060ff818352015b6102c051610280526102c0516102c0518082028215828483041417613f7157600080fd5b8090509050905061022051818183011015613f8b57600080fd5b8082019050905060026102c0518082028215828483041417613fac57600080fd5b809050905090506102a051818183011015613fc657600080fd5b808201905090506101c05180821015613fde57600080fd5b808203905090508080613ff057600080fd5b8204905090506102c052610280516102c05111156140445760016102c051610280518082101561401f57600080fd5b8082039050905011151561403f576102c05160005250506000516101e051565b61407b565b6001610280516102c0518082101561405b57600080fd5b8082039050905011151561407b576102c05160005250506000516101e051565b8151600101808352811415613f4d575b505060006000fd5b6101805261014052610160526101405161016051610180516101a05160065801613128565b6101c0526101a0526101805261016052610140526101c0516101a0526101405161016051610180516101a0516101c0516101e051600658016132c0565b61020052610220526101e0526101c0526101a05261018052610160526101405261020080516101c05280602001516101e052506101405161016051610180516101a0516101c0516101e051610200516101c051610220526101e051610240526101a05161026052610260516102405161022051600658016134b8565b6102c052610200526101e0526101c0526101a0526101805261016052610140526102c0516102005260206102a060046318160ddd6102405261025c6005545afa6141ba57600080fd5b601f3d116141c757600080fd5b6000506102a0516102205261020051610140516102005180820282158284830414176141f257600080fd5b8090509050905061022051808061420857600080fd5b8204905090508082101561421b57600080fd5b80820390509050610240526101405161016051610180516101a0516101c0516101e051610200516102205161024051610260516101a05161028052610160516102a0526101c0516102c0526101e0516102e0526102405161030052610300516102e0516102c0516102a0516102805160065801613d33565b61036052610260526102405261022052610200526101e0526101c0526101a05261018052610160526101405261036051610260526101c051610280526101e0516102a052600254600280820282158284830414176142f057600080fd5b809050905090506004808204905090506102c0526102e060006002818352015b600061030052610160516102e0511415614392576101c06102e0516002811061433857600080fd5b602002015161024051808202821582848304141761435557600080fd5b8090509050905061020051808061436b57600080fd5b820490509050610260518082101561438257600080fd5b8082039050905061030052614411565b6101c06102e051600281106143a657600080fd5b60200201516101c06102e051600281106143bf57600080fd5b60200201516102405180820282158284830414176143dc57600080fd5b809050905090506102005180806143f257600080fd5b8204905090508082101561440557600080fd5b80820390509050610300525b6102806102e0516002811061442557600080fd5b6020020180516102c05161030051808202821582848304141761444757600080fd5b809050905090506402540be400808204905090508082101561446857600080fd5b808203905090508152505b8151600101808352811415614310575b5050610280610160516002811061449957600080fd5b6020020151610140610300525b610300515160206103005101610300526103006103005110156144c8576144a6565b6101a05161032052610160516103405261028051610360526102a05161038052610240516103a0526103a0516103805161036051610340516103205160065801613d33565b610400526102e0610300525b610300515260206103005103610300526101406103005110151561453c57614519565b610400518082101561454d57600080fd5b808203905090506102e0526402540be400610300526402540be400610320526102e05160018082101561457f57600080fd5b80820390509050610300610160516002811061459a57600080fd5b602002015180806145aa57600080fd5b8204905090506102e0526101c061016051600281106145c857600080fd5b602002015161026051808210156145de57600080fd5b8082039050905061030061016051600281106145f957600080fd5b6020020151808061460957600080fd5b820490509050610340526103c06102e0518152610340516102e0518082101561463157600080fd5b808203905090508160200152610220518160400152506060610420525b6000610420511115156146605761467c565b602061042051036103c00151602061042051036104205261464e565b61018051565b6101556147d7036101556000396101556147d7036000f30000000000000000000000007eeac6cddbd1d0b8af061742d41877d7f707289a000000000000000000000000321162cd933e2be498cd2267a90534a804051b11000000000000000000000000dbf31df14b66535af65aac99c32e9ea844e145010000000000000000000000005b5cfe992adac0c9d48e05854b2d91c73a00385800000000000000000000000000000000000000000000000000000000000000c800000000000000000000000000000000000000000000000000000000003d0900000000000000000000000000000000000000000000000000000000012a05f200

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000007eeac6cddbd1d0b8af061742d41877d7f707289a000000000000000000000000321162cd933e2be498cd2267a90534a804051b11000000000000000000000000dbf31df14b66535af65aac99c32e9ea844e145010000000000000000000000005b5cfe992adac0c9d48e05854b2d91c73a00385800000000000000000000000000000000000000000000000000000000000000c800000000000000000000000000000000000000000000000000000000003d0900000000000000000000000000000000000000000000000000000000012a05f200

-----Decoded View---------------
Arg [0] : _owner (address): 0x7eeac6cddbd1d0b8af061742d41877d7f707289a
Arg [1] : _coins (address[2]): 0x321162cd933e2be498cd2267a90534a804051b11,0xdbf31df14b66535af65aac99c32e9ea844e14501
Arg [2] : _pool_token (address): 0x5b5cfe992adac0c9d48e05854b2d91c73a003858
Arg [3] : _A (uint256): 200
Arg [4] : _fee (uint256): 4000000
Arg [5] : _admin_fee (uint256): 5000000000

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000007eeac6cddbd1d0b8af061742d41877d7f707289a
Arg [1] : 000000000000000000000000321162cd933e2be498cd2267a90534a804051b11
Arg [2] : 000000000000000000000000dbf31df14b66535af65aac99c32e9ea844e14501
Arg [3] : 0000000000000000000000005b5cfe992adac0c9d48e05854b2d91c73a003858
Arg [4] : 00000000000000000000000000000000000000000000000000000000000000c8
Arg [5] : 00000000000000000000000000000000000000000000000000000000003d0900
Arg [6] : 000000000000000000000000000000000000000000000000000000012a05f200


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.