ETH Price: $3,762.29 (-2.28%)

Contract

0xf6841C27fe35ED7069189aFD5b81513578AFD7FF

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CurveStableSwapNGViews

Compiler Version
vyper:0.3.10

Optimization Enabled:
N/A

Other Settings:
default evmVersion, None license

Contract Source Code (Vyper language format)

# pragma version 0.3.10
# pragma evm-version paris
"""
@title CurveStableSwapNGViews
@author Curve.Fi
@license Copyright (c) Curve.Fi, 2020-2023 - all rights reserved
@notice Auxiliary contract for Stableswap-NG containing utility methods for
        integrators
"""

interface StableSwapNG:
    def N_COINS() -> uint256: view
    def BASE_POOL() -> address: view
    def BASE_N_COINS() -> uint256: view
    def stored_rates() -> DynArray[uint256, MAX_COINS]: view
    def balances(i: uint256) -> uint256: view
    def get_balances() -> DynArray[uint256, MAX_COINS]: view
    def fee() -> uint256: view
    def get_dy(i: int128, j: int128, dx: uint256) -> uint256: view
    def A() -> uint256: view
    def calc_withdraw_one_coin(_token_amount: uint256, i: int128) -> uint256: view
    def totalSupply() -> uint256: view
    def calc_token_amount(amounts: DynArray[uint256, MAX_COINS], deposit: bool) -> uint256: view
    def offpeg_fee_multiplier() -> uint256: view

interface StableSwap2:
    def calc_token_amount(amounts: uint256[2], deposit: bool) -> uint256: view

interface StableSwap3:
    def calc_token_amount(amounts: uint256[3], deposit: bool) -> uint256: view


A_PRECISION: constant(uint256) = 100
MAX_COINS: constant(uint256) = 8
PRECISION: constant(uint256) = 10 ** 18
FEE_DENOMINATOR: constant(uint256) = 10 ** 10


# ------------------------------ Public Getters ------------------------------


@view
@external
def get_dx(i: int128, j: int128, dy: uint256, pool: address) -> uint256:
    """
    @notice Calculate the current input dx given output dy
    @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 dy Amount of `j` being received after exchange
    @return Amount of `i` predicted
    """
    N_COINS: uint256 = StableSwapNG(pool).N_COINS()
    return self._get_dx(i, j, dy, pool, False, N_COINS)


@view
@external
def get_dy(i: int128, j: int128, dx: uint256, pool: address) -> uint256:
    """
    @notice Calculate the current output dy given input dx
    @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
    @return Amount of `j` predicted
    """
    N_COINS: uint256 = StableSwapNG(pool).N_COINS()

    rates: DynArray[uint256, MAX_COINS] = empty(DynArray[uint256, MAX_COINS])
    balances: DynArray[uint256, MAX_COINS] = empty(DynArray[uint256, MAX_COINS])
    xp: DynArray[uint256, MAX_COINS] = empty(DynArray[uint256, MAX_COINS])
    rates, balances, xp = self._get_rates_balances_xp(pool, N_COINS)

    amp: uint256 = StableSwapNG(pool).A() * A_PRECISION
    D: uint256 = self.get_D(xp, amp, N_COINS)

    x: uint256 = xp[i] + (dx * rates[i] / PRECISION)
    y: uint256 = self.get_y(i, j, x, xp, amp, D, N_COINS)
    dy: uint256 = xp[j] - y - 1

    base_fee: uint256 = StableSwapNG(pool).fee()
    fee_multiplier: uint256 = StableSwapNG(pool).offpeg_fee_multiplier()
    fee: uint256 = self._dynamic_fee((xp[i] + x) / 2, (xp[j] + y) / 2, base_fee, fee_multiplier) * dy / FEE_DENOMINATOR

    return (dy - fee) * PRECISION / rates[j]


@view
@external
def get_dx_underlying(
    i: int128,
    j: int128,
    dy: uint256,
    pool: address,
) -> uint256:

    BASE_POOL: address = StableSwapNG(pool).BASE_POOL()
    BASE_N_COINS: uint256 = StableSwapNG(pool).BASE_N_COINS()
    N_COINS: uint256 = StableSwapNG(pool).N_COINS()
    base_pool_has_static_fee: bool = self._has_static_fee(BASE_POOL)

    # CASE 1: Swap does not involve Metapool at all. In this case, we kindly ask the user
    # to use the right pool for their swaps.
    if min(i, j) > 0:
        raise "Not a Metapool Swap. Use Base pool."

    # CASE 2:
    #    1. meta token_0 of (unknown amount) > base pool lp_token
    #    2. base pool lp_token > calc_withdraw_one_coin gives dy amount of (j-1)th base coin
    # So, need to do the following calculations:
    #    1. calc_token_amounts on base pool for depositing liquidity on (j-1)th token > lp_tokens.
    #    2. get_dx on metapool for i = 0, and j = 1 (base lp token) with amt calculated in (1).
    if i == 0:
        # Calculate LP tokens that are burnt to receive dy amount of base_j tokens.
        lp_amount_burnt: uint256 = self._base_calc_token_amount(
            dy, j - 1, BASE_N_COINS, BASE_POOL, False
        )
        return self._get_dx(0, 1, lp_amount_burnt, pool, False, N_COINS)

    # CASE 3: Swap in token i-1 from base pool and swap out dy amount of token 0 (j) from metapool.
    #    1. deposit i-1 token from base pool > receive base pool lp_token
    #    2. swap base pool lp token > 0th token of the metapool
    # So, need to do the following calculations:
    #    1. get_dx on metapool with i = 0, j = 1 > gives how many base lp tokens are required for receiving
    #       dy amounts of i-1 tokens from the metapool
    #    2. We have number of lp tokens: how many i-1 base pool coins are needed to mint that many tokens?
    #       We don't have a method where user inputs lp tokens and it gives number of coins of (i-1)th token
    #       is needed to mint that many base_lp_tokens. Instead, we will use calc_withdraw_one_coin. That's
    #       close enough.
    lp_amount_required: uint256 = self._get_dx(1, 0, dy, pool, False, N_COINS)
    return StableSwapNG(BASE_POOL).calc_withdraw_one_coin(lp_amount_required, i-1)


@view
@external
def get_dy_underlying(
    i: int128,
    j: int128,
    dx: uint256,
    pool: address,
) -> uint256:
    """
    @notice Calculate the current output dy given input dx on underlying
    @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
    @return Amount of `j` predicted
    """

    N_COINS: uint256 = StableSwapNG(pool).N_COINS()
    MAX_COIN: int128 = convert(N_COINS, int128) - 1
    BASE_POOL: address = StableSwapNG(pool).BASE_POOL()

    rates: DynArray[uint256, MAX_COINS] = empty(DynArray[uint256, MAX_COINS])
    balances: DynArray[uint256, MAX_COINS] = empty(DynArray[uint256, MAX_COINS])
    xp: DynArray[uint256, MAX_COINS] = empty(DynArray[uint256, MAX_COINS])
    rates, balances, xp = self._get_rates_balances_xp(pool, N_COINS)

    x: uint256 = 0
    base_i: int128 = 0
    base_j: int128 = 0
    meta_i: int128 = 0
    meta_j: int128 = 0

    if i != 0:
        base_i = i - MAX_COIN
        meta_i = 1
    if j != 0:
        base_j = j - MAX_COIN
        meta_j = 1

    if i == 0:

        x = xp[i] + dx * rates[0] / 10**18

    else:

        if j == 0:

            # i is from BasePool
            base_n_coins: uint256 = StableSwapNG(pool).BASE_N_COINS()
            x = self._base_calc_token_amount(
                dx, base_i, base_n_coins, BASE_POOL, True
            ) * rates[1] / PRECISION

            # Adding number of pool tokens
            x += xp[1]

        else:
            # If both are from the base pool
            return StableSwapNG(BASE_POOL).get_dy(base_i, base_j, dx)

    # This pool is involved only when in-pool assets are used
    amp: uint256 = StableSwapNG(pool).A() * A_PRECISION
    D: uint256 = self.get_D(xp, amp, N_COINS)
    y: uint256 = self.get_y(meta_i, meta_j, x, xp, amp, D, N_COINS)
    dy: uint256 = xp[meta_j] - y - 1

    # calculate output after subtracting dynamic fee
    base_fee: uint256 = StableSwapNG(pool).fee()
    fee_multiplier: uint256 = StableSwapNG(pool).offpeg_fee_multiplier()

    dynamic_fee: uint256 = self._dynamic_fee((xp[meta_i] + x) / 2, (xp[meta_j] + y) / 2, base_fee, fee_multiplier)
    dy = (dy - dynamic_fee * dy / FEE_DENOMINATOR)

    # If output is going via the metapool
    if j == 0:
        dy = dy * 10**18 / rates[0]
    else:
        # j is from BasePool
        # The fee is already accounted for
        dy = StableSwapNG(BASE_POOL).calc_withdraw_one_coin(dy * PRECISION / rates[1], base_j)

    return dy


@view
@external
def calc_token_amount(
    _amounts: DynArray[uint256, MAX_COINS],
    _is_deposit: bool,
    pool: address
) -> uint256:
    """
    @notice Calculate addition or reduction in token supply from a deposit or withdrawal
    @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 = StableSwapNG(pool).A() * A_PRECISION
    N_COINS: uint256 = StableSwapNG(pool).N_COINS()

    rates: DynArray[uint256, MAX_COINS] = empty(DynArray[uint256, MAX_COINS])
    old_balances: DynArray[uint256, MAX_COINS] = empty(DynArray[uint256, MAX_COINS])
    xp: DynArray[uint256, MAX_COINS] = empty(DynArray[uint256, MAX_COINS])
    rates, old_balances, xp = self._get_rates_balances_xp(pool, N_COINS)

    # Initial invariant
    D0: uint256 = self.get_D(xp, amp, N_COINS)

    total_supply: uint256 = StableSwapNG(pool).totalSupply()
    new_balances: DynArray[uint256, MAX_COINS] = old_balances
    for i in range(MAX_COINS):
        if i == N_COINS:
            break

        amount: uint256 = _amounts[i]
        if _is_deposit:
            new_balances[i] += amount
        else:
            new_balances[i] -= amount

    # Invariant after change
    for idx in range(MAX_COINS):
        if idx == N_COINS:
            break
        xp[idx] = rates[idx] * new_balances[idx] / PRECISION
    D1: uint256 = self.get_D(xp, amp, N_COINS)

    # We need to recalculate the invariant accounting for fees
    # to calculate fair user's share
    D2: uint256 = D1
    if total_supply > 0:

        # Only account for fees if we are not the first to deposit
        base_fee: uint256 = StableSwapNG(pool).fee() * N_COINS / (4 * (N_COINS - 1))
        fee_multiplier: uint256 = StableSwapNG(pool).offpeg_fee_multiplier()
        _dynamic_fee_i: uint256 = 0
        xs: uint256 = 0
        ys: uint256 = (D0 + D1) / N_COINS

        for i in range(MAX_COINS):
            if i == N_COINS:
                break

            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

            xs = rates[i] * (old_balances[i] + new_balance) / PRECISION
            _dynamic_fee_i = self._dynamic_fee(xs, ys, base_fee, fee_multiplier)
            new_balances[i] -= _dynamic_fee_i * difference / FEE_DENOMINATOR

        for idx in range(MAX_COINS):
            if idx == N_COINS:
                break
            xp[idx] = rates[idx] * new_balances[idx] / PRECISION

        D2 = self.get_D(xp, amp, N_COINS)
    else:
        return D1  # Take the dust if there was any

    diff: uint256 = 0
    if _is_deposit:
        diff = D2 - D0
    else:
        diff = D0 - D2
    return diff * total_supply / D0


@view
@external
def calc_withdraw_one_coin(_burn_amount: uint256, i: int128, pool: address) -> uint256:
    # First, need to calculate
    # * Get current D
    # * Solve Eqn against y_i for D - _token_amount

    amp: uint256 = StableSwapNG(pool).A() * A_PRECISION
    N_COINS: uint256 = StableSwapNG(pool).N_COINS()

    rates: DynArray[uint256, MAX_COINS] = empty(DynArray[uint256, MAX_COINS])
    balances: DynArray[uint256, MAX_COINS] = empty(DynArray[uint256, MAX_COINS])
    xp: DynArray[uint256, MAX_COINS] = empty(DynArray[uint256, MAX_COINS])
    rates, balances, xp = self._get_rates_balances_xp(pool, N_COINS)

    D0: uint256 = self.get_D(xp, amp, N_COINS)

    total_supply: uint256 = StableSwapNG(pool).totalSupply()
    D1: uint256 = D0 - _burn_amount * D0 / total_supply
    new_y: uint256 = self.get_y_D(amp, i, xp, D1, N_COINS)
    ys: uint256 = (D0 + D1) / (2 * N_COINS)

    base_fee: uint256 = StableSwapNG(pool).fee() * N_COINS / (4 * (N_COINS - 1))
    fee_multiplier: uint256 = StableSwapNG(pool).offpeg_fee_multiplier()
    xp_reduced: DynArray[uint256, MAX_COINS] = xp
    xp_j: uint256 = 0
    xavg: uint256 = 0
    dynamic_fee: uint256 = 0

    for j in range(MAX_COINS):

        if j == N_COINS:
            break

        dx_expected: uint256 = 0
        xp_j = xp[j]
        if convert(j, int128) == i:
            dx_expected = xp_j * D1 / D0 - new_y
            xavg = (xp[j] + new_y) / 2
        else:
            dx_expected = xp_j - xp_j * D1 / D0
            xavg = xp[j]

        dynamic_fee = self._dynamic_fee(xavg, ys, base_fee, fee_multiplier)
        xp_reduced[j] = xp_j - dynamic_fee * dx_expected / FEE_DENOMINATOR

    dy: uint256 = xp_reduced[i] - self.get_y_D(amp, i, xp_reduced, D1, N_COINS)
    dy = (dy - 1) * PRECISION / rates[i]  # Withdraw less to account for rounding errors

    return dy


@view
@external
def dynamic_fee(i: int128, j: int128, pool:address) -> uint256:
    """
    @notice Return the fee for swapping between `i` and `j`
    @param i Index value for the coin to send
    @param j Index value of the coin to recieve
    @return Swap fee expressed as an integer with 1e10 precision
    """
    N_COINS: uint256 = StableSwapNG(pool).N_COINS()
    fee: uint256 = StableSwapNG(pool).fee()
    fee_multiplier: uint256 = StableSwapNG(pool).offpeg_fee_multiplier()

    rates: DynArray[uint256, MAX_COINS] = empty(DynArray[uint256, MAX_COINS])
    balances: DynArray[uint256, MAX_COINS] = empty(DynArray[uint256, MAX_COINS])
    xp: DynArray[uint256, MAX_COINS] = empty(DynArray[uint256, MAX_COINS])
    rates, balances, xp = self._get_rates_balances_xp(pool, N_COINS)

    return self._dynamic_fee(xp[i], xp[j], fee, fee_multiplier)


# ----------------------------- Utility Methods ------------------------------


@view
@internal
def _has_static_fee(pool: address) -> bool:

    success: bool = False
    response: Bytes[32] = b""
    success, response = raw_call(
        pool,
        concat(
            method_id("dynamic_fee(int128,int128)"),
            convert(1, bytes32),
            convert(0, bytes32)
        ),
        max_outsize=32,
        revert_on_failure=False,
        is_static_call=True
    )

    return success


@view
@internal
def _get_dx(
    i: int128,
    j: int128,
    dy: uint256,
    pool: address,
    static_fee: bool,
    N_COINS: uint256
) -> uint256:

    rates: DynArray[uint256, MAX_COINS] = empty(DynArray[uint256, MAX_COINS])
    balances: DynArray[uint256, MAX_COINS] = empty(DynArray[uint256, MAX_COINS])
    xp: DynArray[uint256, MAX_COINS] = empty(DynArray[uint256, MAX_COINS])
    rates, balances, xp = self._get_rates_balances_xp(pool, N_COINS)

    amp: uint256 = StableSwapNG(pool).A() * A_PRECISION
    D: uint256 = self.get_D(xp, amp, N_COINS)

    base_fee: uint256 = StableSwapNG(pool).fee()
    dy_with_fee: uint256 = dy * rates[j] / PRECISION + 1

    fee: uint256 = base_fee
    if not static_fee:
        fee_multiplier: uint256 = StableSwapNG(pool).offpeg_fee_multiplier()
        fee = self._dynamic_fee(xp[i], xp[j], base_fee, fee_multiplier)

    y: uint256 = xp[j] - dy_with_fee * FEE_DENOMINATOR / (FEE_DENOMINATOR - fee)
    x: uint256 = self.get_y(j, i, y, xp, amp, D, N_COINS)
    return (x - xp[i]) * PRECISION / rates[i]


@view
@internal
def _dynamic_fee(xpi: uint256, xpj: uint256, _fee: uint256, _fee_multiplier: uint256) -> uint256:

    if _fee_multiplier <= FEE_DENOMINATOR:
        return _fee

    xps2: uint256 = (xpi + xpj) ** 2
    return (
        (_fee_multiplier * _fee) /
        ((_fee_multiplier - FEE_DENOMINATOR) * 4 * xpi * xpj / xps2 + FEE_DENOMINATOR)
    )


@internal
@view
def _base_calc_token_amount(
    dx: uint256,
    base_i: int128,
    base_n_coins: uint256,
    base_pool: address,
    is_deposit: bool
) -> uint256:
    base_pool_is_ng: bool = raw_call(base_pool, method_id("D_ma_time()"), revert_on_failure=False, is_static_call=True)

    if base_n_coins == 2 and not base_pool_is_ng:

        base_inputs: uint256[2] = empty(uint256[2])
        base_inputs[base_i] = dx
        return StableSwap2(base_pool).calc_token_amount(base_inputs, is_deposit)

    elif base_n_coins == 3 and not base_pool_is_ng:

        base_inputs: uint256[3] = empty(uint256[3])
        base_inputs[base_i] = dx
        return StableSwap3(base_pool).calc_token_amount(base_inputs, is_deposit)

    else:

        base_inputs: DynArray[uint256, MAX_COINS] = empty(DynArray[uint256, MAX_COINS])
        for i in range(base_n_coins, bound=MAX_COINS):
            if i == convert(base_i, uint256):
                base_inputs.append(dx)
            else:
                base_inputs.append(0)
        return StableSwapNG(base_pool).calc_token_amount(base_inputs, is_deposit)


@internal
@pure
def newton_y(b: uint256, c: uint256, D: uint256, _y: uint256) -> uint256:

    y_prev: uint256 = 0
    y: uint256 = _y

    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 get_y(
    i: int128,
    j: int128,
    x: uint256,
    xp: DynArray[uint256, MAX_COINS],
    _amp: uint256,
    _D: uint256,
    N_COINS: uint256
) -> 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 < convert(N_COINS, int128)  # dev: j above N_COINS

    # should be unreachable, but good for safety
    assert i >= 0
    assert i < convert(N_COINS, int128)

    amp: uint256 = _amp
    D: uint256 = _D
    S_: uint256 = 0
    _x: uint256 = 0
    c: uint256 = D
    Ann: uint256 = amp * N_COINS

    for _i in range(MAX_COINS):

        if _i == N_COINS:
            break

        if  convert(_i, int128) == i:
            _x = x
        elif convert(_i, int128) != 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

    return self.newton_y(b, c, D, y)


@pure
@internal
def get_D(_xp: DynArray[uint256, MAX_COINS], _amp: uint256, N_COINS: 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
    for i in range(MAX_COINS):
        if i == N_COINS:
            break
        S += _xp[i]

    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
        D_P /= pow_mod256(N_COINS, N_COINS)
        Dprev: uint256 = 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


@pure
@internal
def get_y_D(
    A: uint256,
    i: int128,
    xp: DynArray[uint256, MAX_COINS],
    D: uint256,
    N_COINS: 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

    N_COINS_128: int128 = convert(N_COINS, int128)
    assert i >= 0  # dev: i below zero
    assert i < N_COINS_128  # dev: i above N_COINS

    S_: uint256 = 0
    _x: uint256 = 0
    y_prev: uint256 = 0
    c: uint256 = D
    Ann: uint256 = A * N_COINS

    for _i in range(MAX_COINS):

        if _i == N_COINS:
            break

        if _i != convert(i, uint256):
            _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

    return self.newton_y(b, c, D, y)


@view
@internal
def _get_rates_balances_xp(pool: address, N_COINS: uint256) -> (
    DynArray[uint256, MAX_COINS],
    DynArray[uint256, MAX_COINS],
    DynArray[uint256, MAX_COINS],
):

    rates: DynArray[uint256, MAX_COINS] = StableSwapNG(pool).stored_rates()
    balances: DynArray[uint256, MAX_COINS] = StableSwapNG(pool).get_balances()
    xp: DynArray[uint256, MAX_COINS] = empty(DynArray[uint256, MAX_COINS])
    for idx in range(MAX_COINS):
        if idx == N_COINS:
            break
        xp.append(rates[idx] * balances[idx] / PRECISION)

    return rates, balances, xp

Contract Security Audit

Contract ABI

[{"stateMutability":"view","type":"function","name":"get_dx","inputs":[{"name":"i","type":"int128"},{"name":"j","type":"int128"},{"name":"dy","type":"uint256"},{"name":"pool","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"get_dy","inputs":[{"name":"i","type":"int128"},{"name":"j","type":"int128"},{"name":"dx","type":"uint256"},{"name":"pool","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"get_dx_underlying","inputs":[{"name":"i","type":"int128"},{"name":"j","type":"int128"},{"name":"dy","type":"uint256"},{"name":"pool","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"get_dy_underlying","inputs":[{"name":"i","type":"int128"},{"name":"j","type":"int128"},{"name":"dx","type":"uint256"},{"name":"pool","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"calc_token_amount","inputs":[{"name":"_amounts","type":"uint256[]"},{"name":"_is_deposit","type":"bool"},{"name":"pool","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"calc_withdraw_one_coin","inputs":[{"name":"_burn_amount","type":"uint256"},{"name":"i","type":"int128"},{"name":"pool","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"dynamic_fee","inputs":[{"name":"i","type":"int128"},{"name":"j","type":"int128"},{"name":"pool","type":"address"}],"outputs":[{"name":"","type":"uint256"}]}]

612ecf61001161000039612ecf610000f360003560e01c60026007820660011b612ec101601e39600051565b6383aa796a81186100da57608436103417612ebc5760043580600f0b8118612ebc57610cc05260243580600f0b8118612ebc57610ce0526064358060a01c612ebc57610d0052610d00516329357750610d40526020610d406004610d5c845afa610089573d600060003e3d6000fd5b60203d10612ebc57610d40905051610d20526020610cc05161054052610ce0516105605260443561058052610d00516105a05260006105c052610d20516105e0526100d5610d40612621565b610d40f35b63c02c60a68118611d9157608436103417612ebc5760043580600f0b8118612ebc576105405260243580600f0b8118612ebc57610560526064358060a01c612ebc57610580526105805163293577506105c05260206105c060046105dc845afa610149573d600060003e3d6000fd5b60203d10612ebc576105c09050516105a0526105a05180607f1c612ebc576001810380600f0b8118612ebc5790506105c052610580516371511a5e610600526020610600600461061c845afa6101a4573d600060003e3d6000fd5b60203d10612ebc57610600518060a01c612ebc57610640526106409050516105e052600061060052600061072052600061084052610580516040526105a0516060526101f1610960611d97565b610960805160208160051b0180610600828560045afa5050506101208101805160208160051b0180610720828560045afa505050506102408101805160208160051b0180610840828560045afa505050505060a03661096037610540511561027757610540516105c05180820380600f0b8118612ebc57905090506109805260016109c0525b61056051156102a457610560516105c05180820380600f0b8118612ebc57905090506109a05260016109e0525b61054051610311576105405161084051811015612ebc5760051b61086001516044356106005115612ebc57600060051b6106200151808202811583838304141715612ebc5790509050670de0b6b3a764000081049050808201828110612ebc579050905061096052610441565b610560516103ed5761058051633da575a1610a20526020610a206004610a3c845afa610342573d600060003e3d6000fd5b60203d10612ebc57610a20905051610a005260443560405261098051606052610a00516080526105e05160a052600160c05261037f610a20612a3a565b610a205160026106005110612ebc57600160051b6106200151808202811583838304141715612ebc5790509050670de0b6b3a764000081049050610960526109605160026108405110612ebc57600160051b6108600151808201828110612ebc579050905061096052610441565b60206105e051635e0d443f610a005261098051610a20526109a051610a4052604435610a60526020610a006064610a1c845afa61042f573d600060003e3d6000fd5b60203d10612ebc57610a00905061077b565b6105805163f446c1d0610a20526020610a206004610a3c845afa61046a573d600060003e3d6000fd5b60203d10612ebc57610a2090505160648102816064820418612ebc579050610a00526108405160208160051b018060408261084060045afa505050610a0051610160526105a051610180526104c0610a40611f6f565b610a4051610a20526109c051610120526109e0516101405261096051610160526108405160208160051b01806101808261084060045afa505050610a00516102a052610a20516102c0526105a0516102e05261051d610a606123de565b610a6051610a40526109e05161084051811015612ebc5760051b6108600151610a4051808203828111612ebc579050905060018103818111612ebc579050610a60526105805163ddca3f43610aa0526020610aa06004610abc845afa610588573d600060003e3d6000fd5b60203d10612ebc57610aa0905051610a805261058051638edfdd5f610ac0526020610ac06004610adc845afa6105c3573d600060003e3d6000fd5b60203d10612ebc57610ac0905051610aa0526109c05161084051811015612ebc5760051b610860015161096051808201828110612ebc57905090508060011c90506040526109e05161084051811015612ebc5760051b6108600151610a4051808201828110612ebc57905090508060011c9050606052610a8051608052610aa05160a052610652610ae06121f2565b610ae051610ac052610a6051610ac051610a6051808202811583838304141715612ebc57905090506402540be40081049050808203828111612ebc5790509050610a6052610560516106e957610a6051670de0b6b3a7640000810281670de0b6b3a7640000820418612ebc5790506106005115612ebc57600060051b61062001518015612ebc5780820490509050610a6052610775565b6105e05163cc2b27d7610ae052610a6051670de0b6b3a7640000810281670de0b6b3a7640000820418612ebc57905060026106005110612ebc57600160051b61062001518015612ebc5780820490509050610b00526109a051610b20526020610ae06044610afc845afa610762573d600060003e3d6000fd5b60203d10612ebc57610ae0905051610a60525b6020610a605bf3611d91565b630c601c2c8118611d9157608436103417612ebc5760043580600f0b8118612ebc576105405260243580600f0b8118612ebc57610560526064358060a01c612ebc57610580526105805163293577506105c05260206105c060046105dc845afa6107f0573d600060003e3d6000fd5b60203d10612ebc576105c09050516105a05260006105c05260006106e052600061080052610580516040526105a05160605261082d610920611d97565b610920805160208160051b01806105c0828560045afa5050506101208101805160208160051b01806106e0828560045afa505050506102408101805160208160051b0180610800828560045afa50505050506105805163f446c1d0610940526020610940600461095c845afa6108a8573d600060003e3d6000fd5b60203d10612ebc5761094090505160648102816064820418612ebc579050610920526108005160208160051b018060408261080060045afa50505061092051610160526105a051610180526108fe610960611f6f565b61096051610940526105405161080051811015612ebc5760051b6108200151604435610540516105c051811015612ebc5760051b6105e00151808202811583838304141715612ebc5790509050670de0b6b3a764000081049050808201828110612ebc5790509050610960526105405161012052610560516101405261096051610160526108005160208160051b01806101808261080060045afa505050610920516102a052610940516102c0526105a0516102e0526109bf6109a06123de565b6109a051610980526105605161080051811015612ebc5760051b610820015161098051808203828111612ebc579050905060018103818111612ebc5790506109a0526105805163ddca3f436109e05260206109e060046109fc845afa610a2a573d600060003e3d6000fd5b60203d10612ebc576109e09050516109c05261058051638edfdd5f610a00526020610a006004610a1c845afa610a65573d600060003e3d6000fd5b60203d10612ebc57610a009050516109e0526105405161080051811015612ebc5760051b610820015161096051808201828110612ebc57905090508060011c90506040526105605161080051811015612ebc5760051b610820015161098051808201828110612ebc57905090508060011c90506060526109c0516080526109e05160a052610af4610a206121f2565b610a20516109a051808202811583838304141715612ebc57905090506402540be40081049050610a00526109a051610a0051808203828111612ebc5790509050670de0b6b3a7640000810281670de0b6b3a7640000820418612ebc579050610560516105c051811015612ebc5760051b6105e001518015612ebc5780820490509050610a20526020610a20f3611d91565b63d6fc10ab8118611d9157608436103417612ebc5760043580600f0b8118612ebc57610cc05260243580600f0b8118612ebc57610ce0526064358060a01c612ebc57610d0052610d00516371511a5e610d40526020610d406004610d5c845afa610bf4573d600060003e3d6000fd5b60203d10612ebc57610d40518060a01c612ebc57610d8052610d80905051610d2052610d0051633da575a1610d60526020610d606004610d7c845afa610c3f573d600060003e3d6000fd5b60203d10612ebc57610d60905051610d4052610d00516329357750610d80526020610d806004610d9c845afa610c7a573d600060003e3d6000fd5b60203d10612ebc57610d80905051610d6052610d2051604052610c9e610da0612987565b610da051610d80526001610cc051610ce0518082811882841202189050905012610d4d576023610da0527f4e6f742061204d657461706f6f6c20537761702e20557365204261736520706f610dc0527f6f6c2e0000000000000000000000000000000000000000000000000000000000610de052610da050610da05180610dc001601f826000031636823750506308c379a0610d60526020610d8052601f19601f610da0510116604401610d7cfd5b610cc051610dd757604435604052610ce0516001810380600f0b8118612ebc579050606052610d4051608052610d205160a052600060c052610d90610dc0612a3a565b610dc051610da0526020600061054052600161056052610da05161058052610d00516105a05260006105c052610d60516105e052610dcf610dc0612621565b610dc0610e6c565b60016105405260006105605260443561058052610d00516105a05260006105c052610d60516105e052610e0b610dc0612621565b610dc051610da0526020610d205163cc2b27d7610dc052610da051610de052610cc0516001810380600f0b8118612ebc579050610e00526020610dc06044610ddc845afa610e5e573d600060003e3d6000fd5b60203d10612ebc57610dc090505bf3611d91565b63fb79eb2781186115e757608436103417612ebc576004356004016008813511612ebc57803560208160051b018083610540375050506024358060011c612ebc57610660526044358060a01c612ebc57610680526106805163f446c1d06106c05260206106c060046106dc845afa610eef573d600060003e3d6000fd5b60203d10612ebc576106c090505160648102816064820418612ebc5790506106a0526106805163293577506106e05260206106e060046106fc845afa610f3a573d600060003e3d6000fd5b60203d10612ebc576106e09050516106c05260006106e052600061080052600061092052610680516040526106c051606052610f77610a40611d97565b610a40805160208160051b01806106e0828560045afa5050506101208101805160208160051b0180610800828560045afa505050506102408101805160208160051b0180610920828560045afa50505050506109205160208160051b018060408261092060045afa5050506106a051610160526106c05161018052610ffd610a60611f6f565b610a6051610a4052610680516318160ddd610a80526020610a806004610a9c845afa61102e573d600060003e3d6000fd5b60203d10612ebc57610a80905051610a60526108005160208160051b0180610a808261080060045afa50505060006008905b80610ba0526106c051610ba0511861107757611105565b610ba05161054051811015612ebc5760051b6105600151610bc052610660516110cc57610ba051610a8051811015612ebc5760051b610aa0018051610bc051808203828111612ebc57905090508152506110fa565b610ba051610a8051811015612ebc5760051b610aa0018051610bc051808201828110612ebc57905090508152505b600101818118611060575b505060006008905b80610ba0526106c051610ba0511861112457611195565b610ba0516106e051811015612ebc5760051b6107000151610ba051610a8051811015612ebc5760051b610aa00151808202811583838304141715612ebc5790509050670de0b6b3a764000081049050610ba05161092051811015612ebc5760051b610940015260010181811861110d575b50506109205160208160051b018060408261092060045afa5050506106a051610160526106c051610180526111cb610bc0611f6f565b610bc051610ba052610ba051610bc052610a60511561155c576106805163ddca3f43610c00526020610c006004610c1c845afa61120d573d600060003e3d6000fd5b60203d10612ebc57610c009050516106c051808202811583838304141715612ebc57905090506106c05160018103818111612ebc5790508060021b818160021c18612ebc5790508015612ebc5780820490509050610be05261068051638edfdd5f610c20526020610c206004610c3c845afa61128e573d600060003e3d6000fd5b60203d10612ebc57610c20905051610c0052604036610c2037610a4051610ba051808201828110612ebc57905090506106c0518015612ebc5780820490509050610c605260006008905b80610c80526106c051610c8051186112ef57611489565b610ba051610c805161080051811015612ebc5760051b6108200151808202811583838304141715612ebc5790509050610a40518015612ebc5780820490509050610ca0526000610cc052610c8051610a8051811015612ebc5760051b610aa00151610ce052610ce051610ca0511161138057610ce051610ca051808203828111612ebc5790509050610cc05261139b565b610ca051610ce051808203828111612ebc5790509050610cc0525b610c80516106e051811015612ebc5760051b6107000151610c805161080051811015612ebc5760051b6108200151610ce051808201828110612ebc5790509050808202811583838304141715612ebc5790509050670de0b6b3a764000081049050610c4052610c4051604052610c6051606052610be051608052610c005160a052611427610d006121f2565b610d0051610c2052610c8051610a8051811015612ebc5760051b610aa0018051610c2051610cc051808202811583838304141715612ebc57905090506402540be40081049050808203828111612ebc57905090508152506001018181186112d8575b505060006008905b80610c80526106c051610c8051186114a857611519565b610c80516106e051811015612ebc5760051b6107000151610c8051610a8051811015612ebc5760051b610aa00151808202811583838304141715612ebc5790509050670de0b6b3a764000081049050610c805161092051811015612ebc5760051b6109400152600101818118611491575b50506109205160208160051b018060408261092060045afa5050506106a051610160526106c0516101805261154f610c80611f6f565b610c8051610bc052611566565b6020610ba06115e5565b6000610be0526106605161159357610a4051610bc051808203828111612ebc5790509050610be0526115ae565b610bc051610a4051808203828111612ebc5790509050610be0525b610be051610a6051808202811583838304141715612ebc5790509050610a40518015612ebc5780820490509050610c00526020610c005bf35b63a63530bd8118611d9157606436103417612ebc5760043580600f0b8118612ebc576105405260243580600f0b8118612ebc57610560526044358060a01c612ebc57610580526105805163293577506105c05260206105c060046105dc845afa611656573d600060003e3d6000fd5b60203d10612ebc576105c09050516105a0526105805163ddca3f436105e05260206105e060046105fc845afa611691573d600060003e3d6000fd5b60203d10612ebc576105e09050516105c05261058051638edfdd5f610600526020610600600461061c845afa6116cc573d600060003e3d6000fd5b60203d10612ebc576106009050516105e052600061060052600061072052600061084052610580516040526105a051606052611709610960611d97565b610960805160208160051b0180610600828560045afa5050506101208101805160208160051b0180610720828560045afa505050506102408101805160208160051b0180610840828560045afa505050505060206105405161084051811015612ebc5760051b61086001516040526105605161084051811015612ebc5760051b61086001516060526105c0516080526105e05160a0526117aa6109606121f2565b610960f3611d91565b63b54e9f058118611d9157606436103417612ebc5760243580600f0b8118612ebc57610540526044358060a01c612ebc57610560526105605163f446c1d06105a05260206105a060046105bc845afa611811573d600060003e3d6000fd5b60203d10612ebc576105a090505160648102816064820418612ebc579050610580526105605163293577506105c05260206105c060046105dc845afa61185c573d600060003e3d6000fd5b60203d10612ebc576105c09050516105a05260006105c05260006106e052600061080052610560516040526105a051606052611899610920611d97565b610920805160208160051b01806105c0828560045afa5050506101208101805160208160051b01806106e0828560045afa505050506102408101805160208160051b0180610800828560045afa50505050506108005160208160051b018060408261080060045afa50505061058051610160526105a0516101805261191f610940611f6f565b6109405161092052610560516318160ddd610960526020610960600461097c845afa611950573d600060003e3d6000fd5b60203d10612ebc57610960905051610940526109205160043561092051808202811583838304141715612ebc5790509050610940518015612ebc5780820490509050808203828111612ebc579050905061096052610580516101205261054051610140526108005160208160051b01806101608261080060045afa50505061096051610280526105a0516102a0526119e96109a0612cd1565b6109a051610980526109205161096051808201828110612ebc57905090506105a0518060011b818160011c18612ebc5790508015612ebc57808204905090506109a0526105605163ddca3f436109e05260206109e060046109fc845afa611a55573d600060003e3d6000fd5b60203d10612ebc576109e09050516105a051808202811583838304141715612ebc57905090506105a05160018103818111612ebc5790508060021b818160021c18612ebc5790508015612ebc57808204905090506109c05261056051638edfdd5f610a00526020610a006004610a1c845afa611ad6573d600060003e3d6000fd5b60203d10612ebc57610a009050516109e0526108005160208160051b0180610a008261080060045afa505050606036610b203760006008905b80610b80526105a051610b805118611b2657611cbf565b6000610ba052610b805161080051811015612ebc5760051b6108200151610b205261054051610b805180607f1c612ebc5718611bd757610b205161096051808202811583838304141715612ebc5790509050610920518015612ebc578082049050905061098051808203828111612ebc5790509050610ba052610b805161080051811015612ebc5760051b610820015161098051808201828110612ebc57905090508060011c9050610b4052611c36565b610b2051610b205161096051808202811583838304141715612ebc5790509050610920518015612ebc5780820490509050808203828111612ebc5790509050610ba052610b805161080051811015612ebc5760051b6108200151610b40525b610b40516040526109a0516060526109c0516080526109e05160a052611c5d610bc06121f2565b610bc051610b6052610b2051610b6051610ba051808202811583838304141715612ebc57905090506402540be40081049050808203828111612ebc5790509050610b8051610a0051811015612ebc5760051b610a200152600101818118611b0f575b505061054051610a0051811015612ebc5760051b610a20015161058051610120526105405161014052610a005160208160051b018061016082610a0060045afa50505061096051610280526105a0516102a052611d1d610ba0612cd1565b610ba051808203828111612ebc5790509050610b8052610b805160018103818111612ebc579050670de0b6b3a7640000810281670de0b6b3a7640000820418612ebc579050610540516105c051811015612ebc5760051b6105e001518015612ebc5780820490509050610b80526020610b80f35b60006000fd5b60405163fd0684b16101a0526101406101a060046101bc845afa611dc0573d600060003e3d6000fd5b60403d10612ebc576101a0516101a0016008815111612ebc57805160208160051b0180610300828560045afa505050506103009050805160208160051b01806080828560045afa505050506040516314f059796102c0526101406102c060046102dc845afa611e34573d600060003e3d6000fd5b60403d10612ebc576102c0516102c0016008815111612ebc57805160208160051b0180610420828560045afa505050506104209050805160208160051b01806101a0828560045afa5050505060006102c05260006008905b806103e0526060516103e05118611ea257611f18565b6102c05160078111612ebc576103e051608051811015612ebc5760051b60a001516103e0516101a051811015612ebc5760051b6101c00151808202811583838304141715612ebc5790509050670de0b6b3a7640000810490508160051b6102e00152600181016102c05250600101818118611e8c575b505060805160208160051b01808382608060045afa5050506101a05160208160051b0161012083018181836101a060045afa505050506102c05160208160051b0161024083018181836102c060045afa5050505050565b60006101a05260006008905b806101c052610180516101c05118611f9257611fc8565b6101a0516101c051604051811015612ebc5760051b60600151808201828110612ebc57905090506101a052600101818118611f7b575b50506101a051611fdc5760008152506121f0565b6101a0516101c0526101605161018051808202811583838304141715612ebc57905090506101e052600060ff905b80610200526101c05161022052600060405160088111612ebc57801561207457905b8060051b6060015161024052610220516101c051808202811583838304141715612ebc5790509050610240518015612ebc57808204905090506102205260010181811861202c575b50506102205161018051610180510a8015612ebc5780820490509050610220526101c051610240526101e0516101a051808202811583838304141715612ebc57905090506064810490506102205161018051808202811583838304141715612ebc5790509050808201828110612ebc57905090506101c051808202811583838304141715612ebc57905090506101e05160648103818111612ebc5790506101c051808202811583838304141715612ebc57905090506064810490506101805160018101818110612ebc57905061022051808202811583838304141715612ebc5790509050808201828110612ebc57905090508015612ebc57808204905090506101c052610240516101c051116121b3576001610240516101c051808203828111612ebc5790509050116121de576101c05183525050506121f0566121de565b60016101c05161024051808203828111612ebc5790509050116121de576101c05183525050506121f0565b60010181811861200a57505060006000fd5b565b6402540be40060a0511161220b576080518152506122dd565b604051606051808201828110612ebc57905090506fffffffffffffffffffffffffffffffff8111612ebc576002810a905060c05260a051608051808202811583838304141715612ebc579050905060a0516402540be4008103818111612ebc5790508060021b818160021c18612ebc579050604051808202811583838304141715612ebc5790509050606051808202811583838304141715612ebc579050905060c0518015612ebc57808204905090506402540be4008101818110612ebc5790508015612ebc57808204905090508152505b565b600060c05260a05160e052600060ff905b806101005260e05160c05260e05160e051808202811583838304141715612ebc5790509050606051808201828110612ebc579050905060e0518060011b818160011c18612ebc579050604051808201828110612ebc5790509050608051808203828111612ebc57905090508015612ebc578082049050905060e05260c05160e051116123a257600160c05160e051808203828111612ebc5790509050116123ca5760e05183525050506123dc566123ca565b600160e05160c051808203828111612ebc5790509050116123ca5760e05183525050506123dc565b6001018181186122f057505060006000fd5b565b610140516101205114612ebc5760006101405112612ebc576102e05180607f1c612ebc57610140511215612ebc5760006101205112612ebc576102e05180607f1c612ebc57610120511215612ebc576102a051610300526102c05161032052604036610340376103205161038052610300516102e051808202811583838304141715612ebc57905090506103a05260006008905b806103c0526102e0516103c0511861248957612553565b610120516103c05180607f1c612ebc57186124ab5761016051610360526124e4565b610140516103c05180607f1c612ebc5714612548576103c05161018051811015612ebc5760051b6101a00151610360526124e456612548565b6103405161036051808201828110612ebc5790509050610340526103805161032051808202811583838304141715612ebc5790509050610360516102e051808202811583838304141715612ebc57905090508015612ebc5780820490509050610380525b600101818118612472575b50506103805161032051808202811583838304141715612ebc579050905060648102816064820418612ebc5790506103a0516102e051808202811583838304141715612ebc57905090508015612ebc578082049050905061038052610340516103205160648102816064820418612ebc5790506103a0518015612ebc5780820490509050808201828110612ebc57905090506103c052610320516103e0526103c05160405261038051606052610320516080526103e05160a0526126186104006122df565b61040051815250565b6000610600526000610720526000610840526105a0516040526105e05160605261264c610960611d97565b610960805160208160051b0180610600828560045afa5050506101208101805160208160051b0180610720828560045afa505050506102408101805160208160051b0180610840828560045afa50505050506105a05163f446c1d0610980526020610980600461099c845afa6126c7573d600060003e3d6000fd5b60203d10612ebc5761098090505160648102816064820418612ebc579050610960526108405160208160051b018060408261084060045afa50505061096051610160526105e0516101805261271d6109a0611f6f565b6109a051610980526105a05163ddca3f436109c05260206109c060046109dc845afa61274e573d600060003e3d6000fd5b60203d10612ebc576109c09050516109a052610580516105605161060051811015612ebc5760051b6106200151808202811583838304141715612ebc5790509050670de0b6b3a76400008104905060018101818110612ebc5790506109c0526109a0516109e0526105c05161284e576105a051638edfdd5f610a20526020610a206004610a3c845afa6127e6573d600060003e3d6000fd5b60203d10612ebc57610a20905051610a00526105405161084051811015612ebc5760051b61086001516040526105605161084051811015612ebc5760051b61086001516060526109a051608052610a005160a052612845610a206121f2565b610a20516109e0525b6105605161084051811015612ebc5760051b61086001516109c0516402540be4008102816402540be400820418612ebc5790506109e051806402540be400036402540be4008111612ebc5790508015612ebc5780820490509050808203828111612ebc5790509050610a005261056051610120526105405161014052610a0051610160526108405160208160051b01806101808261084060045afa505050610960516102a052610980516102c0526105e0516102e05261290f610a406123de565b610a4051610a2052610a20516105405161084051811015612ebc5760051b6108600151808203828111612ebc5790509050670de0b6b3a7640000810281670de0b6b3a7640000820418612ebc5790506105405161060051811015612ebc5760051b61062001518015612ebc5780820490509050815250565b6040366060376040515a6000600460c0527f76a9cd3e0000000000000000000000000000000000000000000000000000000060e05260c0805160208201836101200181518152505080830192505050600181610120015260208101905060008161012001526020810190508061010052610100505060206101a0610100516101208585fa905090506060523d602081183d6020100218610180526101808051608052602081015160a05250606051815250565b60a0515a6004610100527f9c4258c400000000000000000000000000000000000000000000000000000000610120526101005060006000610100516101208585fa9050905060e052600260805118612a955760e05115612a98565b60005b612c6157600360805118612aaf5760e05115612ab2565b60005b612be357600061010052600060805160088111612ebc578015612b3c57905b806102205260605160008112612ebc576102205118612b10576101005160078111612ebc576040518160051b6101200152600181016101005250612b31565b6101005160078111612ebc5760008160051b61012001526001810161010052505b600101818118612ad1575b505060a051633db06dd8610220526040806102405280610240016000610100518083528060051b60008260088111612ebc578015612b9457905b8060051b61012001518160051b602088010152600101818118612b76575b5050820160200191505090508101905060c0516102605250602061022061016461023c845afa612bc9573d600060003e3d6000fd5b60203d10612ebc57610220905051815250612ccf56612ccf565b6060366101003760405160605160028111612ebc5760051b610100015260a051633883e119610160526101005161018052610120516101a052610140516101c05260c0516101e0526020610160608461017c845afa612c47573d600060003e3d6000fd5b60203d10612ebc57610160905051815250612ccf56612ccf565b6040366101003760405160605160018111612ebc5760051b610100015260a05163ed8e84f3610140526101005161016052610120516101805260c0516101a0526020610140606461015c845afa612cbd573d600060003e3d6000fd5b60203d10612ebc576101409050518152505b565b6102a05180607f1c612ebc576102c05260006101405112612ebc576102c051610140511215612ebc576060366102e0376102805161034052610120516102a051808202811583838304141715612ebc57905090506103605260006008905b80610380526102a0516103805118612d4657612dee565b6101405160008112612ebc576103805114612de3576103805161016051811015612ebc5760051b610180015161030052612d7f56612de3565b6102e05161030051808201828110612ebc57905090506102e0526103405161028051808202811583838304141715612ebc5790509050610300516102a051808202811583838304141715612ebc57905090508015612ebc5780820490509050610340525b600101818118612d2f575b50506103405161028051808202811583838304141715612ebc579050905060648102816064820418612ebc579050610360516102a051808202811583838304141715612ebc57905090508015612ebc5780820490509050610340526102e0516102805160648102816064820418612ebc579050610360518015612ebc5780820490509050808201828110612ebc579050905061038052610280516103a0526103805160405261034051606052610280516080526103a05160a052612eb36103c06122df565b6103c051815250565b600080fd1d910b850e720781001a17b31d9184192ecf810e00a16576797065728300030a0014

Deployed Bytecode

0x60003560e01c60026007820660011b612ec101601e39600051565b6383aa796a81186100da57608436103417612ebc5760043580600f0b8118612ebc57610cc05260243580600f0b8118612ebc57610ce0526064358060a01c612ebc57610d0052610d00516329357750610d40526020610d406004610d5c845afa610089573d600060003e3d6000fd5b60203d10612ebc57610d40905051610d20526020610cc05161054052610ce0516105605260443561058052610d00516105a05260006105c052610d20516105e0526100d5610d40612621565b610d40f35b63c02c60a68118611d9157608436103417612ebc5760043580600f0b8118612ebc576105405260243580600f0b8118612ebc57610560526064358060a01c612ebc57610580526105805163293577506105c05260206105c060046105dc845afa610149573d600060003e3d6000fd5b60203d10612ebc576105c09050516105a0526105a05180607f1c612ebc576001810380600f0b8118612ebc5790506105c052610580516371511a5e610600526020610600600461061c845afa6101a4573d600060003e3d6000fd5b60203d10612ebc57610600518060a01c612ebc57610640526106409050516105e052600061060052600061072052600061084052610580516040526105a0516060526101f1610960611d97565b610960805160208160051b0180610600828560045afa5050506101208101805160208160051b0180610720828560045afa505050506102408101805160208160051b0180610840828560045afa505050505060a03661096037610540511561027757610540516105c05180820380600f0b8118612ebc57905090506109805260016109c0525b61056051156102a457610560516105c05180820380600f0b8118612ebc57905090506109a05260016109e0525b61054051610311576105405161084051811015612ebc5760051b61086001516044356106005115612ebc57600060051b6106200151808202811583838304141715612ebc5790509050670de0b6b3a764000081049050808201828110612ebc579050905061096052610441565b610560516103ed5761058051633da575a1610a20526020610a206004610a3c845afa610342573d600060003e3d6000fd5b60203d10612ebc57610a20905051610a005260443560405261098051606052610a00516080526105e05160a052600160c05261037f610a20612a3a565b610a205160026106005110612ebc57600160051b6106200151808202811583838304141715612ebc5790509050670de0b6b3a764000081049050610960526109605160026108405110612ebc57600160051b6108600151808201828110612ebc579050905061096052610441565b60206105e051635e0d443f610a005261098051610a20526109a051610a4052604435610a60526020610a006064610a1c845afa61042f573d600060003e3d6000fd5b60203d10612ebc57610a00905061077b565b6105805163f446c1d0610a20526020610a206004610a3c845afa61046a573d600060003e3d6000fd5b60203d10612ebc57610a2090505160648102816064820418612ebc579050610a00526108405160208160051b018060408261084060045afa505050610a0051610160526105a051610180526104c0610a40611f6f565b610a4051610a20526109c051610120526109e0516101405261096051610160526108405160208160051b01806101808261084060045afa505050610a00516102a052610a20516102c0526105a0516102e05261051d610a606123de565b610a6051610a40526109e05161084051811015612ebc5760051b6108600151610a4051808203828111612ebc579050905060018103818111612ebc579050610a60526105805163ddca3f43610aa0526020610aa06004610abc845afa610588573d600060003e3d6000fd5b60203d10612ebc57610aa0905051610a805261058051638edfdd5f610ac0526020610ac06004610adc845afa6105c3573d600060003e3d6000fd5b60203d10612ebc57610ac0905051610aa0526109c05161084051811015612ebc5760051b610860015161096051808201828110612ebc57905090508060011c90506040526109e05161084051811015612ebc5760051b6108600151610a4051808201828110612ebc57905090508060011c9050606052610a8051608052610aa05160a052610652610ae06121f2565b610ae051610ac052610a6051610ac051610a6051808202811583838304141715612ebc57905090506402540be40081049050808203828111612ebc5790509050610a6052610560516106e957610a6051670de0b6b3a7640000810281670de0b6b3a7640000820418612ebc5790506106005115612ebc57600060051b61062001518015612ebc5780820490509050610a6052610775565b6105e05163cc2b27d7610ae052610a6051670de0b6b3a7640000810281670de0b6b3a7640000820418612ebc57905060026106005110612ebc57600160051b61062001518015612ebc5780820490509050610b00526109a051610b20526020610ae06044610afc845afa610762573d600060003e3d6000fd5b60203d10612ebc57610ae0905051610a60525b6020610a605bf3611d91565b630c601c2c8118611d9157608436103417612ebc5760043580600f0b8118612ebc576105405260243580600f0b8118612ebc57610560526064358060a01c612ebc57610580526105805163293577506105c05260206105c060046105dc845afa6107f0573d600060003e3d6000fd5b60203d10612ebc576105c09050516105a05260006105c05260006106e052600061080052610580516040526105a05160605261082d610920611d97565b610920805160208160051b01806105c0828560045afa5050506101208101805160208160051b01806106e0828560045afa505050506102408101805160208160051b0180610800828560045afa50505050506105805163f446c1d0610940526020610940600461095c845afa6108a8573d600060003e3d6000fd5b60203d10612ebc5761094090505160648102816064820418612ebc579050610920526108005160208160051b018060408261080060045afa50505061092051610160526105a051610180526108fe610960611f6f565b61096051610940526105405161080051811015612ebc5760051b6108200151604435610540516105c051811015612ebc5760051b6105e00151808202811583838304141715612ebc5790509050670de0b6b3a764000081049050808201828110612ebc5790509050610960526105405161012052610560516101405261096051610160526108005160208160051b01806101808261080060045afa505050610920516102a052610940516102c0526105a0516102e0526109bf6109a06123de565b6109a051610980526105605161080051811015612ebc5760051b610820015161098051808203828111612ebc579050905060018103818111612ebc5790506109a0526105805163ddca3f436109e05260206109e060046109fc845afa610a2a573d600060003e3d6000fd5b60203d10612ebc576109e09050516109c05261058051638edfdd5f610a00526020610a006004610a1c845afa610a65573d600060003e3d6000fd5b60203d10612ebc57610a009050516109e0526105405161080051811015612ebc5760051b610820015161096051808201828110612ebc57905090508060011c90506040526105605161080051811015612ebc5760051b610820015161098051808201828110612ebc57905090508060011c90506060526109c0516080526109e05160a052610af4610a206121f2565b610a20516109a051808202811583838304141715612ebc57905090506402540be40081049050610a00526109a051610a0051808203828111612ebc5790509050670de0b6b3a7640000810281670de0b6b3a7640000820418612ebc579050610560516105c051811015612ebc5760051b6105e001518015612ebc5780820490509050610a20526020610a20f3611d91565b63d6fc10ab8118611d9157608436103417612ebc5760043580600f0b8118612ebc57610cc05260243580600f0b8118612ebc57610ce0526064358060a01c612ebc57610d0052610d00516371511a5e610d40526020610d406004610d5c845afa610bf4573d600060003e3d6000fd5b60203d10612ebc57610d40518060a01c612ebc57610d8052610d80905051610d2052610d0051633da575a1610d60526020610d606004610d7c845afa610c3f573d600060003e3d6000fd5b60203d10612ebc57610d60905051610d4052610d00516329357750610d80526020610d806004610d9c845afa610c7a573d600060003e3d6000fd5b60203d10612ebc57610d80905051610d6052610d2051604052610c9e610da0612987565b610da051610d80526001610cc051610ce0518082811882841202189050905012610d4d576023610da0527f4e6f742061204d657461706f6f6c20537761702e20557365204261736520706f610dc0527f6f6c2e0000000000000000000000000000000000000000000000000000000000610de052610da050610da05180610dc001601f826000031636823750506308c379a0610d60526020610d8052601f19601f610da0510116604401610d7cfd5b610cc051610dd757604435604052610ce0516001810380600f0b8118612ebc579050606052610d4051608052610d205160a052600060c052610d90610dc0612a3a565b610dc051610da0526020600061054052600161056052610da05161058052610d00516105a05260006105c052610d60516105e052610dcf610dc0612621565b610dc0610e6c565b60016105405260006105605260443561058052610d00516105a05260006105c052610d60516105e052610e0b610dc0612621565b610dc051610da0526020610d205163cc2b27d7610dc052610da051610de052610cc0516001810380600f0b8118612ebc579050610e00526020610dc06044610ddc845afa610e5e573d600060003e3d6000fd5b60203d10612ebc57610dc090505bf3611d91565b63fb79eb2781186115e757608436103417612ebc576004356004016008813511612ebc57803560208160051b018083610540375050506024358060011c612ebc57610660526044358060a01c612ebc57610680526106805163f446c1d06106c05260206106c060046106dc845afa610eef573d600060003e3d6000fd5b60203d10612ebc576106c090505160648102816064820418612ebc5790506106a0526106805163293577506106e05260206106e060046106fc845afa610f3a573d600060003e3d6000fd5b60203d10612ebc576106e09050516106c05260006106e052600061080052600061092052610680516040526106c051606052610f77610a40611d97565b610a40805160208160051b01806106e0828560045afa5050506101208101805160208160051b0180610800828560045afa505050506102408101805160208160051b0180610920828560045afa50505050506109205160208160051b018060408261092060045afa5050506106a051610160526106c05161018052610ffd610a60611f6f565b610a6051610a4052610680516318160ddd610a80526020610a806004610a9c845afa61102e573d600060003e3d6000fd5b60203d10612ebc57610a80905051610a60526108005160208160051b0180610a808261080060045afa50505060006008905b80610ba0526106c051610ba0511861107757611105565b610ba05161054051811015612ebc5760051b6105600151610bc052610660516110cc57610ba051610a8051811015612ebc5760051b610aa0018051610bc051808203828111612ebc57905090508152506110fa565b610ba051610a8051811015612ebc5760051b610aa0018051610bc051808201828110612ebc57905090508152505b600101818118611060575b505060006008905b80610ba0526106c051610ba0511861112457611195565b610ba0516106e051811015612ebc5760051b6107000151610ba051610a8051811015612ebc5760051b610aa00151808202811583838304141715612ebc5790509050670de0b6b3a764000081049050610ba05161092051811015612ebc5760051b610940015260010181811861110d575b50506109205160208160051b018060408261092060045afa5050506106a051610160526106c051610180526111cb610bc0611f6f565b610bc051610ba052610ba051610bc052610a60511561155c576106805163ddca3f43610c00526020610c006004610c1c845afa61120d573d600060003e3d6000fd5b60203d10612ebc57610c009050516106c051808202811583838304141715612ebc57905090506106c05160018103818111612ebc5790508060021b818160021c18612ebc5790508015612ebc5780820490509050610be05261068051638edfdd5f610c20526020610c206004610c3c845afa61128e573d600060003e3d6000fd5b60203d10612ebc57610c20905051610c0052604036610c2037610a4051610ba051808201828110612ebc57905090506106c0518015612ebc5780820490509050610c605260006008905b80610c80526106c051610c8051186112ef57611489565b610ba051610c805161080051811015612ebc5760051b6108200151808202811583838304141715612ebc5790509050610a40518015612ebc5780820490509050610ca0526000610cc052610c8051610a8051811015612ebc5760051b610aa00151610ce052610ce051610ca0511161138057610ce051610ca051808203828111612ebc5790509050610cc05261139b565b610ca051610ce051808203828111612ebc5790509050610cc0525b610c80516106e051811015612ebc5760051b6107000151610c805161080051811015612ebc5760051b6108200151610ce051808201828110612ebc5790509050808202811583838304141715612ebc5790509050670de0b6b3a764000081049050610c4052610c4051604052610c6051606052610be051608052610c005160a052611427610d006121f2565b610d0051610c2052610c8051610a8051811015612ebc5760051b610aa0018051610c2051610cc051808202811583838304141715612ebc57905090506402540be40081049050808203828111612ebc57905090508152506001018181186112d8575b505060006008905b80610c80526106c051610c8051186114a857611519565b610c80516106e051811015612ebc5760051b6107000151610c8051610a8051811015612ebc5760051b610aa00151808202811583838304141715612ebc5790509050670de0b6b3a764000081049050610c805161092051811015612ebc5760051b6109400152600101818118611491575b50506109205160208160051b018060408261092060045afa5050506106a051610160526106c0516101805261154f610c80611f6f565b610c8051610bc052611566565b6020610ba06115e5565b6000610be0526106605161159357610a4051610bc051808203828111612ebc5790509050610be0526115ae565b610bc051610a4051808203828111612ebc5790509050610be0525b610be051610a6051808202811583838304141715612ebc5790509050610a40518015612ebc5780820490509050610c00526020610c005bf35b63a63530bd8118611d9157606436103417612ebc5760043580600f0b8118612ebc576105405260243580600f0b8118612ebc57610560526044358060a01c612ebc57610580526105805163293577506105c05260206105c060046105dc845afa611656573d600060003e3d6000fd5b60203d10612ebc576105c09050516105a0526105805163ddca3f436105e05260206105e060046105fc845afa611691573d600060003e3d6000fd5b60203d10612ebc576105e09050516105c05261058051638edfdd5f610600526020610600600461061c845afa6116cc573d600060003e3d6000fd5b60203d10612ebc576106009050516105e052600061060052600061072052600061084052610580516040526105a051606052611709610960611d97565b610960805160208160051b0180610600828560045afa5050506101208101805160208160051b0180610720828560045afa505050506102408101805160208160051b0180610840828560045afa505050505060206105405161084051811015612ebc5760051b61086001516040526105605161084051811015612ebc5760051b61086001516060526105c0516080526105e05160a0526117aa6109606121f2565b610960f3611d91565b63b54e9f058118611d9157606436103417612ebc5760243580600f0b8118612ebc57610540526044358060a01c612ebc57610560526105605163f446c1d06105a05260206105a060046105bc845afa611811573d600060003e3d6000fd5b60203d10612ebc576105a090505160648102816064820418612ebc579050610580526105605163293577506105c05260206105c060046105dc845afa61185c573d600060003e3d6000fd5b60203d10612ebc576105c09050516105a05260006105c05260006106e052600061080052610560516040526105a051606052611899610920611d97565b610920805160208160051b01806105c0828560045afa5050506101208101805160208160051b01806106e0828560045afa505050506102408101805160208160051b0180610800828560045afa50505050506108005160208160051b018060408261080060045afa50505061058051610160526105a0516101805261191f610940611f6f565b6109405161092052610560516318160ddd610960526020610960600461097c845afa611950573d600060003e3d6000fd5b60203d10612ebc57610960905051610940526109205160043561092051808202811583838304141715612ebc5790509050610940518015612ebc5780820490509050808203828111612ebc579050905061096052610580516101205261054051610140526108005160208160051b01806101608261080060045afa50505061096051610280526105a0516102a0526119e96109a0612cd1565b6109a051610980526109205161096051808201828110612ebc57905090506105a0518060011b818160011c18612ebc5790508015612ebc57808204905090506109a0526105605163ddca3f436109e05260206109e060046109fc845afa611a55573d600060003e3d6000fd5b60203d10612ebc576109e09050516105a051808202811583838304141715612ebc57905090506105a05160018103818111612ebc5790508060021b818160021c18612ebc5790508015612ebc57808204905090506109c05261056051638edfdd5f610a00526020610a006004610a1c845afa611ad6573d600060003e3d6000fd5b60203d10612ebc57610a009050516109e0526108005160208160051b0180610a008261080060045afa505050606036610b203760006008905b80610b80526105a051610b805118611b2657611cbf565b6000610ba052610b805161080051811015612ebc5760051b6108200151610b205261054051610b805180607f1c612ebc5718611bd757610b205161096051808202811583838304141715612ebc5790509050610920518015612ebc578082049050905061098051808203828111612ebc5790509050610ba052610b805161080051811015612ebc5760051b610820015161098051808201828110612ebc57905090508060011c9050610b4052611c36565b610b2051610b205161096051808202811583838304141715612ebc5790509050610920518015612ebc5780820490509050808203828111612ebc5790509050610ba052610b805161080051811015612ebc5760051b6108200151610b40525b610b40516040526109a0516060526109c0516080526109e05160a052611c5d610bc06121f2565b610bc051610b6052610b2051610b6051610ba051808202811583838304141715612ebc57905090506402540be40081049050808203828111612ebc5790509050610b8051610a0051811015612ebc5760051b610a200152600101818118611b0f575b505061054051610a0051811015612ebc5760051b610a20015161058051610120526105405161014052610a005160208160051b018061016082610a0060045afa50505061096051610280526105a0516102a052611d1d610ba0612cd1565b610ba051808203828111612ebc5790509050610b8052610b805160018103818111612ebc579050670de0b6b3a7640000810281670de0b6b3a7640000820418612ebc579050610540516105c051811015612ebc5760051b6105e001518015612ebc5780820490509050610b80526020610b80f35b60006000fd5b60405163fd0684b16101a0526101406101a060046101bc845afa611dc0573d600060003e3d6000fd5b60403d10612ebc576101a0516101a0016008815111612ebc57805160208160051b0180610300828560045afa505050506103009050805160208160051b01806080828560045afa505050506040516314f059796102c0526101406102c060046102dc845afa611e34573d600060003e3d6000fd5b60403d10612ebc576102c0516102c0016008815111612ebc57805160208160051b0180610420828560045afa505050506104209050805160208160051b01806101a0828560045afa5050505060006102c05260006008905b806103e0526060516103e05118611ea257611f18565b6102c05160078111612ebc576103e051608051811015612ebc5760051b60a001516103e0516101a051811015612ebc5760051b6101c00151808202811583838304141715612ebc5790509050670de0b6b3a7640000810490508160051b6102e00152600181016102c05250600101818118611e8c575b505060805160208160051b01808382608060045afa5050506101a05160208160051b0161012083018181836101a060045afa505050506102c05160208160051b0161024083018181836102c060045afa5050505050565b60006101a05260006008905b806101c052610180516101c05118611f9257611fc8565b6101a0516101c051604051811015612ebc5760051b60600151808201828110612ebc57905090506101a052600101818118611f7b575b50506101a051611fdc5760008152506121f0565b6101a0516101c0526101605161018051808202811583838304141715612ebc57905090506101e052600060ff905b80610200526101c05161022052600060405160088111612ebc57801561207457905b8060051b6060015161024052610220516101c051808202811583838304141715612ebc5790509050610240518015612ebc57808204905090506102205260010181811861202c575b50506102205161018051610180510a8015612ebc5780820490509050610220526101c051610240526101e0516101a051808202811583838304141715612ebc57905090506064810490506102205161018051808202811583838304141715612ebc5790509050808201828110612ebc57905090506101c051808202811583838304141715612ebc57905090506101e05160648103818111612ebc5790506101c051808202811583838304141715612ebc57905090506064810490506101805160018101818110612ebc57905061022051808202811583838304141715612ebc5790509050808201828110612ebc57905090508015612ebc57808204905090506101c052610240516101c051116121b3576001610240516101c051808203828111612ebc5790509050116121de576101c05183525050506121f0566121de565b60016101c05161024051808203828111612ebc5790509050116121de576101c05183525050506121f0565b60010181811861200a57505060006000fd5b565b6402540be40060a0511161220b576080518152506122dd565b604051606051808201828110612ebc57905090506fffffffffffffffffffffffffffffffff8111612ebc576002810a905060c05260a051608051808202811583838304141715612ebc579050905060a0516402540be4008103818111612ebc5790508060021b818160021c18612ebc579050604051808202811583838304141715612ebc5790509050606051808202811583838304141715612ebc579050905060c0518015612ebc57808204905090506402540be4008101818110612ebc5790508015612ebc57808204905090508152505b565b600060c05260a05160e052600060ff905b806101005260e05160c05260e05160e051808202811583838304141715612ebc5790509050606051808201828110612ebc579050905060e0518060011b818160011c18612ebc579050604051808201828110612ebc5790509050608051808203828111612ebc57905090508015612ebc578082049050905060e05260c05160e051116123a257600160c05160e051808203828111612ebc5790509050116123ca5760e05183525050506123dc566123ca565b600160e05160c051808203828111612ebc5790509050116123ca5760e05183525050506123dc565b6001018181186122f057505060006000fd5b565b610140516101205114612ebc5760006101405112612ebc576102e05180607f1c612ebc57610140511215612ebc5760006101205112612ebc576102e05180607f1c612ebc57610120511215612ebc576102a051610300526102c05161032052604036610340376103205161038052610300516102e051808202811583838304141715612ebc57905090506103a05260006008905b806103c0526102e0516103c0511861248957612553565b610120516103c05180607f1c612ebc57186124ab5761016051610360526124e4565b610140516103c05180607f1c612ebc5714612548576103c05161018051811015612ebc5760051b6101a00151610360526124e456612548565b6103405161036051808201828110612ebc5790509050610340526103805161032051808202811583838304141715612ebc5790509050610360516102e051808202811583838304141715612ebc57905090508015612ebc5780820490509050610380525b600101818118612472575b50506103805161032051808202811583838304141715612ebc579050905060648102816064820418612ebc5790506103a0516102e051808202811583838304141715612ebc57905090508015612ebc578082049050905061038052610340516103205160648102816064820418612ebc5790506103a0518015612ebc5780820490509050808201828110612ebc57905090506103c052610320516103e0526103c05160405261038051606052610320516080526103e05160a0526126186104006122df565b61040051815250565b6000610600526000610720526000610840526105a0516040526105e05160605261264c610960611d97565b610960805160208160051b0180610600828560045afa5050506101208101805160208160051b0180610720828560045afa505050506102408101805160208160051b0180610840828560045afa50505050506105a05163f446c1d0610980526020610980600461099c845afa6126c7573d600060003e3d6000fd5b60203d10612ebc5761098090505160648102816064820418612ebc579050610960526108405160208160051b018060408261084060045afa50505061096051610160526105e0516101805261271d6109a0611f6f565b6109a051610980526105a05163ddca3f436109c05260206109c060046109dc845afa61274e573d600060003e3d6000fd5b60203d10612ebc576109c09050516109a052610580516105605161060051811015612ebc5760051b6106200151808202811583838304141715612ebc5790509050670de0b6b3a76400008104905060018101818110612ebc5790506109c0526109a0516109e0526105c05161284e576105a051638edfdd5f610a20526020610a206004610a3c845afa6127e6573d600060003e3d6000fd5b60203d10612ebc57610a20905051610a00526105405161084051811015612ebc5760051b61086001516040526105605161084051811015612ebc5760051b61086001516060526109a051608052610a005160a052612845610a206121f2565b610a20516109e0525b6105605161084051811015612ebc5760051b61086001516109c0516402540be4008102816402540be400820418612ebc5790506109e051806402540be400036402540be4008111612ebc5790508015612ebc5780820490509050808203828111612ebc5790509050610a005261056051610120526105405161014052610a0051610160526108405160208160051b01806101808261084060045afa505050610960516102a052610980516102c0526105e0516102e05261290f610a406123de565b610a4051610a2052610a20516105405161084051811015612ebc5760051b6108600151808203828111612ebc5790509050670de0b6b3a7640000810281670de0b6b3a7640000820418612ebc5790506105405161060051811015612ebc5760051b61062001518015612ebc5780820490509050815250565b6040366060376040515a6000600460c0527f76a9cd3e0000000000000000000000000000000000000000000000000000000060e05260c0805160208201836101200181518152505080830192505050600181610120015260208101905060008161012001526020810190508061010052610100505060206101a0610100516101208585fa905090506060523d602081183d6020100218610180526101808051608052602081015160a05250606051815250565b60a0515a6004610100527f9c4258c400000000000000000000000000000000000000000000000000000000610120526101005060006000610100516101208585fa9050905060e052600260805118612a955760e05115612a98565b60005b612c6157600360805118612aaf5760e05115612ab2565b60005b612be357600061010052600060805160088111612ebc578015612b3c57905b806102205260605160008112612ebc576102205118612b10576101005160078111612ebc576040518160051b6101200152600181016101005250612b31565b6101005160078111612ebc5760008160051b61012001526001810161010052505b600101818118612ad1575b505060a051633db06dd8610220526040806102405280610240016000610100518083528060051b60008260088111612ebc578015612b9457905b8060051b61012001518160051b602088010152600101818118612b76575b5050820160200191505090508101905060c0516102605250602061022061016461023c845afa612bc9573d600060003e3d6000fd5b60203d10612ebc57610220905051815250612ccf56612ccf565b6060366101003760405160605160028111612ebc5760051b610100015260a051633883e119610160526101005161018052610120516101a052610140516101c05260c0516101e0526020610160608461017c845afa612c47573d600060003e3d6000fd5b60203d10612ebc57610160905051815250612ccf56612ccf565b6040366101003760405160605160018111612ebc5760051b610100015260a05163ed8e84f3610140526101005161016052610120516101805260c0516101a0526020610140606461015c845afa612cbd573d600060003e3d6000fd5b60203d10612ebc576101409050518152505b565b6102a05180607f1c612ebc576102c05260006101405112612ebc576102c051610140511215612ebc576060366102e0376102805161034052610120516102a051808202811583838304141715612ebc57905090506103605260006008905b80610380526102a0516103805118612d4657612dee565b6101405160008112612ebc576103805114612de3576103805161016051811015612ebc5760051b610180015161030052612d7f56612de3565b6102e05161030051808201828110612ebc57905090506102e0526103405161028051808202811583838304141715612ebc5790509050610300516102a051808202811583838304141715612ebc57905090508015612ebc5780820490509050610340525b600101818118612d2f575b50506103405161028051808202811583838304141715612ebc579050905060648102816064820418612ebc579050610360516102a051808202811583838304141715612ebc57905090508015612ebc5780820490509050610340526102e0516102805160648102816064820418612ebc579050610360518015612ebc5780820490509050808201828110612ebc579050905061038052610280516103a0526103805160405261034051606052610280516080526103a05160a052612eb36103c06122df565b6103c051815250565b600080fd1d910b850e720781001a17b31d91

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits

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.