ETH Price: $4,510.14 (+0.51%)

Contract

0x6a89228055C7C28430692E342F149f37462B478B

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

N/A
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Advanced mode:
Parent Transaction Hash Block From To
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CurveStableSwapNGViews

Compiler Version
vyper:0.3.10

Optimization Enabled:
N/A

Other Settings:
paris 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
"""

from vyper.interfaces import ERC20Detailed

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_precise() -> uint256: view
    def calc_withdraw_one_coin(_token_amount: uint256, i: int128) -> uint256: view
    def totalSupply() -> uint256: view
    def offpeg_fee_multiplier() -> uint256: view
    def coins(i: uint256) -> address: view

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


VERSION: public(constant(String[8])) = "1.2.0"
# first version was: 0xe0B15824862f3222fdFeD99FeBD0f7e0EC26E1FA (ethereum mainnet)
# second version was: 0x13526206545e2DC7CcfBaF28dC88F440ce7AD3e0 (ethereum mainnet)


# ------------------------------ 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_precise()
    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)
    base_pool_lp_token: address = StableSwapNG(pool).coins(1)

    # 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, base_pool_lp_token, 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()
    base_lp_token: address = StableSwapNG(pool).coins(1)

    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,
                base_lp_token,
                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_precise()
    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
    @dev Only works for StableswapNG pools and not legacy versions
    @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
    """

    return self._calc_token_amount(
        _amounts,
        _is_deposit,
        pool,
        pool,
        StableSwapNG(pool).N_COINS()
    )


@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_precise()
    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_precise()
    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 _calc_token_amount(
    _amounts: DynArray[uint256, MAX_COINS],
    _is_deposit: bool,
    pool: address,
    pool_lp_token: address,
    n_coins: uint256,
) -> uint256:

    amp: uint256 = StableSwapNG(pool).A_precise()

    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])

    pool_is_ng: bool = raw_call(
        pool,
        method_id("D_ma_time()"),
        revert_on_failure=False,
        is_static_call=True
    )
    use_dynamic_fees: bool = True
    if pool_is_ng:
        rates, old_balances, xp = self._get_rates_balances_xp(pool, n_coins)
    else:
        use_dynamic_fees = False
        for i in range(n_coins, bound=MAX_COINS):
            rates.append(
                10 ** (36 - convert(ERC20Detailed(StableSwapNG(pool).coins(i)).decimals(), uint256))
            )
            old_balances.append(StableSwapNG(pool).balances(i))
            xp.append(rates[i] * old_balances[i] / PRECISION)

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

    total_supply: uint256 = StableSwapNG(pool_lp_token).totalSupply()
    new_balances: DynArray[uint256, MAX_COINS] = old_balances
    for i in range(n_coins, bound=MAX_COINS):
        amount: uint256 = _amounts[i]
        if _is_deposit:
            new_balances[i] += amount
        else:
            new_balances[i] -= amount

    # Invariant after change
    for idx in range(n_coins, bound=MAX_COINS):
        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
    fee_multiplier: uint256 = 0
    _dynamic_fee_i: uint256 = 0
    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))
        if use_dynamic_fees:
            fee_multiplier = StableSwapNG(pool).offpeg_fee_multiplier()

        xs: uint256 = 0
        ys: uint256 = (D0 + D1) / n_coins

        for i in range(n_coins, bound=MAX_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

            xs = rates[i] * (old_balances[i] + new_balance) / PRECISION

            # use dynamic fees only if pool is NG
            if use_dynamic_fees:
                _dynamic_fee_i = self._dynamic_fee(xs, ys, base_fee, fee_multiplier)
                new_balances[i] -= _dynamic_fee_i * difference / FEE_DENOMINATOR
            else:
                new_balances[i] -= base_fee * difference / FEE_DENOMINATOR

        for idx in range(n_coins, bound=MAX_COINS):
            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


@internal
@view
def _base_calc_token_amount(
    dx: uint256,
    base_i: int128,
    base_n_coins: uint256,
    base_pool: address,
    base_pool_lp_token: address,
    is_deposit: bool,
) -> uint256:

    base_inputs: DynArray[uint256, MAX_COINS] = [0, 0, 0, 0, 0, 0, 0, 0]
    base_inputs[base_i] = dx

    return self._calc_token_amount(
        base_inputs,
        is_deposit,
        base_pool,
        base_pool_lp_token,
        base_n_coins
    )


@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

API
[{"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"}]},{"stateMutability":"view","type":"function","name":"VERSION","inputs":[],"outputs":[{"name":"","type":"string"}]}]

61306561001161000039613065610000f360003560e01c60026007820660011b61305701601e39600051565b63ffa1ad7481186117fe57346130525760208060805260056040527f312e322e3000000000000000000000000000000000000000000000000000000060605260408160800181518152602082015160208201528051806020830101601f82600003163682375050601f19601f8251602001011690509050810190506080f36117fe565b6383aa796a811861015d576084361034176130525760043580600f0b811861305257610cc05260243580600f0b811861305257610ce0526064358060a01c61305257610d0052610d00516329357750610d40526020610d406004610d5c845afa61010c573d600060003e3d6000fd5b60203d1061305257610d40905051610d20526020610cc05161054052610ce0516105605260443561058052610d00516105a05260006105c052610d20516105e052610158610d4061208e565b610d40f35b63c02c60a681186117fe576084361034176130525760043580600f0b8118613052576110005260243580600f0b811861305257611020526064358060a01c6130525761104052611040516329357750611080526020611080600461109c845afa6101cc573d600060003e3d6000fd5b60203d1061305257611080905051611060526110605180607f1c613052576001810380600f0b811861305257905061108052611040516371511a5e6110c05260206110c060046110dc845afa610227573d600060003e3d6000fd5b60203d10613052576110c0518060a01c61305257611100526111009050516110a0526110405163c66106576110e05260016111005260206110e060246110fc845afa610278573d600060003e3d6000fd5b60203d10613052576110e0518060a01c61305257611120526111209050516110c05260006110e05260006112005260006113205261104051604052611060516060526102c5611440611804565b611440805160208160051b01806110e0828560045afa5050506101208101805160208160051b0180611200828560045afa505050506102408101805160208160051b0180611320828560045afa505050505060a03661144037611000511561034b57611000516110805180820380600f0b811861305257905090506114605260016114a0525b611020511561037857611020516110805180820380600f0b811861305257905090506114805260016114c0525b611000516103e55761100051611320518110156130525760051b61134001516044356110e0511561305257600060051b61110001518082028115838383041417156130525790509050670de0b6b3a764000081049050808201828110613052579050905061144052610522565b611020516104ce5761104051633da575a1611500526020611500600461151c845afa610416573d600060003e3d6000fd5b60203d10613052576115009050516114e052604435610e005261146051610e20526114e051610e40526110a051610e60526110c051610e80526001610ea052610460611500612df0565b6115005160026110e0511061305257600160051b61110001518082028115838383041417156130525790509050670de0b6b3a76400008104905061144052611440516002611320511061305257600160051b6113400151808201828110613052579050905061144052610522565b60206110a051635e0d443f6114e052611460516115005261148051611520526044356115405260206114e060646114fc845afa610510573d600060003e3d6000fd5b60203d10613052576114e0905061084c565b611040516376a2f0f0611500526020611500600461151c845afa61054b573d600060003e3d6000fd5b60203d10613052576115009050516114e0526113205160208160051b018060408261132060045afa5050506114e0516101605261106051610180526105916115206119dc565b61152051611500526114a051610120526114c0516101405261144051610160526113205160208160051b01806101808261132060045afa5050506114e0516102a052611500516102c052611060516102e0526105ee611540611e4b565b61154051611520526114c051611320518110156130525760051b611340015161152051808203828111613052579050905060018103818111613052579050611540526110405163ddca3f43611580526020611580600461159c845afa610659573d600060003e3d6000fd5b60203d10613052576115809050516115605261104051638edfdd5f6115a05260206115a060046115bc845afa610694573d600060003e3d6000fd5b60203d10613052576115a0905051611580526114a051611320518110156130525760051b61134001516114405180820182811061305257905090508060011c90506040526114c051611320518110156130525760051b61134001516115205180820182811061305257905090508060011c9050606052611560516080526115805160a0526107236115c0611c5f565b6115c0516115a052611540516115a0516115405180820281158383830414171561305257905090506402540be40081049050808203828111613052579050905061154052611020516107ba5761154051670de0b6b3a7640000810281670de0b6b3a76400008204186130525790506110e0511561305257600060051b61110001518015613052578082049050905061154052610846565b6110a05163cc2b27d76115c05261154051670de0b6b3a7640000810281670de0b6b3a764000082041861305257905060026110e0511061305257600160051b6111000151801561305257808204905090506115e052611480516116005260206115c060446115dc845afa610833573d600060003e3d6000fd5b60203d10613052576115c0905051611540525b60206115405bf36117fe565b630c601c2c81186117fe576084361034176130525760043580600f0b8118613052576105405260243580600f0b811861305257610560526064358060a01c61305257610580526105805163293577506105c05260206105c060046105dc845afa6108c1573d600060003e3d6000fd5b60203d10613052576105c09050516105a05260006105c05260006106e052600061080052610580516040526105a0516060526108fe610920611804565b610920805160208160051b01806105c0828560045afa5050506101208101805160208160051b01806106e0828560045afa505050506102408101805160208160051b0180610800828560045afa5050505050610580516376a2f0f0610940526020610940600461095c845afa610979573d600060003e3d6000fd5b60203d1061305257610940905051610920526108005160208160051b018060408261080060045afa50505061092051610160526105a051610180526109bf6109606119dc565b610960516109405261054051610800518110156130525760051b6108200151604435610540516105c0518110156130525760051b6105e001518082028115838383041417156130525790509050670de0b6b3a7640000810490508082018281106130525790509050610960526105405161012052610560516101405261096051610160526108005160208160051b01806101808261080060045afa505050610920516102a052610940516102c0526105a0516102e052610a806109a0611e4b565b6109a0516109805261056051610800518110156130525760051b6108200151610980518082038281116130525790509050600181038181116130525790506109a0526105805163ddca3f436109e05260206109e060046109fc845afa610aeb573d600060003e3d6000fd5b60203d10613052576109e09050516109c05261058051638edfdd5f610a00526020610a006004610a1c845afa610b26573d600060003e3d6000fd5b60203d1061305257610a009050516109e05261054051610800518110156130525760051b61082001516109605180820182811061305257905090508060011c905060405261056051610800518110156130525760051b61082001516109805180820182811061305257905090508060011c90506060526109c0516080526109e05160a052610bb5610a20611c5f565b610a20516109a05180820281158383830414171561305257905090506402540be40081049050610a00526109a051610a00518082038281116130525790509050670de0b6b3a7640000810281670de0b6b3a7640000820418613052579050610560516105c0518110156130525760051b6105e0015180156130525780820490509050610a20526020610a20f36117fe565b63d6fc10ab81186117fe576084361034176130525760043580600f0b8118613052576110005260243580600f0b811861305257611020526064358060a01c6130525761104052611040516371511a5e611080526020611080600461109c845afa610cb5573d600060003e3d6000fd5b60203d1061305257611080518060a01c613052576110c0526110c09050516110605261104051633da575a16110a05260206110a060046110bc845afa610d00573d600060003e3d6000fd5b60203d10613052576110a0905051611080526110405163293577506110c05260206110c060046110dc845afa610d3b573d600060003e3d6000fd5b60203d10613052576110c09050516110a05261106051604052610d5f6110e06123e4565b6110e0516110c0526110405163c6610657611100526001611120526020611100602461111c845afa610d96573d600060003e3d6000fd5b60203d1061305257611100518060a01c61305257611140526111409050516110e052600161100051611020518082811882841202189050905012610e5f576023611100527f4e6f742061204d657461706f6f6c20537761702e20557365204261736520706f611120527f6f6c2e00000000000000000000000000000000000000000000000000000000006111405261110050611100518061112001601f826000031636823750506308c379a06110c05260206110e052601f19601f6111005101166044016110dcfd5b61100051610ef657604435610e0052611020516001810380600f0b8118613052579050610e205261108051610e405261106051610e60526110e051610e80526000610ea052610eaf611120612df0565b611120516111005260206000610540526001610560526111005161058052611040516105a05260006105c0526110a0516105e052610eee61112061208e565b611120610f8b565b60016105405260006105605260443561058052611040516105a05260006105c0526110a0516105e052610f2a61112061208e565b611120516111005260206110605163cc2b27d7611120526111005161114052611000516001810380600f0b8118613052579050611160526020611120604461113c845afa610f7d573d600060003e3d6000fd5b60203d106130525761112090505bf36117fe565b63fb79eb2781186110645760843610341761305257600435600401600881351161305257803560208160051b018083610e00375050506024358060011c61305257610f20526044358060a01c61305257610f40526020610e005160208160051b018061054082610e0060045afa505050610f205161066052610f405161068052610f40516106a052610f40516329357750610f60526020610f606004610f7c845afa611042573d600060003e3d6000fd5b60203d1061305257610f609050516106c05261105f610fa0612497565b610fa0f35b63a63530bd81186117fe576064361034176130525760043580600f0b8118613052576105405260243580600f0b811861305257610560526044358060a01c61305257610580526105805163293577506105c05260206105c060046105dc845afa6110d3573d600060003e3d6000fd5b60203d10613052576105c09050516105a0526105805163ddca3f436105e05260206105e060046105fc845afa61110e573d600060003e3d6000fd5b60203d10613052576105e09050516105c05261058051638edfdd5f610600526020610600600461061c845afa611149573d600060003e3d6000fd5b60203d10613052576106009050516105e052600061060052600061072052600061084052610580516040526105a051606052611186610960611804565b610960805160208160051b0180610600828560045afa5050506101208101805160208160051b0180610720828560045afa505050506102408101805160208160051b0180610840828560045afa5050505050602061054051610840518110156130525760051b610860015160405261056051610840518110156130525760051b61086001516060526105c0516080526105e05160a052611227610960611c5f565b610960f36117fe565b63b54e9f0581186117fe576064361034176130525760243580600f0b811861305257610540526044358060a01c6130525761056052610560516376a2f0f06105a05260206105a060046105bc845afa61128e573d600060003e3d6000fd5b60203d10613052576105a0905051610580526105605163293577506105c05260206105c060046105dc845afa6112c9573d600060003e3d6000fd5b60203d10613052576105c09050516105a05260006105c05260006106e052600061080052610560516040526105a051606052611306610920611804565b610920805160208160051b01806105c0828560045afa5050506101208101805160208160051b01806106e0828560045afa505050506102408101805160208160051b0180610800828560045afa50505050506108005160208160051b018060408261080060045afa50505061058051610160526105a0516101805261138c6109406119dc565b6109405161092052610560516318160ddd610960526020610960600461097c845afa6113bd573d600060003e3d6000fd5b60203d106130525761096090505161094052610920516004356109205180820281158383830414171561305257905090506109405180156130525780820490509050808203828111613052579050905061096052610580516101205261054051610140526108005160208160051b01806101608261080060045afa50505061096051610280526105a0516102a0526114566109a0612e67565b6109a05161098052610920516109605180820182811061305257905090506105a0518060011b818160011c18613052579050801561305257808204905090506109a0526105605163ddca3f436109e05260206109e060046109fc845afa6114c2573d600060003e3d6000fd5b60203d10613052576109e09050516105a05180820281158383830414171561305257905090506105a051600181038181116130525790508060021b818160021c18613052579050801561305257808204905090506109c05261056051638edfdd5f610a00526020610a006004610a1c845afa611543573d600060003e3d6000fd5b60203d1061305257610a009050516109e0526108005160208160051b0180610a008261080060045afa505050606036610b203760006008905b80610b80526105a051610b8051186115935761172c565b6000610ba052610b8051610800518110156130525760051b6108200151610b205261054051610b805180607f1c613052571861164457610b20516109605180820281158383830414171561305257905090506109205180156130525780820490509050610980518082038281116130525790509050610ba052610b8051610800518110156130525760051b61082001516109805180820182811061305257905090508060011c9050610b40526116a3565b610b2051610b205161096051808202811583838304141715613052579050905061092051801561305257808204905090508082038281116130525790509050610ba052610b8051610800518110156130525760051b6108200151610b40525b610b40516040526109a0516060526109c0516080526109e05160a0526116ca610bc0611c5f565b610bc051610b6052610b2051610b6051610ba05180820281158383830414171561305257905090506402540be400810490508082038281116130525790509050610b8051610a00518110156130525760051b610a20015260010181811861157c575b505061054051610a00518110156130525760051b610a20015161058051610120526105405161014052610a005160208160051b018061016082610a0060045afa50505061096051610280526105a0516102a05261178a610ba0612e67565b610ba0518082038281116130525790509050610b8052610b805160018103818111613052579050670de0b6b3a7640000810281670de0b6b3a7640000820418613052579050610540516105c0518110156130525760051b6105e0015180156130525780820490509050610b80526020610b80f35b60006000fd5b60405163fd0684b16101a0526101406101a060046101bc845afa61182d573d600060003e3d6000fd5b60403d10613052576101a0516101a001600881511161305257805160208160051b0180610300828560045afa505050506103009050805160208160051b01806080828560045afa505050506040516314f059796102c0526101406102c060046102dc845afa6118a1573d600060003e3d6000fd5b60403d10613052576102c0516102c001600881511161305257805160208160051b0180610420828560045afa505050506104209050805160208160051b01806101a0828560045afa5050505060006102c05260006008905b806103e0526060516103e0511861190f57611985565b6102c05160078111613052576103e0516080518110156130525760051b60a001516103e0516101a0518110156130525760051b6101c001518082028115838383041417156130525790509050670de0b6b3a7640000810490508160051b6102e00152600181016102c052506001018181186118f9575b505060805160208160051b01808382608060045afa5050506101a05160208160051b0161012083018181836101a060045afa505050506102c05160208160051b0161024083018181836102c060045afa5050505050565b60006101a05260006008905b806101c052610180516101c051186119ff57611a35565b6101a0516101c0516040518110156130525760051b6060015180820182811061305257905090506101a0526001018181186119e8575b50506101a051611a49576000815250611c5d565b6101a0516101c052610160516101805180820281158383830414171561305257905090506101e052600060ff905b80610200526101c05161022052600060405160088111613052578015611ae157905b8060051b6060015161024052610220516101c0518082028115838383041417156130525790509050610240518015613052578082049050905061022052600101818118611a99575b50506102205161018051610180510a80156130525780820490509050610220526101c051610240526101e0516101a05180820281158383830414171561305257905090506064810490506102205161018051808202811583838304141715613052579050905080820182811061305257905090506101c05180820281158383830414171561305257905090506101e051606481038181116130525790506101c051808202811583838304141715613052579050905060648104905061018051600181018181106130525790506102205180820281158383830414171561305257905090508082018281106130525790509050801561305257808204905090506101c052610240516101c05111611c20576001610240516101c051808203828111613052579050905011611c4b576101c0518352505050611c5d56611c4b565b60016101c05161024051808203828111613052579050905011611c4b576101c0518352505050611c5d565b600101818118611a7757505060006000fd5b565b6402540be40060a05111611c7857608051815250611d4a565b60405160605180820182811061305257905090506fffffffffffffffffffffffffffffffff8111613052576002810a905060c05260a051608051808202811583838304141715613052579050905060a0516402540be40081038181116130525790508060021b818160021c186130525790506040518082028115838383041417156130525790509050606051808202811583838304141715613052579050905060c051801561305257808204905090506402540be4008101818110613052579050801561305257808204905090508152505b565b600060c05260a05160e052600060ff905b806101005260e05160c05260e05160e0518082028115838383041417156130525790509050606051808201828110613052579050905060e0518060011b818160011c18613052579050604051808201828110613052579050905060805180820382811161305257905090508015613052578082049050905060e05260c05160e05111611e0f57600160c05160e051808203828111613052579050905011611e375760e0518352505050611e4956611e37565b600160e05160c051808203828111613052579050905011611e375760e0518352505050611e49565b600101818118611d5d57505060006000fd5b565b6101405161012051146130525760006101405112613052576102e05180607f1c613052576101405112156130525760006101205112613052576102e05180607f1c61305257610120511215613052576102a051610300526102c05161032052604036610340376103205161038052610300516102e05180820281158383830414171561305257905090506103a05260006008905b806103c0526102e0516103c05118611ef657611fc0565b610120516103c05180607f1c6130525718611f18576101605161036052611f51565b610140516103c05180607f1c6130525714611fb5576103c051610180518110156130525760051b6101a0015161036052611f5156611fb5565b610340516103605180820182811061305257905090506103405261038051610320518082028115838383041417156130525790509050610360516102e051808202811583838304141715613052579050905080156130525780820490509050610380525b600101818118611edf575b505061038051610320518082028115838383041417156130525790509050606481028160648204186130525790506103a0516102e051808202811583838304141715613052579050905080156130525780820490509050610380526103405161032051606481028160648204186130525790506103a0518015613052578082049050905080820182811061305257905090506103c052610320516103e0526103c05160405261038051606052610320516080526103e05160a052612085610400611d4c565b61040051815250565b6000610600526000610720526000610840526105a0516040526105e0516060526120b9610960611804565b610960805160208160051b0180610600828560045afa5050506101208101805160208160051b0180610720828560045afa505050506102408101805160208160051b0180610840828560045afa50505050506105a0516376a2f0f0610980526020610980600461099c845afa612134573d600060003e3d6000fd5b60203d1061305257610980905051610960526108405160208160051b018060408261084060045afa50505061096051610160526105e0516101805261217a6109a06119dc565b6109a051610980526105a05163ddca3f436109c05260206109c060046109dc845afa6121ab573d600060003e3d6000fd5b60203d10613052576109c09050516109a0526105805161056051610600518110156130525760051b61062001518082028115838383041417156130525790509050670de0b6b3a764000081049050600181018181106130525790506109c0526109a0516109e0526105c0516122ab576105a051638edfdd5f610a20526020610a206004610a3c845afa612243573d600060003e3d6000fd5b60203d1061305257610a20905051610a005261054051610840518110156130525760051b610860015160405261056051610840518110156130525760051b61086001516060526109a051608052610a005160a0526122a2610a20611c5f565b610a20516109e0525b61056051610840518110156130525760051b61086001516109c0516402540be4008102816402540be4008204186130525790506109e051806402540be400036402540be4008111613052579050801561305257808204905090508082038281116130525790509050610a005261056051610120526105405161014052610a0051610160526108405160208160051b01806101808261084060045afa505050610960516102a052610980516102c0526105e0516102e05261236c610a40611e4b565b610a4051610a2052610a205161054051610840518110156130525760051b61086001518082038281116130525790509050670de0b6b3a7640000810281670de0b6b3a764000082041861305257905061054051610600518110156130525760051b610620015180156130525780820490509050815250565b6040366060376040515a6000600460c0527f76a9cd3e0000000000000000000000000000000000000000000000000000000060e05260c0805160208201836101200181518152505080830192505050600181610120015260208101905060008161012001526020810190508061010052610100505060206101a0610100516101208585fa905090506060523d602081183d6020100218610180526101808051608052602081015160a05250606051815250565b610680516376a2f0f0610700526020610700600461071c845afa6124c0573d600060003e3d6000fd5b60203d10613052576107009050516106e052600061070052600061082052600061094052610680515a6004610a80527f9c4258c400000000000000000000000000000000000000000000000000000000610aa052610a805060006000610a8051610aa08585fa90509050610a60526001610a8052610a6051612705576000610a805260006106c051600881116130525780156126fe57905b80610aa0526107005160078111613052576106805163c6610657610ac052610aa051610ae0526020610ac06024610adc845afa61259a573d600060003e3d6000fd5b60203d1061305257610ac0518060a01c61305257610b0052610b0090505163313ce567610b20526020610b206004610b3c845afa6125dd573d600060003e3d6000fd5b60203d1061305257610b20518060081c61305257610b6052610b609050518060240360248111613052579050604d81116130525780600a0a90508160051b610720015260018101610700525061082051600781116130525761068051634903b0d1610ac052610aa051610ae0526020610ac06024610adc845afa612666573d600060003e3d6000fd5b60203d1061305257610ac09050518160051b6108400152600181016108205250610940516007811161305257610aa051610700518110156130525760051b6107200151610aa051610820518110156130525760051b61084001518082028115838383041417156130525790509050670de0b6b3a7640000810490508160051b6109600152600181016109405250600101818118612558575b5050612771565b610680516040526106c05160605261271e610aa0611804565b610aa0805160208160051b0180610700828560045afa5050506101208101805160208160051b0180610820828560045afa505050506102408101805160208160051b0180610940828560045afa50505050505b6109405160208160051b018060408261094060045afa5050506106e051610160526106c051610180526127a5610ac06119dc565b610ac051610aa0526106a0516318160ddd610ae0526020610ae06004610afc845afa6127d6573d600060003e3d6000fd5b60203d1061305257610ae0905051610ac0526108205160208160051b0180610ae08261082060045afa50505060006106c051600881116130525780156128ab57905b80610c0052610c0051610540518110156130525760051b6105600151610c20526106605161287257610c0051610ae0518110156130525760051b610b00018051610c205180820382811161305257905090508152506128a0565b610c0051610ae0518110156130525760051b610b00018051610c205180820182811061305257905090508152505b600101818118612818575b505060006106c0516008811161305257801561293957905b80610c0052610c0051610700518110156130525760051b6107200151610c0051610ae0518110156130525760051b610b0001518082028115838383041417156130525790509050670de0b6b3a764000081049050610c0051610940518110156130525760051b61096001526001018181186128c3575b50506109405160208160051b018060408261094060045afa5050506106e051610160526106c0516101805261296f610c206119dc565b610c2051610c0052610c0051610c2052604036610c4037610ac05115612d69576106805163ddca3f43610ca0526020610ca06004610cbc845afa6129b8573d600060003e3d6000fd5b60203d1061305257610ca09050516106c05180820281158383830414171561305257905090506106c051600181038181116130525790508060021b818160021c1861305257905080156130525780820490509050610c8052610a805115612a555761068051638edfdd5f610ca0526020610ca06004610cbc845afa612a42573d600060003e3d6000fd5b60203d1061305257610ca0905051610c40525b6000610ca052610aa051610c005180820182811061305257905090506106c05180156130525780820490509050610cc05260006106c05160088111613052578015612c9857905b80610ce052610c0051610ce051610820518110156130525760051b61084001518082028115838383041417156130525790509050610aa05180156130525780820490509050610d00526000610d2052610ce051610ae0518110156130525760051b610b000151610d4052610d4051610d005111612b3257610d4051610d00518082038281116130525790509050610d2052612b4d565b610d0051610d40518082038281116130525790509050610d20525b610ce051610700518110156130525760051b6107200151610ce051610820518110156130525760051b6108400151610d405180820182811061305257905090508082028115838383041417156130525790509050670de0b6b3a764000081049050610ca052610a8051612c0e57610ce051610ae0518110156130525760051b610b00018051610c8051610d205180820281158383830414171561305257905090506402540be400810490508082038281116130525790509050815250612c8d565b610ca051604052610cc051606052610c8051608052610c405160a052612c35610d60611c5f565b610d6051610c6052610ce051610ae0518110156130525760051b610b00018051610c6051610d205180820281158383830414171561305257905090506402540be4008104905080820382811161305257905090508152505b600101818118612a9c575b505060006106c05160088111613052578015612d2657905b80610ce052610ce051610700518110156130525760051b6107200151610ce051610ae0518110156130525760051b610b0001518082028115838383041417156130525790509050670de0b6b3a764000081049050610ce051610940518110156130525760051b6109600152600101818118612cb0575b50506109405160208160051b018060408261094060045afa5050506106e051610160526106c05161018052612d5c610ce06119dc565b610ce051610c2052612d75565b610c0051815250612dee565b6000610c805261066051612da257610aa051610c20518082038281116130525790509050610c8052612dbd565b610c2051610aa0518082038281116130525790509050610c80525b610c8051610ac0518082028115838383041417156130525790509050610aa051801561305257808204905090508152505b565b61010036610ee0376008610ec052610e0051610e2051610ec0518110156130525760051b610ee00152610ec05160208160051b018061054082610ec060045afa505050610ea05161066052610e605161068052610e80516106a052610e40516106c052612e5e610fe0612497565b610fe051815250565b6102a05180607f1c613052576102c05260006101405112613052576102c051610140511215613052576060366102e0376102805161034052610120516102a05180820281158383830414171561305257905090506103605260006008905b80610380526102a0516103805118612edc57612f84565b6101405160008112613052576103805114612f795761038051610160518110156130525760051b610180015161030052612f1556612f79565b6102e0516103005180820182811061305257905090506102e05261034051610280518082028115838383041417156130525790509050610300516102a051808202811583838304141715613052579050905080156130525780820490509050610340525b600101818118612ec5575b50506103405161028051808202811583838304141715613052579050905060648102816064820418613052579050610360516102a051808202811583838304141715613052579050905080156130525780820490509050610340526102e05161028051606481028160648204186130525790506103605180156130525780820490509050808201828110613052579050905061038052610280516103a0526103805160405261034051606052610280516080526103a05160a0526130496103c0611d4c565b6103c051815250565b600080fd17fe0c460f910852009d1230001a84193065810e00a16576797065728300030a0014

Deployed Bytecode

0x60003560e01c60026007820660011b61305701601e39600051565b63ffa1ad7481186117fe57346130525760208060805260056040527f312e322e3000000000000000000000000000000000000000000000000000000060605260408160800181518152602082015160208201528051806020830101601f82600003163682375050601f19601f8251602001011690509050810190506080f36117fe565b6383aa796a811861015d576084361034176130525760043580600f0b811861305257610cc05260243580600f0b811861305257610ce0526064358060a01c61305257610d0052610d00516329357750610d40526020610d406004610d5c845afa61010c573d600060003e3d6000fd5b60203d1061305257610d40905051610d20526020610cc05161054052610ce0516105605260443561058052610d00516105a05260006105c052610d20516105e052610158610d4061208e565b610d40f35b63c02c60a681186117fe576084361034176130525760043580600f0b8118613052576110005260243580600f0b811861305257611020526064358060a01c6130525761104052611040516329357750611080526020611080600461109c845afa6101cc573d600060003e3d6000fd5b60203d1061305257611080905051611060526110605180607f1c613052576001810380600f0b811861305257905061108052611040516371511a5e6110c05260206110c060046110dc845afa610227573d600060003e3d6000fd5b60203d10613052576110c0518060a01c61305257611100526111009050516110a0526110405163c66106576110e05260016111005260206110e060246110fc845afa610278573d600060003e3d6000fd5b60203d10613052576110e0518060a01c61305257611120526111209050516110c05260006110e05260006112005260006113205261104051604052611060516060526102c5611440611804565b611440805160208160051b01806110e0828560045afa5050506101208101805160208160051b0180611200828560045afa505050506102408101805160208160051b0180611320828560045afa505050505060a03661144037611000511561034b57611000516110805180820380600f0b811861305257905090506114605260016114a0525b611020511561037857611020516110805180820380600f0b811861305257905090506114805260016114c0525b611000516103e55761100051611320518110156130525760051b61134001516044356110e0511561305257600060051b61110001518082028115838383041417156130525790509050670de0b6b3a764000081049050808201828110613052579050905061144052610522565b611020516104ce5761104051633da575a1611500526020611500600461151c845afa610416573d600060003e3d6000fd5b60203d10613052576115009050516114e052604435610e005261146051610e20526114e051610e40526110a051610e60526110c051610e80526001610ea052610460611500612df0565b6115005160026110e0511061305257600160051b61110001518082028115838383041417156130525790509050670de0b6b3a76400008104905061144052611440516002611320511061305257600160051b6113400151808201828110613052579050905061144052610522565b60206110a051635e0d443f6114e052611460516115005261148051611520526044356115405260206114e060646114fc845afa610510573d600060003e3d6000fd5b60203d10613052576114e0905061084c565b611040516376a2f0f0611500526020611500600461151c845afa61054b573d600060003e3d6000fd5b60203d10613052576115009050516114e0526113205160208160051b018060408261132060045afa5050506114e0516101605261106051610180526105916115206119dc565b61152051611500526114a051610120526114c0516101405261144051610160526113205160208160051b01806101808261132060045afa5050506114e0516102a052611500516102c052611060516102e0526105ee611540611e4b565b61154051611520526114c051611320518110156130525760051b611340015161152051808203828111613052579050905060018103818111613052579050611540526110405163ddca3f43611580526020611580600461159c845afa610659573d600060003e3d6000fd5b60203d10613052576115809050516115605261104051638edfdd5f6115a05260206115a060046115bc845afa610694573d600060003e3d6000fd5b60203d10613052576115a0905051611580526114a051611320518110156130525760051b61134001516114405180820182811061305257905090508060011c90506040526114c051611320518110156130525760051b61134001516115205180820182811061305257905090508060011c9050606052611560516080526115805160a0526107236115c0611c5f565b6115c0516115a052611540516115a0516115405180820281158383830414171561305257905090506402540be40081049050808203828111613052579050905061154052611020516107ba5761154051670de0b6b3a7640000810281670de0b6b3a76400008204186130525790506110e0511561305257600060051b61110001518015613052578082049050905061154052610846565b6110a05163cc2b27d76115c05261154051670de0b6b3a7640000810281670de0b6b3a764000082041861305257905060026110e0511061305257600160051b6111000151801561305257808204905090506115e052611480516116005260206115c060446115dc845afa610833573d600060003e3d6000fd5b60203d10613052576115c0905051611540525b60206115405bf36117fe565b630c601c2c81186117fe576084361034176130525760043580600f0b8118613052576105405260243580600f0b811861305257610560526064358060a01c61305257610580526105805163293577506105c05260206105c060046105dc845afa6108c1573d600060003e3d6000fd5b60203d10613052576105c09050516105a05260006105c05260006106e052600061080052610580516040526105a0516060526108fe610920611804565b610920805160208160051b01806105c0828560045afa5050506101208101805160208160051b01806106e0828560045afa505050506102408101805160208160051b0180610800828560045afa5050505050610580516376a2f0f0610940526020610940600461095c845afa610979573d600060003e3d6000fd5b60203d1061305257610940905051610920526108005160208160051b018060408261080060045afa50505061092051610160526105a051610180526109bf6109606119dc565b610960516109405261054051610800518110156130525760051b6108200151604435610540516105c0518110156130525760051b6105e001518082028115838383041417156130525790509050670de0b6b3a7640000810490508082018281106130525790509050610960526105405161012052610560516101405261096051610160526108005160208160051b01806101808261080060045afa505050610920516102a052610940516102c0526105a0516102e052610a806109a0611e4b565b6109a0516109805261056051610800518110156130525760051b6108200151610980518082038281116130525790509050600181038181116130525790506109a0526105805163ddca3f436109e05260206109e060046109fc845afa610aeb573d600060003e3d6000fd5b60203d10613052576109e09050516109c05261058051638edfdd5f610a00526020610a006004610a1c845afa610b26573d600060003e3d6000fd5b60203d1061305257610a009050516109e05261054051610800518110156130525760051b61082001516109605180820182811061305257905090508060011c905060405261056051610800518110156130525760051b61082001516109805180820182811061305257905090508060011c90506060526109c0516080526109e05160a052610bb5610a20611c5f565b610a20516109a05180820281158383830414171561305257905090506402540be40081049050610a00526109a051610a00518082038281116130525790509050670de0b6b3a7640000810281670de0b6b3a7640000820418613052579050610560516105c0518110156130525760051b6105e0015180156130525780820490509050610a20526020610a20f36117fe565b63d6fc10ab81186117fe576084361034176130525760043580600f0b8118613052576110005260243580600f0b811861305257611020526064358060a01c6130525761104052611040516371511a5e611080526020611080600461109c845afa610cb5573d600060003e3d6000fd5b60203d1061305257611080518060a01c613052576110c0526110c09050516110605261104051633da575a16110a05260206110a060046110bc845afa610d00573d600060003e3d6000fd5b60203d10613052576110a0905051611080526110405163293577506110c05260206110c060046110dc845afa610d3b573d600060003e3d6000fd5b60203d10613052576110c09050516110a05261106051604052610d5f6110e06123e4565b6110e0516110c0526110405163c6610657611100526001611120526020611100602461111c845afa610d96573d600060003e3d6000fd5b60203d1061305257611100518060a01c61305257611140526111409050516110e052600161100051611020518082811882841202189050905012610e5f576023611100527f4e6f742061204d657461706f6f6c20537761702e20557365204261736520706f611120527f6f6c2e00000000000000000000000000000000000000000000000000000000006111405261110050611100518061112001601f826000031636823750506308c379a06110c05260206110e052601f19601f6111005101166044016110dcfd5b61100051610ef657604435610e0052611020516001810380600f0b8118613052579050610e205261108051610e405261106051610e60526110e051610e80526000610ea052610eaf611120612df0565b611120516111005260206000610540526001610560526111005161058052611040516105a05260006105c0526110a0516105e052610eee61112061208e565b611120610f8b565b60016105405260006105605260443561058052611040516105a05260006105c0526110a0516105e052610f2a61112061208e565b611120516111005260206110605163cc2b27d7611120526111005161114052611000516001810380600f0b8118613052579050611160526020611120604461113c845afa610f7d573d600060003e3d6000fd5b60203d106130525761112090505bf36117fe565b63fb79eb2781186110645760843610341761305257600435600401600881351161305257803560208160051b018083610e00375050506024358060011c61305257610f20526044358060a01c61305257610f40526020610e005160208160051b018061054082610e0060045afa505050610f205161066052610f405161068052610f40516106a052610f40516329357750610f60526020610f606004610f7c845afa611042573d600060003e3d6000fd5b60203d1061305257610f609050516106c05261105f610fa0612497565b610fa0f35b63a63530bd81186117fe576064361034176130525760043580600f0b8118613052576105405260243580600f0b811861305257610560526044358060a01c61305257610580526105805163293577506105c05260206105c060046105dc845afa6110d3573d600060003e3d6000fd5b60203d10613052576105c09050516105a0526105805163ddca3f436105e05260206105e060046105fc845afa61110e573d600060003e3d6000fd5b60203d10613052576105e09050516105c05261058051638edfdd5f610600526020610600600461061c845afa611149573d600060003e3d6000fd5b60203d10613052576106009050516105e052600061060052600061072052600061084052610580516040526105a051606052611186610960611804565b610960805160208160051b0180610600828560045afa5050506101208101805160208160051b0180610720828560045afa505050506102408101805160208160051b0180610840828560045afa5050505050602061054051610840518110156130525760051b610860015160405261056051610840518110156130525760051b61086001516060526105c0516080526105e05160a052611227610960611c5f565b610960f36117fe565b63b54e9f0581186117fe576064361034176130525760243580600f0b811861305257610540526044358060a01c6130525761056052610560516376a2f0f06105a05260206105a060046105bc845afa61128e573d600060003e3d6000fd5b60203d10613052576105a0905051610580526105605163293577506105c05260206105c060046105dc845afa6112c9573d600060003e3d6000fd5b60203d10613052576105c09050516105a05260006105c05260006106e052600061080052610560516040526105a051606052611306610920611804565b610920805160208160051b01806105c0828560045afa5050506101208101805160208160051b01806106e0828560045afa505050506102408101805160208160051b0180610800828560045afa50505050506108005160208160051b018060408261080060045afa50505061058051610160526105a0516101805261138c6109406119dc565b6109405161092052610560516318160ddd610960526020610960600461097c845afa6113bd573d600060003e3d6000fd5b60203d106130525761096090505161094052610920516004356109205180820281158383830414171561305257905090506109405180156130525780820490509050808203828111613052579050905061096052610580516101205261054051610140526108005160208160051b01806101608261080060045afa50505061096051610280526105a0516102a0526114566109a0612e67565b6109a05161098052610920516109605180820182811061305257905090506105a0518060011b818160011c18613052579050801561305257808204905090506109a0526105605163ddca3f436109e05260206109e060046109fc845afa6114c2573d600060003e3d6000fd5b60203d10613052576109e09050516105a05180820281158383830414171561305257905090506105a051600181038181116130525790508060021b818160021c18613052579050801561305257808204905090506109c05261056051638edfdd5f610a00526020610a006004610a1c845afa611543573d600060003e3d6000fd5b60203d1061305257610a009050516109e0526108005160208160051b0180610a008261080060045afa505050606036610b203760006008905b80610b80526105a051610b8051186115935761172c565b6000610ba052610b8051610800518110156130525760051b6108200151610b205261054051610b805180607f1c613052571861164457610b20516109605180820281158383830414171561305257905090506109205180156130525780820490509050610980518082038281116130525790509050610ba052610b8051610800518110156130525760051b61082001516109805180820182811061305257905090508060011c9050610b40526116a3565b610b2051610b205161096051808202811583838304141715613052579050905061092051801561305257808204905090508082038281116130525790509050610ba052610b8051610800518110156130525760051b6108200151610b40525b610b40516040526109a0516060526109c0516080526109e05160a0526116ca610bc0611c5f565b610bc051610b6052610b2051610b6051610ba05180820281158383830414171561305257905090506402540be400810490508082038281116130525790509050610b8051610a00518110156130525760051b610a20015260010181811861157c575b505061054051610a00518110156130525760051b610a20015161058051610120526105405161014052610a005160208160051b018061016082610a0060045afa50505061096051610280526105a0516102a05261178a610ba0612e67565b610ba0518082038281116130525790509050610b8052610b805160018103818111613052579050670de0b6b3a7640000810281670de0b6b3a7640000820418613052579050610540516105c0518110156130525760051b6105e0015180156130525780820490509050610b80526020610b80f35b60006000fd5b60405163fd0684b16101a0526101406101a060046101bc845afa61182d573d600060003e3d6000fd5b60403d10613052576101a0516101a001600881511161305257805160208160051b0180610300828560045afa505050506103009050805160208160051b01806080828560045afa505050506040516314f059796102c0526101406102c060046102dc845afa6118a1573d600060003e3d6000fd5b60403d10613052576102c0516102c001600881511161305257805160208160051b0180610420828560045afa505050506104209050805160208160051b01806101a0828560045afa5050505060006102c05260006008905b806103e0526060516103e0511861190f57611985565b6102c05160078111613052576103e0516080518110156130525760051b60a001516103e0516101a0518110156130525760051b6101c001518082028115838383041417156130525790509050670de0b6b3a7640000810490508160051b6102e00152600181016102c052506001018181186118f9575b505060805160208160051b01808382608060045afa5050506101a05160208160051b0161012083018181836101a060045afa505050506102c05160208160051b0161024083018181836102c060045afa5050505050565b60006101a05260006008905b806101c052610180516101c051186119ff57611a35565b6101a0516101c0516040518110156130525760051b6060015180820182811061305257905090506101a0526001018181186119e8575b50506101a051611a49576000815250611c5d565b6101a0516101c052610160516101805180820281158383830414171561305257905090506101e052600060ff905b80610200526101c05161022052600060405160088111613052578015611ae157905b8060051b6060015161024052610220516101c0518082028115838383041417156130525790509050610240518015613052578082049050905061022052600101818118611a99575b50506102205161018051610180510a80156130525780820490509050610220526101c051610240526101e0516101a05180820281158383830414171561305257905090506064810490506102205161018051808202811583838304141715613052579050905080820182811061305257905090506101c05180820281158383830414171561305257905090506101e051606481038181116130525790506101c051808202811583838304141715613052579050905060648104905061018051600181018181106130525790506102205180820281158383830414171561305257905090508082018281106130525790509050801561305257808204905090506101c052610240516101c05111611c20576001610240516101c051808203828111613052579050905011611c4b576101c0518352505050611c5d56611c4b565b60016101c05161024051808203828111613052579050905011611c4b576101c0518352505050611c5d565b600101818118611a7757505060006000fd5b565b6402540be40060a05111611c7857608051815250611d4a565b60405160605180820182811061305257905090506fffffffffffffffffffffffffffffffff8111613052576002810a905060c05260a051608051808202811583838304141715613052579050905060a0516402540be40081038181116130525790508060021b818160021c186130525790506040518082028115838383041417156130525790509050606051808202811583838304141715613052579050905060c051801561305257808204905090506402540be4008101818110613052579050801561305257808204905090508152505b565b600060c05260a05160e052600060ff905b806101005260e05160c05260e05160e0518082028115838383041417156130525790509050606051808201828110613052579050905060e0518060011b818160011c18613052579050604051808201828110613052579050905060805180820382811161305257905090508015613052578082049050905060e05260c05160e05111611e0f57600160c05160e051808203828111613052579050905011611e375760e0518352505050611e4956611e37565b600160e05160c051808203828111613052579050905011611e375760e0518352505050611e49565b600101818118611d5d57505060006000fd5b565b6101405161012051146130525760006101405112613052576102e05180607f1c613052576101405112156130525760006101205112613052576102e05180607f1c61305257610120511215613052576102a051610300526102c05161032052604036610340376103205161038052610300516102e05180820281158383830414171561305257905090506103a05260006008905b806103c0526102e0516103c05118611ef657611fc0565b610120516103c05180607f1c6130525718611f18576101605161036052611f51565b610140516103c05180607f1c6130525714611fb5576103c051610180518110156130525760051b6101a0015161036052611f5156611fb5565b610340516103605180820182811061305257905090506103405261038051610320518082028115838383041417156130525790509050610360516102e051808202811583838304141715613052579050905080156130525780820490509050610380525b600101818118611edf575b505061038051610320518082028115838383041417156130525790509050606481028160648204186130525790506103a0516102e051808202811583838304141715613052579050905080156130525780820490509050610380526103405161032051606481028160648204186130525790506103a0518015613052578082049050905080820182811061305257905090506103c052610320516103e0526103c05160405261038051606052610320516080526103e05160a052612085610400611d4c565b61040051815250565b6000610600526000610720526000610840526105a0516040526105e0516060526120b9610960611804565b610960805160208160051b0180610600828560045afa5050506101208101805160208160051b0180610720828560045afa505050506102408101805160208160051b0180610840828560045afa50505050506105a0516376a2f0f0610980526020610980600461099c845afa612134573d600060003e3d6000fd5b60203d1061305257610980905051610960526108405160208160051b018060408261084060045afa50505061096051610160526105e0516101805261217a6109a06119dc565b6109a051610980526105a05163ddca3f436109c05260206109c060046109dc845afa6121ab573d600060003e3d6000fd5b60203d10613052576109c09050516109a0526105805161056051610600518110156130525760051b61062001518082028115838383041417156130525790509050670de0b6b3a764000081049050600181018181106130525790506109c0526109a0516109e0526105c0516122ab576105a051638edfdd5f610a20526020610a206004610a3c845afa612243573d600060003e3d6000fd5b60203d1061305257610a20905051610a005261054051610840518110156130525760051b610860015160405261056051610840518110156130525760051b61086001516060526109a051608052610a005160a0526122a2610a20611c5f565b610a20516109e0525b61056051610840518110156130525760051b61086001516109c0516402540be4008102816402540be4008204186130525790506109e051806402540be400036402540be4008111613052579050801561305257808204905090508082038281116130525790509050610a005261056051610120526105405161014052610a0051610160526108405160208160051b01806101808261084060045afa505050610960516102a052610980516102c0526105e0516102e05261236c610a40611e4b565b610a4051610a2052610a205161054051610840518110156130525760051b61086001518082038281116130525790509050670de0b6b3a7640000810281670de0b6b3a764000082041861305257905061054051610600518110156130525760051b610620015180156130525780820490509050815250565b6040366060376040515a6000600460c0527f76a9cd3e0000000000000000000000000000000000000000000000000000000060e05260c0805160208201836101200181518152505080830192505050600181610120015260208101905060008161012001526020810190508061010052610100505060206101a0610100516101208585fa905090506060523d602081183d6020100218610180526101808051608052602081015160a05250606051815250565b610680516376a2f0f0610700526020610700600461071c845afa6124c0573d600060003e3d6000fd5b60203d10613052576107009050516106e052600061070052600061082052600061094052610680515a6004610a80527f9c4258c400000000000000000000000000000000000000000000000000000000610aa052610a805060006000610a8051610aa08585fa90509050610a60526001610a8052610a6051612705576000610a805260006106c051600881116130525780156126fe57905b80610aa0526107005160078111613052576106805163c6610657610ac052610aa051610ae0526020610ac06024610adc845afa61259a573d600060003e3d6000fd5b60203d1061305257610ac0518060a01c61305257610b0052610b0090505163313ce567610b20526020610b206004610b3c845afa6125dd573d600060003e3d6000fd5b60203d1061305257610b20518060081c61305257610b6052610b609050518060240360248111613052579050604d81116130525780600a0a90508160051b610720015260018101610700525061082051600781116130525761068051634903b0d1610ac052610aa051610ae0526020610ac06024610adc845afa612666573d600060003e3d6000fd5b60203d1061305257610ac09050518160051b6108400152600181016108205250610940516007811161305257610aa051610700518110156130525760051b6107200151610aa051610820518110156130525760051b61084001518082028115838383041417156130525790509050670de0b6b3a7640000810490508160051b6109600152600181016109405250600101818118612558575b5050612771565b610680516040526106c05160605261271e610aa0611804565b610aa0805160208160051b0180610700828560045afa5050506101208101805160208160051b0180610820828560045afa505050506102408101805160208160051b0180610940828560045afa50505050505b6109405160208160051b018060408261094060045afa5050506106e051610160526106c051610180526127a5610ac06119dc565b610ac051610aa0526106a0516318160ddd610ae0526020610ae06004610afc845afa6127d6573d600060003e3d6000fd5b60203d1061305257610ae0905051610ac0526108205160208160051b0180610ae08261082060045afa50505060006106c051600881116130525780156128ab57905b80610c0052610c0051610540518110156130525760051b6105600151610c20526106605161287257610c0051610ae0518110156130525760051b610b00018051610c205180820382811161305257905090508152506128a0565b610c0051610ae0518110156130525760051b610b00018051610c205180820182811061305257905090508152505b600101818118612818575b505060006106c0516008811161305257801561293957905b80610c0052610c0051610700518110156130525760051b6107200151610c0051610ae0518110156130525760051b610b0001518082028115838383041417156130525790509050670de0b6b3a764000081049050610c0051610940518110156130525760051b61096001526001018181186128c3575b50506109405160208160051b018060408261094060045afa5050506106e051610160526106c0516101805261296f610c206119dc565b610c2051610c0052610c0051610c2052604036610c4037610ac05115612d69576106805163ddca3f43610ca0526020610ca06004610cbc845afa6129b8573d600060003e3d6000fd5b60203d1061305257610ca09050516106c05180820281158383830414171561305257905090506106c051600181038181116130525790508060021b818160021c1861305257905080156130525780820490509050610c8052610a805115612a555761068051638edfdd5f610ca0526020610ca06004610cbc845afa612a42573d600060003e3d6000fd5b60203d1061305257610ca0905051610c40525b6000610ca052610aa051610c005180820182811061305257905090506106c05180156130525780820490509050610cc05260006106c05160088111613052578015612c9857905b80610ce052610c0051610ce051610820518110156130525760051b61084001518082028115838383041417156130525790509050610aa05180156130525780820490509050610d00526000610d2052610ce051610ae0518110156130525760051b610b000151610d4052610d4051610d005111612b3257610d4051610d00518082038281116130525790509050610d2052612b4d565b610d0051610d40518082038281116130525790509050610d20525b610ce051610700518110156130525760051b6107200151610ce051610820518110156130525760051b6108400151610d405180820182811061305257905090508082028115838383041417156130525790509050670de0b6b3a764000081049050610ca052610a8051612c0e57610ce051610ae0518110156130525760051b610b00018051610c8051610d205180820281158383830414171561305257905090506402540be400810490508082038281116130525790509050815250612c8d565b610ca051604052610cc051606052610c8051608052610c405160a052612c35610d60611c5f565b610d6051610c6052610ce051610ae0518110156130525760051b610b00018051610c6051610d205180820281158383830414171561305257905090506402540be4008104905080820382811161305257905090508152505b600101818118612a9c575b505060006106c05160088111613052578015612d2657905b80610ce052610ce051610700518110156130525760051b6107200151610ce051610ae0518110156130525760051b610b0001518082028115838383041417156130525790509050670de0b6b3a764000081049050610ce051610940518110156130525760051b6109600152600101818118612cb0575b50506109405160208160051b018060408261094060045afa5050506106e051610160526106c05161018052612d5c610ce06119dc565b610ce051610c2052612d75565b610c0051815250612dee565b6000610c805261066051612da257610aa051610c20518082038281116130525790509050610c8052612dbd565b610c2051610aa0518082038281116130525790509050610c80525b610c8051610ac0518082028115838383041417156130525790509050610aa051801561305257808204905090508152505b565b61010036610ee0376008610ec052610e0051610e2051610ec0518110156130525760051b610ee00152610ec05160208160051b018061054082610ec060045afa505050610ea05161066052610e605161068052610e80516106a052610e40516106c052612e5e610fe0612497565b610fe051815250565b6102a05180607f1c613052576102c05260006101405112613052576102c051610140511215613052576060366102e0376102805161034052610120516102a05180820281158383830414171561305257905090506103605260006008905b80610380526102a0516103805118612edc57612f84565b6101405160008112613052576103805114612f795761038051610160518110156130525760051b610180015161030052612f1556612f79565b6102e0516103005180820182811061305257905090506102e05261034051610280518082028115838383041417156130525790509050610300516102a051808202811583838304141715613052579050905080156130525780820490509050610340525b600101818118612ec5575b50506103405161028051808202811583838304141715613052579050905060648102816064820418613052579050610360516102a051808202811583838304141715613052579050905080156130525780820490509050610340526102e05161028051606481028160648204186130525790506103605180156130525780820490509050808201828110613052579050905061038052610280516103a0526103805160405261034051606052610280516080526103a05160a0526130496103c0611d4c565b6103c051815250565b600080fd17fe0c460f910852009d1230001a

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
Loading...
Loading
Loading...
Loading

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.