ETH Price: $3,757.77 (-2.40%)

Contract

0x07CdEBF81977E111B08C126DEFA07818d0045b80

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

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
1139790902023-12-26 2:15:57350 days ago1703556957  Contract Creation0 ETH

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CurveCryptoViews2Optimized

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 optimize gas
# pragma evm-version paris
"""
@title CurveCryptoViews2Optimized
@author Curve.Fi
@license Copyright (c) Curve.Fi, 2020-2023 - all rights reserved
@notice This contract contains view-only external methods which can be
        gas-inefficient when called from smart contracts.
"""

from vyper.interfaces import ERC20


interface Curve:
    def MATH() -> Math: view
    def A() -> uint256: view
    def gamma() -> uint256: view
    def price_scale() -> uint256: view
    def price_oracle() -> uint256: view
    def get_virtual_price() -> uint256: view
    def balances(i: uint256) -> uint256: view
    def D() -> uint256: view
    def fee_calc(xp: uint256[N_COINS]) -> uint256: view
    def calc_token_fee(
        amounts: uint256[N_COINS], xp: uint256[N_COINS]
    ) -> uint256: view
    def future_A_gamma_time() -> uint256: view
    def totalSupply() -> uint256: view
    def precisions() -> uint256[N_COINS]: view
    def packed_fee_params() -> uint256: view


interface Math:
    def newton_D(
        ANN: uint256,
        gamma: uint256,
        x_unsorted: uint256[N_COINS],
        K0_prev: uint256
    ) -> uint256: view
    def get_y(
        ANN: uint256,
        gamma: uint256,
        x: uint256[N_COINS],
        D: uint256,
        i: uint256,
    ) -> uint256[2]: view
    def newton_y(
        ANN: uint256,
        gamma: uint256,
        x: uint256[N_COINS],
        D: uint256,
        i: uint256,
    ) -> uint256: view


N_COINS: constant(uint256) = 2
PRECISION: constant(uint256) = 10**18


@external
@view
def get_dy(
    i: uint256, j: uint256, dx: uint256, swap: address
) -> uint256:

    dy: uint256 = 0
    xp: uint256[N_COINS] = empty(uint256[N_COINS])

    # dy = (get_y(x + dx) - y) * (1 - fee)
    dy, xp = self._get_dy_nofee(i, j, dx, swap)
    dy -= Curve(swap).fee_calc(xp) * dy / 10**10

    return dy


@view
@external
def get_dx(
    i: uint256, j: uint256, dy: uint256, swap: address
) -> uint256:

    dx: uint256 = 0
    xp: uint256[N_COINS] = empty(uint256[N_COINS])
    fee_dy: uint256 = 0
    _dy: uint256 = dy

    # for more precise dx (but never exact), increase num loops
    for k in range(5):
        dx, xp = self._get_dx_fee(i, j, _dy, swap)
        fee_dy = Curve(swap).fee_calc(xp) * _dy / 10**10
        _dy = dy + fee_dy + 1

    return dx


@view
@external
def calc_withdraw_one_coin(
    token_amount: uint256, i: uint256, swap: address
) -> uint256:

    return self._calc_withdraw_one_coin(token_amount, i, swap)[0]


@view
@external
def calc_token_amount(
    amounts: uint256[N_COINS], deposit: bool, swap: address
) -> uint256:

    d_token: uint256 = 0
    amountsp: uint256[N_COINS] = empty(uint256[N_COINS])
    xp: uint256[N_COINS] = empty(uint256[N_COINS])

    d_token, amountsp, xp = self._calc_dtoken_nofee(amounts, deposit, swap)
    d_token -= (
        Curve(swap).calc_token_fee(amountsp, xp) * d_token / 10**10 + 1
    )

    return d_token


@external
@view
def calc_fee_get_dy(i: uint256, j: uint256, dx: uint256, swap: address
) -> uint256:

    dy: uint256 = 0
    xp: uint256[N_COINS] = empty(uint256[N_COINS])
    dy, xp = self._get_dy_nofee(i, j, dx, swap)

    return Curve(swap).fee_calc(xp) * dy / 10**10


@external
@view
def calc_fee_withdraw_one_coin(
    token_amount: uint256, i: uint256, swap: address
) -> uint256:

    return self._calc_withdraw_one_coin(token_amount, i, swap)[1]


@view
@external
def calc_fee_token_amount(
    amounts: uint256[N_COINS], deposit: bool, swap: address
) -> uint256:

    d_token: uint256 = 0
    amountsp: uint256[N_COINS] = empty(uint256[N_COINS])
    xp: uint256[N_COINS] = empty(uint256[N_COINS])
    d_token, amountsp, xp = self._calc_dtoken_nofee(amounts, deposit, swap)

    return Curve(swap).calc_token_fee(amountsp, xp) * d_token / 10**10 + 1


@internal
@view
def _calc_D_ramp(
    A: uint256,
    gamma: uint256,
    xp: uint256[N_COINS],
    precisions: uint256[N_COINS],
    price_scale: uint256,
    swap: address
) -> uint256:

    math: Math = Curve(swap).MATH()
    D: uint256 = Curve(swap).D()
    if Curve(swap).future_A_gamma_time() > block.timestamp:
        _xp: uint256[N_COINS] = xp
        _xp[0] *= precisions[0]
        _xp[1] = _xp[1] * price_scale * precisions[1] / PRECISION
        D = math.newton_D(A, gamma, _xp, 0)

    return D


@internal
@view
def _get_dx_fee(
    i: uint256, j: uint256, dy: uint256, swap: address
) -> (uint256, uint256[N_COINS]):

    # here, dy must include fees (and 1 wei offset)

    assert i != j and i < N_COINS and j < N_COINS, "coin index out of range"
    assert dy > 0, "do not exchange out 0 coins"

    math: Math = Curve(swap).MATH()

    xp: uint256[N_COINS] = empty(uint256[N_COINS])
    precisions: uint256[N_COINS] = empty(uint256[N_COINS])
    price_scale: uint256 = 0
    D: uint256 = 0
    token_supply: uint256 = 0
    A: uint256 = 0
    gamma: uint256 = 0

    xp, D, token_supply, price_scale, A, gamma, precisions = self._prep_calc(swap)

    # adjust xp with output dy. dy contains fee element, which we handle later
    # (hence this internal method is called _get_dx_fee)
    xp[j] -= dy
    xp = [xp[0] * precisions[0], xp[1] * price_scale * precisions[1] / PRECISION]

    x_out: uint256[2] = math.get_y(A, gamma, xp, D, i)
    dx: uint256 = x_out[0] - xp[i]
    xp[i] = x_out[0]

    if i > 0:
        dx = dx * PRECISION / price_scale
    dx /= precisions[i]

    return dx, xp


@internal
@view
def _get_dy_nofee(
    i: uint256, j: uint256, dx: uint256, swap: address
) -> (uint256, uint256[N_COINS]):

    assert i != j and i < N_COINS and j < N_COINS, "coin index out of range"
    assert dx > 0, "do not exchange 0 coins"

    math: Math = Curve(swap).MATH()

    xp: uint256[N_COINS] = empty(uint256[N_COINS])
    precisions: uint256[N_COINS] = empty(uint256[N_COINS])
    price_scale: uint256 = 0
    D: uint256 = 0
    token_supply: uint256 = 0
    A: uint256 = 0
    gamma: uint256 = 0

    xp, D, token_supply, price_scale, A, gamma, precisions = self._prep_calc(swap)

    # adjust xp with input dx
    xp[i] += dx
    xp = [
        xp[0] * precisions[0],
        xp[1] * price_scale * precisions[1] / PRECISION
    ]

    y_out: uint256[2] = math.get_y(A, gamma, xp, D, j)

    dy: uint256 = xp[j] - y_out[0] - 1
    xp[j] = y_out[0]
    if j > 0:
        dy = dy * PRECISION / price_scale
    dy /= precisions[j]

    return dy, xp


@internal
@view
def _calc_dtoken_nofee(
    amounts: uint256[N_COINS], deposit: bool, swap: address
) -> (uint256, uint256[N_COINS], uint256[N_COINS]):

    math: Math = Curve(swap).MATH()

    xp: uint256[N_COINS] = empty(uint256[N_COINS])
    precisions: uint256[N_COINS] = empty(uint256[N_COINS])
    price_scale: uint256 = 0
    D0: uint256 = 0
    token_supply: uint256 = 0
    A: uint256 = 0
    gamma: uint256 = 0

    xp, D0, token_supply, price_scale, A, gamma, precisions = self._prep_calc(swap)

    amountsp: uint256[N_COINS] = amounts
    if deposit:
        for k in range(N_COINS):
            xp[k] += amounts[k]
    else:
        for k in range(N_COINS):
            xp[k] -= amounts[k]

    xp = [
        xp[0] * precisions[0],
        xp[1] * price_scale * precisions[1] / PRECISION
    ]
    amountsp = [
        amountsp[0]* precisions[0],
        amountsp[1] * price_scale * precisions[1] / PRECISION
    ]

    D: uint256 = math.newton_D(A, gamma, xp, 0)
    d_token: uint256 = token_supply * D / D0

    if deposit:
        d_token -= token_supply
    else:
        d_token = token_supply - d_token

    return d_token, amountsp, xp


@internal
@view
def _calc_withdraw_one_coin(
    token_amount: uint256,
    i: uint256,
    swap: address
) -> (uint256, uint256):

    token_supply: uint256 = Curve(swap).totalSupply()
    assert token_amount <= token_supply  # dev: token amount more than supply
    assert i < N_COINS  # dev: coin out of range

    math: Math = Curve(swap).MATH()

    xx: uint256[N_COINS] = empty(uint256[N_COINS])
    for k in range(N_COINS):
        xx[k] = Curve(swap).balances(k)

    precisions: uint256[N_COINS] = Curve(swap).precisions()
    A: uint256 = Curve(swap).A()
    gamma: uint256 = Curve(swap).gamma()
    D0: uint256 = 0
    p: uint256 = 0

    price_scale_i: uint256 = Curve(swap).price_scale() * precisions[1]
    xp: uint256[N_COINS] = [
        xx[0] * precisions[0],
        unsafe_div(xx[1] * price_scale_i, PRECISION)
    ]
    if i == 0:
        price_scale_i = PRECISION * precisions[0]

    if Curve(swap).future_A_gamma_time() > block.timestamp:
        D0 = math.newton_D(A, gamma, xp, 0)
    else:
        D0 = Curve(swap).D()

    D: uint256 = D0

    fee: uint256 = self._fee(xp, swap)
    dD: uint256 = token_amount * D / token_supply

    D_fee: uint256 = fee * dD / (2 * 10**10) + 1
    approx_fee: uint256 = N_COINS * D_fee * xx[i] / D

    D -= (dD - D_fee)

    y_out: uint256[2] = math.get_y(A, gamma, xp, D, i)
    dy: uint256 = (xp[i] - y_out[0]) * PRECISION / price_scale_i
    xp[i] = y_out[0]

    return dy, approx_fee


@internal
@view
def _fee(xp: uint256[N_COINS], swap: address) -> uint256:

    packed_fee_params: uint256 = Curve(swap).packed_fee_params()
    fee_params: uint256[3] = self._unpack_3(packed_fee_params)
    f: uint256 = xp[0] + xp[1]
    f = fee_params[2] * 10**18 / (
        fee_params[2] + 10**18 -
        (10**18 * N_COINS**N_COINS) * xp[0] / f * xp[1] / f
    )

    return (fee_params[0] * f + fee_params[1] * (10**18 - f)) / 10**18


@internal
@view
def _prep_calc(swap: address) -> (
    uint256[N_COINS],
    uint256,
    uint256,
    uint256,
    uint256,
    uint256,
    uint256[N_COINS]
):

    precisions: uint256[N_COINS] = Curve(swap).precisions()
    token_supply: uint256 = Curve(swap).totalSupply()
    xp: uint256[N_COINS] = empty(uint256[N_COINS])
    for k in range(N_COINS):
        xp[k] = Curve(swap).balances(k)

    price_scale: uint256 = Curve(swap).price_scale()

    A: uint256 = Curve(swap).A()
    gamma: uint256 = Curve(swap).gamma()
    D: uint256 = self._calc_D_ramp(
        A, gamma, xp, precisions, price_scale, swap
    )

    return xp, D, token_supply, price_scale, A, gamma, precisions


@internal
@view
def _unpack_3(_packed: uint256) -> uint256[3]:
    """
    @notice Unpacks a uint256 into 3 integers (values must be <= 10**18)
    @param val The uint256 to unpack
    @return The unpacked uint256[3]
    """
    return [
        (_packed >> 128) & 18446744073709551615,
        (_packed >> 64) & 18446744073709551615,
        _packed & 18446744073709551615,
    ]

Contract Security Audit

Contract ABI

[{"stateMutability":"view","type":"function","name":"get_dy","inputs":[{"name":"i","type":"uint256"},{"name":"j","type":"uint256"},{"name":"dx","type":"uint256"},{"name":"swap","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"get_dx","inputs":[{"name":"i","type":"uint256"},{"name":"j","type":"uint256"},{"name":"dy","type":"uint256"},{"name":"swap","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"calc_withdraw_one_coin","inputs":[{"name":"token_amount","type":"uint256"},{"name":"i","type":"uint256"},{"name":"swap","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"calc_token_amount","inputs":[{"name":"amounts","type":"uint256[2]"},{"name":"deposit","type":"bool"},{"name":"swap","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"calc_fee_get_dy","inputs":[{"name":"i","type":"uint256"},{"name":"j","type":"uint256"},{"name":"dx","type":"uint256"},{"name":"swap","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"calc_fee_withdraw_one_coin","inputs":[{"name":"token_amount","type":"uint256"},{"name":"i","type":"uint256"},{"name":"swap","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"calc_fee_token_amount","inputs":[{"name":"amounts","type":"uint256[2]"},{"name":"deposit","type":"bool"},{"name":"swap","type":"address"}],"outputs":[{"name":"","type":"uint256"}]}]

611c0661001161000039611c06610000f360003560e01c60026005820660011b611bfc01601e39600051565b633bb1f8c1811861010457608436103417611bf7576064358060a01c611bf7576107005260603661072037606060046104203761070051610480526100606107806109db565b61078080516107205260208101805161074052602081015161076052505061072051610700516380823d9e61078052610740516107a052610760516107c0526020610780604461079c845afa6100bb573d600060003e3d6000fd5b60203d10611bf75761078090505161072051808202811583838304141715611bf757905090506402540be40081049050808203828111611bf75790509050610720526020610720f35b63ca7a433d81186105f457608436103417611bf7576064358060a01c611bf75761070052606036610720376060600461042037610700516104805261014a6107806109db565b610780805161072052602081018051610740526020810151610760525050610700516380823d9e61078052610740516107a052610760516107c0526020610780604461079c845afa6101a1573d600060003e3d6000fd5b60203d10611bf75761078090505161072051808202811583838304141715611bf757905090506402540be400810490506107e05260206107e0f36105f4565b6399bf0b76811861030457608436103417611bf7576064358060a01c611bf75761070052608036610720376044356107a05260006005905b806107c05260406004610420376107a0516104605261070051610480526102406107e0610d88565b6107e0805161072052602081018051610740526020810151610760525050610700516380823d9e6107e0526107405161080052610760516108205260206107e060446107fc845afa610297573d600060003e3d6000fd5b60203d10611bf7576107e09050516107a051808202811583838304141715611bf757905090506402540be400810490506107805260443561078051808201828110611bf7579050905060018101818110611bf75790506107a0526001018181186102185750506020610720f35b63a71c3e6581186105f457606436103417611bf7576044358060a01c611bf757610560526020604060046101a037610560516101e052610345610580611303565b610580602081019050f36105f4565b6341477cfb81186105f457606436103417611bf7576044358060a01c611bf757610560526020604060046101a037610560516101e052610395610580611303565b610580f36105f4565b63bc5bc6b781186105f457608436103417611bf7576044358060011c611bf757610700526064358060a01c611bf7576107205260a036610740376040600461042037610700516104605261072051610480526103fb6107e061188e565b6107e080516107405260208101805161076052602081015161078052506060810180516107a05260208101516107c0525050610740516107205163bcc8342e6107e052610760516108005261078051610820526107a051610840526107c0516108605260206107e060846107fc845afa61047a573d600060003e3d6000fd5b60203d10611bf7576107e090505161074051808202811583838304141715611bf757905090506402540be4008104905060018101818110611bf7579050808203828111611bf75790509050610740526020610740f36105f4565b63961d78be81186105f457608436103417611bf7576044358060011c611bf757610700526064358060a01c611bf7576107205260a036610740376040600461042037610700516104605261072051610480526105316107e061188e565b6107e080516107405260208101805161076052602081015161078052506060810180516107a05260208101516107c05250506107205163bcc8342e6107e052610760516108005261078051610820526107a051610840526107c0516108605260206107e060846107fc845afa6105ac573d600060003e3d6000fd5b60203d10611bf7576107e090505161074051808202811583838304141715611bf757905090506402540be4008104905060018101818110611bf7579050610880526020610880f35b60006000fd5b6101205163ed6c1546610160526020610160600461017c845afa610623573d600060003e3d6000fd5b60203d10611bf757610160518060a01c611bf7576101a0526101a09050516101405261012051630f529ba2610180526020610180600461019c845afa61066e573d600060003e3d6000fd5b60203d10611bf75761018090505161016052426101205163f9ed9597610180526020610180600461019c845afa6106aa573d600060003e3d6000fd5b60203d10611bf757610180905051111561078f576080516101c05260a0516101e0526101c05160c051808202811583838304141715611bf757905090506101c0526101e05161010051808202811583838304141715611bf7579050905060e051808202811583838304141715611bf75790509050670de0b6b3a7640000810490506101e0526101405163e68647666102005260405161022052606051610240526101c051610260526101e0516102805260006102a052602061020060a461021c845afa61077c573d600060003e3d6000fd5b60203d10611bf757610200905051610160525b61016051815250565b6102c051633620604b610320526040610320600461033c845afa6107c1573d600060003e3d6000fd5b60403d10611bf757610320905080516102e052602081015161030052506102c0516318160ddd610340526020610340600461035c845afa610807573d600060003e3d6000fd5b60203d10611bf757610340905051610320526040366103403760006002905b80610380526102c051634903b0d16103a052610380516103c05260206103a060246103bc845afa61085c573d600060003e3d6000fd5b60203d10611bf7576103a09050516103805160018111611bf75760051b61034001526001018181186108265750506102c05163b9e8c9fd6103a05260206103a060046103bc845afa6108b3573d600060003e3d6000fd5b60203d10611bf7576103a0905051610380526102c05163f446c1d06103c05260206103c060046103dc845afa6108ee573d600060003e3d6000fd5b60203d10611bf7576103c09050516103a0526102c05163b13739296103e05260206103e060046103fc845afa610929573d600060003e3d6000fd5b60203d10611bf7576103e09050516103c0526103a0516040526103c051606052610340516080526103605160a0526102e05160c0526103005160e05261038051610100526102c051610120526109806104006105fa565b610400516103e0526103405181526103605160208201526103e05160408201526103205160608201526103805160808201526103a05160a08201526103c05160c082015260e081016102e05181526103005160208201525050565b610440516104205114610a085760016104205111156109fb576000610a0b565b6001610440511115610a0b565b60005b610a755760176104a0527f636f696e20696e646578206f7574206f662072616e67650000000000000000006104c0526104a0506104a051806104c001601f826000031636823750506308c379a061046052602061048052601f19601f6104a051011660440161047cfd5b61046051610ae35760176104a0527f646f206e6f742065786368616e6765203020636f696e730000000000000000006104c0526104a0506104a051806104c001601f826000031636823750506308c379a061046052602061048052601f19601f6104a051011660440161047cfd5b6104805163ed6c15466104c05260206104c060046104dc845afa610b0c573d600060003e3d6000fd5b60203d10611bf7576104c0518060a01c611bf757610500526105009050516104a052610120366104c037610480516102c052610b496105e0610798565b6105e080516104c05260208101516104e05260408101516105605260608101516105805260808101516105405260a08101516105a05260c08101516105c05260e0810180516105005260208101516105205250506104205160018111611bf75760051b6104c001805161046051808201828110611bf757905090508152506104c05161050051808202811583838304141715611bf757905090506105e0526104e05161054051808202811583838304141715611bf7579050905061052051808202811583838304141715611bf75790509050670de0b6b3a764000081049050610600526105e0516104c052610600516104e0526104a0516343d188fb610620526105a051610640526105c051610660526104c051610680526104e0516106a052610560516106c052610440516106e052604061062060c461063c845afa610c95573d600060003e3d6000fd5b60403d10611bf757610620905080516105e052602081015161060052506104405160018111611bf75760051b6104c001516105e051808203828111611bf7579050905060018103818111611bf7579050610620526105e0516104405160018111611bf75760051b6104c001526104405115610d425761062051670de0b6b3a7640000810281670de0b6b3a7640000820418611bf7579050610540518015611bf75780820490509050610620525b610620516104405160018111611bf75760051b61050001518015611bf7578082049050905061062052610620518152602081016104c05181526104e05160208201525050565b610440516104205114610db5576001610420511115610da8576000610db8565b6001610440511115610db8565b60005b610e225760176104a0527f636f696e20696e646578206f7574206f662072616e67650000000000000000006104c0526104a0506104a051806104c001601f826000031636823750506308c379a061046052602061048052601f19601f6104a051011660440161047cfd5b61046051610e9057601b6104a0527f646f206e6f742065786368616e6765206f7574203020636f696e7300000000006104c0526104a0506104a051806104c001601f826000031636823750506308c379a061046052602061048052601f19601f6104a051011660440161047cfd5b6104805163ed6c15466104c05260206104c060046104dc845afa610eb9573d600060003e3d6000fd5b60203d10611bf7576104c0518060a01c611bf757610500526105009050516104a052610120366104c037610480516102c052610ef66105e0610798565b6105e080516104c05260208101516104e05260408101516105605260608101516105805260808101516105405260a08101516105a05260c08101516105c05260e0810180516105005260208101516105205250506104405160018111611bf75760051b6104c001805161046051808203828111611bf757905090508152506104c05161050051808202811583838304141715611bf757905090506105e0526104e05161054051808202811583838304141715611bf7579050905061052051808202811583838304141715611bf75790509050670de0b6b3a764000081049050610600526105e0516104c052610600516104e0526104a0516343d188fb610620526105a051610640526105c051610660526104c051610680526104e0516106a052610560516106c052610420516106e052604061062060c461063c845afa611042573d600060003e3d6000fd5b60403d10611bf757610620905080516105e052602081015161060052506105e0516104205160018111611bf75760051b6104c00151808203828111611bf75790509050610620526105e0516104205160018111611bf75760051b6104c0015261042051156110e25761062051670de0b6b3a7640000810281670de0b6b3a7640000820418611bf7579050610540518015611bf75780820490509050610620525b610620516104205160018111611bf75760051b61050001518015611bf7578082049050905061062052610620518152602081016104c05181526104e05160208201525050565b67ffffffffffffffff60405160801c16815267ffffffffffffffff60405160401c16602082015267ffffffffffffffff60405116604082015250565b60a05163e361640560e052602060e0600460fc845afa611189573d600060003e3d6000fd5b60203d10611bf75760e090505160c05260c0516040526111aa610140611128565b610140805160e05260208101516101005260408101516101205250606051608051808201828110611bf757905090506101405261012051670de0b6b3a7640000810281670de0b6b3a7640000820418611bf757905061012051670de0b6b3a76400008101818110611bf7579050606051673782dace9d900000810281673782dace9d900000820418611bf7579050610140518015611bf75780820490509050608051808202811583838304141715611bf75790509050610140518015611bf75780820490509050808203828111611bf757905090508015611bf757808204905090506101405260e05161014051808202811583838304141715611bf75790509050610100516101405180670de0b6b3a764000003670de0b6b3a76400008111611bf7579050808202811583838304141715611bf75790509050808201828110611bf75790509050670de0b6b3a764000081049050815250565b6101e0516318160ddd610220526020610220600461023c845afa61132c573d600060003e3d6000fd5b60203d10611bf75761022090505161020052610200516101a05111611bf75760016101c05111611bf7576101e05163ed6c1546610240526020610240600461025c845afa61137f573d600060003e3d6000fd5b60203d10611bf757610240518060a01c611bf75761028052610280905051610220526040366102403760006002905b80610280526101e051634903b0d16102a052610280516102c05260206102a060246102bc845afa6113e4573d600060003e3d6000fd5b60203d10611bf7576102a09050516102805160018111611bf75760051b61024001526001018181186113ae5750506101e051633620604b6102c05260406102c060046102dc845afa61143b573d600060003e3d6000fd5b60403d10611bf7576102c0905080516102805260208101516102a052506101e05163f446c1d06102e05260206102e060046102fc845afa611481573d600060003e3d6000fd5b60203d10611bf7576102e09050516102c0526101e05163b1373929610300526020610300600461031c845afa6114bc573d600060003e3d6000fd5b60203d10611bf7576103009050516102e052604036610300376101e05163b9e8c9fd610360526020610360600461037c845afa6114fe573d600060003e3d6000fd5b60203d10611bf7576103609050516102a051808202811583838304141715611bf75790509050610340526102405161028051808202811583838304141715611bf7579050905061036052670de0b6b3a76400006102605161034051808202811583838304141715611bf7579050905004610380526101c0516115a15761028051670de0b6b3a7640000810281670de0b6b3a7640000820418611bf7579050610340525b426101e05163f9ed95976103a05260206103a060046103bc845afa6115cb573d600060003e3d6000fd5b60203d10611bf7576103a09050511161161e576101e051630f529ba26103a05260206103a060046103bc845afa611607573d600060003e3d6000fd5b60203d10611bf7576103a090505161030052611680565b6102205163e68647666103e0526102c051610400526102e051610420526103605161044052610380516104605260006104805260206103e060a46103fc845afa61166d573d600060003e3d6000fd5b60203d10611bf7576103e0905051610300525b610300516103a05261036051606052610380516080526101e05160a0526116a86103e0611164565b6103e0516103c0526101a0516103a051808202811583838304141715611bf75790509050610200518015611bf757808204905090506103e0526103c0516103e051808202811583838304141715611bf757905090506404a817c8008104905060018101818110611bf757905061040052610400518060011b818160011c18611bf75790506101c05160018111611bf75760051b6102400151808202811583838304141715611bf757905090506103a0518015611bf75780820490509050610420526103a0516103e05161040051808203828111611bf75790509050808203828111611bf757905090506103a052610220516343d188fb610480526102c0516104a0526102e0516104c052610360516104e05261038051610500526103a051610520526101c05161054052604061048060c461049c845afa6117ee573d600060003e3d6000fd5b60403d10611bf7576104809050805161044052602081015161046052506101c05160018111611bf75760051b610360015161044051808203828111611bf75790509050670de0b6b3a7640000810281670de0b6b3a7640000820418611bf7579050610340518015611bf7578082049050905061048052610440516101c05160018111611bf75760051b610360015261048051815261042051602082015250565b6104805163ed6c15466104c05260206104c060046104dc845afa6118b7573d600060003e3d6000fd5b60203d10611bf7576104c0518060a01c611bf757610500526105009050516104a052610120366104c037610480516102c0526118f46105e0610798565b6105e080516104c05260208101516104e05260408101516105605260608101516105805260808101516105405260a08101516105a05260c08101516105c05260e081018051610500526020810151610520525050610420516105e0526104405161060052610460516119b65760006002905b80610620526106205160018111611bf75760051b6104c00180516106205160018111611bf75760051b6104200151808203828111611bf75790509050815250600101818118611966575050611a08565b60006002905b80610620526106205160018111611bf75760051b6104c00180516106205160018111611bf75760051b6104200151808201828110611bf757905090508152506001018181186119bc5750505b6104c05161050051808202811583838304141715611bf75790509050610620526104e05161054051808202811583838304141715611bf7579050905061052051808202811583838304141715611bf75790509050670de0b6b3a76400008104905061064052610620516104c052610640516104e0526105e05161050051808202811583838304141715611bf75790509050610620526106005161054051808202811583838304141715611bf7579050905061052051808202811583838304141715611bf75790509050670de0b6b3a76400008104905061064052610620516105e05261064051610600526104a05163e6864766610640526105a051610660526105c051610680526104c0516106a0526104e0516106c05260006106e052602061064060a461065c845afa611b41573d600060003e3d6000fd5b60203d10611bf757610640905051610620526105805161062051808202811583838304141715611bf75790509050610560518015611bf757808204905090506106405261046051611bab576105805161064051808203828111611bf7579050905061064052611bc6565b6106405161058051808203828111611bf75790509050610640525b610640518152602081016105e051815261060051602082015250606081016104c05181526104e05160208201525050565b600080fd039e0354001a01e004d484191c06810a00a16576797065728300030a0014

Deployed Bytecode

0x60003560e01c60026005820660011b611bfc01601e39600051565b633bb1f8c1811861010457608436103417611bf7576064358060a01c611bf7576107005260603661072037606060046104203761070051610480526100606107806109db565b61078080516107205260208101805161074052602081015161076052505061072051610700516380823d9e61078052610740516107a052610760516107c0526020610780604461079c845afa6100bb573d600060003e3d6000fd5b60203d10611bf75761078090505161072051808202811583838304141715611bf757905090506402540be40081049050808203828111611bf75790509050610720526020610720f35b63ca7a433d81186105f457608436103417611bf7576064358060a01c611bf75761070052606036610720376060600461042037610700516104805261014a6107806109db565b610780805161072052602081018051610740526020810151610760525050610700516380823d9e61078052610740516107a052610760516107c0526020610780604461079c845afa6101a1573d600060003e3d6000fd5b60203d10611bf75761078090505161072051808202811583838304141715611bf757905090506402540be400810490506107e05260206107e0f36105f4565b6399bf0b76811861030457608436103417611bf7576064358060a01c611bf75761070052608036610720376044356107a05260006005905b806107c05260406004610420376107a0516104605261070051610480526102406107e0610d88565b6107e0805161072052602081018051610740526020810151610760525050610700516380823d9e6107e0526107405161080052610760516108205260206107e060446107fc845afa610297573d600060003e3d6000fd5b60203d10611bf7576107e09050516107a051808202811583838304141715611bf757905090506402540be400810490506107805260443561078051808201828110611bf7579050905060018101818110611bf75790506107a0526001018181186102185750506020610720f35b63a71c3e6581186105f457606436103417611bf7576044358060a01c611bf757610560526020604060046101a037610560516101e052610345610580611303565b610580602081019050f36105f4565b6341477cfb81186105f457606436103417611bf7576044358060a01c611bf757610560526020604060046101a037610560516101e052610395610580611303565b610580f36105f4565b63bc5bc6b781186105f457608436103417611bf7576044358060011c611bf757610700526064358060a01c611bf7576107205260a036610740376040600461042037610700516104605261072051610480526103fb6107e061188e565b6107e080516107405260208101805161076052602081015161078052506060810180516107a05260208101516107c0525050610740516107205163bcc8342e6107e052610760516108005261078051610820526107a051610840526107c0516108605260206107e060846107fc845afa61047a573d600060003e3d6000fd5b60203d10611bf7576107e090505161074051808202811583838304141715611bf757905090506402540be4008104905060018101818110611bf7579050808203828111611bf75790509050610740526020610740f36105f4565b63961d78be81186105f457608436103417611bf7576044358060011c611bf757610700526064358060a01c611bf7576107205260a036610740376040600461042037610700516104605261072051610480526105316107e061188e565b6107e080516107405260208101805161076052602081015161078052506060810180516107a05260208101516107c05250506107205163bcc8342e6107e052610760516108005261078051610820526107a051610840526107c0516108605260206107e060846107fc845afa6105ac573d600060003e3d6000fd5b60203d10611bf7576107e090505161074051808202811583838304141715611bf757905090506402540be4008104905060018101818110611bf7579050610880526020610880f35b60006000fd5b6101205163ed6c1546610160526020610160600461017c845afa610623573d600060003e3d6000fd5b60203d10611bf757610160518060a01c611bf7576101a0526101a09050516101405261012051630f529ba2610180526020610180600461019c845afa61066e573d600060003e3d6000fd5b60203d10611bf75761018090505161016052426101205163f9ed9597610180526020610180600461019c845afa6106aa573d600060003e3d6000fd5b60203d10611bf757610180905051111561078f576080516101c05260a0516101e0526101c05160c051808202811583838304141715611bf757905090506101c0526101e05161010051808202811583838304141715611bf7579050905060e051808202811583838304141715611bf75790509050670de0b6b3a7640000810490506101e0526101405163e68647666102005260405161022052606051610240526101c051610260526101e0516102805260006102a052602061020060a461021c845afa61077c573d600060003e3d6000fd5b60203d10611bf757610200905051610160525b61016051815250565b6102c051633620604b610320526040610320600461033c845afa6107c1573d600060003e3d6000fd5b60403d10611bf757610320905080516102e052602081015161030052506102c0516318160ddd610340526020610340600461035c845afa610807573d600060003e3d6000fd5b60203d10611bf757610340905051610320526040366103403760006002905b80610380526102c051634903b0d16103a052610380516103c05260206103a060246103bc845afa61085c573d600060003e3d6000fd5b60203d10611bf7576103a09050516103805160018111611bf75760051b61034001526001018181186108265750506102c05163b9e8c9fd6103a05260206103a060046103bc845afa6108b3573d600060003e3d6000fd5b60203d10611bf7576103a0905051610380526102c05163f446c1d06103c05260206103c060046103dc845afa6108ee573d600060003e3d6000fd5b60203d10611bf7576103c09050516103a0526102c05163b13739296103e05260206103e060046103fc845afa610929573d600060003e3d6000fd5b60203d10611bf7576103e09050516103c0526103a0516040526103c051606052610340516080526103605160a0526102e05160c0526103005160e05261038051610100526102c051610120526109806104006105fa565b610400516103e0526103405181526103605160208201526103e05160408201526103205160608201526103805160808201526103a05160a08201526103c05160c082015260e081016102e05181526103005160208201525050565b610440516104205114610a085760016104205111156109fb576000610a0b565b6001610440511115610a0b565b60005b610a755760176104a0527f636f696e20696e646578206f7574206f662072616e67650000000000000000006104c0526104a0506104a051806104c001601f826000031636823750506308c379a061046052602061048052601f19601f6104a051011660440161047cfd5b61046051610ae35760176104a0527f646f206e6f742065786368616e6765203020636f696e730000000000000000006104c0526104a0506104a051806104c001601f826000031636823750506308c379a061046052602061048052601f19601f6104a051011660440161047cfd5b6104805163ed6c15466104c05260206104c060046104dc845afa610b0c573d600060003e3d6000fd5b60203d10611bf7576104c0518060a01c611bf757610500526105009050516104a052610120366104c037610480516102c052610b496105e0610798565b6105e080516104c05260208101516104e05260408101516105605260608101516105805260808101516105405260a08101516105a05260c08101516105c05260e0810180516105005260208101516105205250506104205160018111611bf75760051b6104c001805161046051808201828110611bf757905090508152506104c05161050051808202811583838304141715611bf757905090506105e0526104e05161054051808202811583838304141715611bf7579050905061052051808202811583838304141715611bf75790509050670de0b6b3a764000081049050610600526105e0516104c052610600516104e0526104a0516343d188fb610620526105a051610640526105c051610660526104c051610680526104e0516106a052610560516106c052610440516106e052604061062060c461063c845afa610c95573d600060003e3d6000fd5b60403d10611bf757610620905080516105e052602081015161060052506104405160018111611bf75760051b6104c001516105e051808203828111611bf7579050905060018103818111611bf7579050610620526105e0516104405160018111611bf75760051b6104c001526104405115610d425761062051670de0b6b3a7640000810281670de0b6b3a7640000820418611bf7579050610540518015611bf75780820490509050610620525b610620516104405160018111611bf75760051b61050001518015611bf7578082049050905061062052610620518152602081016104c05181526104e05160208201525050565b610440516104205114610db5576001610420511115610da8576000610db8565b6001610440511115610db8565b60005b610e225760176104a0527f636f696e20696e646578206f7574206f662072616e67650000000000000000006104c0526104a0506104a051806104c001601f826000031636823750506308c379a061046052602061048052601f19601f6104a051011660440161047cfd5b61046051610e9057601b6104a0527f646f206e6f742065786368616e6765206f7574203020636f696e7300000000006104c0526104a0506104a051806104c001601f826000031636823750506308c379a061046052602061048052601f19601f6104a051011660440161047cfd5b6104805163ed6c15466104c05260206104c060046104dc845afa610eb9573d600060003e3d6000fd5b60203d10611bf7576104c0518060a01c611bf757610500526105009050516104a052610120366104c037610480516102c052610ef66105e0610798565b6105e080516104c05260208101516104e05260408101516105605260608101516105805260808101516105405260a08101516105a05260c08101516105c05260e0810180516105005260208101516105205250506104405160018111611bf75760051b6104c001805161046051808203828111611bf757905090508152506104c05161050051808202811583838304141715611bf757905090506105e0526104e05161054051808202811583838304141715611bf7579050905061052051808202811583838304141715611bf75790509050670de0b6b3a764000081049050610600526105e0516104c052610600516104e0526104a0516343d188fb610620526105a051610640526105c051610660526104c051610680526104e0516106a052610560516106c052610420516106e052604061062060c461063c845afa611042573d600060003e3d6000fd5b60403d10611bf757610620905080516105e052602081015161060052506105e0516104205160018111611bf75760051b6104c00151808203828111611bf75790509050610620526105e0516104205160018111611bf75760051b6104c0015261042051156110e25761062051670de0b6b3a7640000810281670de0b6b3a7640000820418611bf7579050610540518015611bf75780820490509050610620525b610620516104205160018111611bf75760051b61050001518015611bf7578082049050905061062052610620518152602081016104c05181526104e05160208201525050565b67ffffffffffffffff60405160801c16815267ffffffffffffffff60405160401c16602082015267ffffffffffffffff60405116604082015250565b60a05163e361640560e052602060e0600460fc845afa611189573d600060003e3d6000fd5b60203d10611bf75760e090505160c05260c0516040526111aa610140611128565b610140805160e05260208101516101005260408101516101205250606051608051808201828110611bf757905090506101405261012051670de0b6b3a7640000810281670de0b6b3a7640000820418611bf757905061012051670de0b6b3a76400008101818110611bf7579050606051673782dace9d900000810281673782dace9d900000820418611bf7579050610140518015611bf75780820490509050608051808202811583838304141715611bf75790509050610140518015611bf75780820490509050808203828111611bf757905090508015611bf757808204905090506101405260e05161014051808202811583838304141715611bf75790509050610100516101405180670de0b6b3a764000003670de0b6b3a76400008111611bf7579050808202811583838304141715611bf75790509050808201828110611bf75790509050670de0b6b3a764000081049050815250565b6101e0516318160ddd610220526020610220600461023c845afa61132c573d600060003e3d6000fd5b60203d10611bf75761022090505161020052610200516101a05111611bf75760016101c05111611bf7576101e05163ed6c1546610240526020610240600461025c845afa61137f573d600060003e3d6000fd5b60203d10611bf757610240518060a01c611bf75761028052610280905051610220526040366102403760006002905b80610280526101e051634903b0d16102a052610280516102c05260206102a060246102bc845afa6113e4573d600060003e3d6000fd5b60203d10611bf7576102a09050516102805160018111611bf75760051b61024001526001018181186113ae5750506101e051633620604b6102c05260406102c060046102dc845afa61143b573d600060003e3d6000fd5b60403d10611bf7576102c0905080516102805260208101516102a052506101e05163f446c1d06102e05260206102e060046102fc845afa611481573d600060003e3d6000fd5b60203d10611bf7576102e09050516102c0526101e05163b1373929610300526020610300600461031c845afa6114bc573d600060003e3d6000fd5b60203d10611bf7576103009050516102e052604036610300376101e05163b9e8c9fd610360526020610360600461037c845afa6114fe573d600060003e3d6000fd5b60203d10611bf7576103609050516102a051808202811583838304141715611bf75790509050610340526102405161028051808202811583838304141715611bf7579050905061036052670de0b6b3a76400006102605161034051808202811583838304141715611bf7579050905004610380526101c0516115a15761028051670de0b6b3a7640000810281670de0b6b3a7640000820418611bf7579050610340525b426101e05163f9ed95976103a05260206103a060046103bc845afa6115cb573d600060003e3d6000fd5b60203d10611bf7576103a09050511161161e576101e051630f529ba26103a05260206103a060046103bc845afa611607573d600060003e3d6000fd5b60203d10611bf7576103a090505161030052611680565b6102205163e68647666103e0526102c051610400526102e051610420526103605161044052610380516104605260006104805260206103e060a46103fc845afa61166d573d600060003e3d6000fd5b60203d10611bf7576103e0905051610300525b610300516103a05261036051606052610380516080526101e05160a0526116a86103e0611164565b6103e0516103c0526101a0516103a051808202811583838304141715611bf75790509050610200518015611bf757808204905090506103e0526103c0516103e051808202811583838304141715611bf757905090506404a817c8008104905060018101818110611bf757905061040052610400518060011b818160011c18611bf75790506101c05160018111611bf75760051b6102400151808202811583838304141715611bf757905090506103a0518015611bf75780820490509050610420526103a0516103e05161040051808203828111611bf75790509050808203828111611bf757905090506103a052610220516343d188fb610480526102c0516104a0526102e0516104c052610360516104e05261038051610500526103a051610520526101c05161054052604061048060c461049c845afa6117ee573d600060003e3d6000fd5b60403d10611bf7576104809050805161044052602081015161046052506101c05160018111611bf75760051b610360015161044051808203828111611bf75790509050670de0b6b3a7640000810281670de0b6b3a7640000820418611bf7579050610340518015611bf7578082049050905061048052610440516101c05160018111611bf75760051b610360015261048051815261042051602082015250565b6104805163ed6c15466104c05260206104c060046104dc845afa6118b7573d600060003e3d6000fd5b60203d10611bf7576104c0518060a01c611bf757610500526105009050516104a052610120366104c037610480516102c0526118f46105e0610798565b6105e080516104c05260208101516104e05260408101516105605260608101516105805260808101516105405260a08101516105a05260c08101516105c05260e081018051610500526020810151610520525050610420516105e0526104405161060052610460516119b65760006002905b80610620526106205160018111611bf75760051b6104c00180516106205160018111611bf75760051b6104200151808203828111611bf75790509050815250600101818118611966575050611a08565b60006002905b80610620526106205160018111611bf75760051b6104c00180516106205160018111611bf75760051b6104200151808201828110611bf757905090508152506001018181186119bc5750505b6104c05161050051808202811583838304141715611bf75790509050610620526104e05161054051808202811583838304141715611bf7579050905061052051808202811583838304141715611bf75790509050670de0b6b3a76400008104905061064052610620516104c052610640516104e0526105e05161050051808202811583838304141715611bf75790509050610620526106005161054051808202811583838304141715611bf7579050905061052051808202811583838304141715611bf75790509050670de0b6b3a76400008104905061064052610620516105e05261064051610600526104a05163e6864766610640526105a051610660526105c051610680526104c0516106a0526104e0516106c05260006106e052602061064060a461065c845afa611b41573d600060003e3d6000fd5b60203d10611bf757610640905051610620526105805161062051808202811583838304141715611bf75790509050610560518015611bf757808204905090506106405261046051611bab576105805161064051808203828111611bf7579050905061064052611bc6565b6106405161058051808203828111611bf75790509050610640525b610640518152602081016105e051815261060051602082015250606081016104c05181526104e05160208201525050565b600080fd039e0354001a01e004d4

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
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.