xDAI Price: $1.00 (-0.01%)
Gas: 1.6 GWei

Contract

0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F
Transaction Hash
Method
Block
From
To
Deploy_pool373576092024-12-04 18:32:552 days ago1733337175IN
0x98EE851a...32aeaAF7F
0 xDAI0.005400161.3
Deploy_pool345292162024-06-18 15:43:55171 days ago1718725435IN
0x98EE851a...32aeaAF7F
0 xDAI0.009547772.3
Set_fee_receiver345064512024-06-17 7:09:30173 days ago1718608170IN
0x98EE851a...32aeaAF7F
0 xDAI0.000183096.1
Set_math_impleme...343078732024-06-05 10:04:55185 days ago1717581895IN
0x98EE851a...32aeaAF7F
0 xDAI0.000090113.00000001
Set_pool_impleme...343078722024-06-05 10:04:45185 days ago1717581885IN
0x98EE851a...32aeaAF7F
0 xDAI0.000091633.00000001
Deploy_pool338227852024-05-07 11:54:00214 days ago1715082840IN
0x98EE851a...32aeaAF7F
0 xDAI0.007286871.6
Deploy_pool337272002024-05-01 18:55:10219 days ago1714589710IN
0x98EE851a...32aeaAF7F
0 xDAI0.010457592.3
Deploy_pool333276112024-04-07 20:10:25243 days ago1712520625IN
0x98EE851a...32aeaAF7F
0 xDAI0.004547031.00000001
Deploy_pool328931152024-03-12 12:45:45269 days ago1710247545IN
0x98EE851a...32aeaAF7F
0 xDAI0.012230632.7
Deploy_pool328774942024-03-11 13:52:35270 days ago1710165155IN
0x98EE851a...32aeaAF7F
0 xDAI0.023102255.1
Deploy_pool328103292024-03-07 12:49:00274 days ago1709815740IN
0x98EE851a...32aeaAF7F
0 xDAI0.022649265
Deploy_pool328102692024-03-07 12:43:35274 days ago1709815415IN
0x98EE851a...32aeaAF7F
0 xDAI0.022734225
Deploy_pool326997512024-02-29 21:25:05281 days ago1709241905IN
0x98EE851a...32aeaAF7F
0 xDAI0.004571251
Deploy_pool316885222023-12-29 19:16:35343 days ago1703877395IN
0x98EE851a...32aeaAF7F
0 xDAI0.000178491.9
Deploy_pool316884772023-12-29 19:12:40343 days ago1703877160IN
0x98EE851a...32aeaAF7F
0 xDAI0.000055221.9
Set_math_impleme...316180682023-12-25 11:41:35348 days ago1703504495IN
0x98EE851a...32aeaAF7F
0 xDAI0.000072121.53015
Set_views_implem...316180662023-12-25 11:41:25348 days ago1703504485IN
0x98EE851a...32aeaAF7F
0 xDAI0.000072091.53015
Set_pool_impleme...316180382023-12-25 11:39:05348 days ago1703504345IN
0x98EE851a...32aeaAF7F
0 xDAI0.000072181.51500001
Initialise_owner...316180362023-12-25 11:38:55348 days ago1703504335IN
0x98EE851a...32aeaAF7F
0 xDAI0.000107461.51500001
Initialise_owner...316175432023-12-25 10:56:35348 days ago1703501795IN
0x98EE851a...32aeaAF7F
0 xDAI0.00003271.50000001

Latest 12 internal transactions

Parent Transaction Hash Block From To
373576092024-12-04 18:32:552 days ago1733337175
0x98EE851a...32aeaAF7F
 Contract Creation0 xDAI
345292162024-06-18 15:43:55171 days ago1718725435
0x98EE851a...32aeaAF7F
 Contract Creation0 xDAI
338227852024-05-07 11:54:00214 days ago1715082840
0x98EE851a...32aeaAF7F
 Contract Creation0 xDAI
337272002024-05-01 18:55:10219 days ago1714589710
0x98EE851a...32aeaAF7F
 Contract Creation0 xDAI
333276112024-04-07 20:10:25243 days ago1712520625
0x98EE851a...32aeaAF7F
 Contract Creation0 xDAI
328931152024-03-12 12:45:45269 days ago1710247545
0x98EE851a...32aeaAF7F
 Contract Creation0 xDAI
328774942024-03-11 13:52:35270 days ago1710165155
0x98EE851a...32aeaAF7F
 Contract Creation0 xDAI
328103292024-03-07 12:49:00274 days ago1709815740
0x98EE851a...32aeaAF7F
 Contract Creation0 xDAI
328102692024-03-07 12:43:35274 days ago1709815415
0x98EE851a...32aeaAF7F
 Contract Creation0 xDAI
326997512024-02-29 21:25:05281 days ago1709241905
0x98EE851a...32aeaAF7F
 Contract Creation0 xDAI
316885222023-12-29 19:16:35343 days ago1703877395
0x98EE851a...32aeaAF7F
 Contract Creation0 xDAI
316180342023-12-25 11:38:45348 days ago1703504325  Contract Creation0 xDAI
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CurveTwocryptoFactory

Compiler Version
vyper:0.3.10

Optimization Enabled:
N/A

Other Settings:
None license

Contract Source Code (Vyper language format)

# pragma version 0.3.10
# pragma optimize gas
# pragma evm-version paris
"""
@title CurveTwocryptoFactory
@author Curve.Fi
@license Copyright (c) Curve.Fi, 2020-2023 - all rights reserved
@notice Permissionless 2-coin cryptoswap pool deployer and registry
"""

interface TwocryptoPool:
    def balances(i: uint256) -> uint256: view

interface ERC20:
    def decimals() -> uint256: view


event TwocryptoPoolDeployed:
    pool: address
    name: String[64]
    symbol: String[32]
    coins: address[N_COINS]
    math: address
    salt: bytes32
    precisions: uint256[N_COINS]
    packed_A_gamma: uint256
    packed_fee_params: uint256
    packed_rebalancing_params: uint256
    packed_prices: uint256
    deployer: address


event LiquidityGaugeDeployed:
    pool: address
    gauge: address

event UpdateFeeReceiver:
    _old_fee_receiver: address
    _new_fee_receiver: address

event UpdatePoolImplementation:
    _implemention_id: uint256
    _old_pool_implementation: address
    _new_pool_implementation: address

event UpdateGaugeImplementation:
    _old_gauge_implementation: address
    _new_gauge_implementation: address

event UpdateMathImplementation:
    _old_math_implementation: address
    _new_math_implementation: address

event UpdateViewsImplementation:
    _old_views_implementation: address
    _new_views_implementation: address

event TransferOwnership:
    _old_owner: address
    _new_owner: address


struct PoolArray:
    liquidity_gauge: address
    coins: address[N_COINS]
    decimals: uint256[N_COINS]
    implementation: address


N_COINS: constant(uint256) = 2
A_MULTIPLIER: constant(uint256) = 10000

# Limits
MAX_FEE: constant(uint256) = 10 * 10 ** 9

deployer: address
admin: public(address)
future_admin: public(address)

# fee receiver for all pools:
fee_receiver: public(address)

pool_implementations: public(HashMap[uint256, address])
gauge_implementation: public(address)
views_implementation: public(address)
math_implementation: public(address)

# mapping of coins -> pools for trading
# a mapping key is generated for each pair of addresses via
# `bitwise_xor(convert(a, uint256), convert(b, uint256))`
markets: HashMap[uint256, DynArray[address, 4294967296]]
pool_data: HashMap[address, PoolArray]
pool_list: public(DynArray[address, 4294967296])   # master list of pools


@external
def __init__():
    self.deployer = tx.origin


@external
def initialise_ownership(_fee_receiver: address, _admin: address):

    assert msg.sender == self.deployer
    assert self.admin == empty(address)

    self.fee_receiver = _fee_receiver
    self.admin = _admin

    log UpdateFeeReceiver(empty(address), _fee_receiver)
    log TransferOwnership(empty(address), _admin)


@internal
@pure
def _pack_3(x: uint256[3]) -> uint256:
    """
    @notice Packs 3 integers with values <= 10**18 into a uint256
    @param x The uint256[3] to pack
    @return The packed uint256
    """
    return (x[0] << 128) | (x[1] << 64) | x[2]


@pure
@internal
def _pack_2(p1: uint256, p2: uint256) -> uint256:
    return p1 | (p2 << 128)


# <--- Pool Deployers --->

@external
def deploy_pool(
    _name: String[64],
    _symbol: String[32],
    _coins: address[N_COINS],
    implementation_id: uint256,
    A: uint256,
    gamma: uint256,
    mid_fee: uint256,
    out_fee: uint256,
    fee_gamma: uint256,
    allowed_extra_profit: uint256,
    adjustment_step: uint256,
    ma_exp_time: uint256,
    initial_price: uint256,
) -> address:
    """
    @notice Deploy a new pool
    @param _name Name of the new plain pool
    @param _symbol Symbol for the new plain pool - will be concatenated with factory symbol

    @return Address of the deployed pool
    """
    pool_implementation: address = self.pool_implementations[implementation_id]
    _math_implementation: address = self.math_implementation
    assert pool_implementation != empty(address), "Pool implementation not set"
    assert _math_implementation != empty(address), "Math implementation not set"

    assert mid_fee < MAX_FEE-1  # mid_fee can be zero
    assert out_fee >= mid_fee
    assert out_fee < MAX_FEE-1
    assert fee_gamma < 10**18+1
    assert fee_gamma > 0

    assert allowed_extra_profit < 10**18+1

    assert adjustment_step < 10**18+1
    assert adjustment_step > 0

    assert ma_exp_time < 872542  # 7 * 24 * 60 * 60 / ln(2)
    assert ma_exp_time > 86  # 60 / ln(2)

    assert initial_price > 10**6 and initial_price < 10**30  # dev: initial price out of bound

    assert _coins[0] != _coins[1], "Duplicate coins"

    decimals: uint256[N_COINS] = empty(uint256[N_COINS])
    precisions: uint256[N_COINS] = empty(uint256[N_COINS])
    for i in range(N_COINS):
        d: uint256 = ERC20(_coins[i]).decimals()
        assert d < 19, "Max 18 decimals for coins"
        decimals[i] = d
        precisions[i] = 10 ** (18 - d)

    # pack precision
    packed_precisions: uint256 = self._pack_2(precisions[0], precisions[1])

    # pack fees
    packed_fee_params: uint256 = self._pack_3(
        [mid_fee, out_fee, fee_gamma]
    )

    # pack liquidity rebalancing params
    packed_rebalancing_params: uint256 = self._pack_3(
        [allowed_extra_profit, adjustment_step, ma_exp_time]
    )

    # pack gamma and A
    packed_gamma_A: uint256 = self._pack_2(gamma, A)

    # pool is an ERC20 implementation
    _salt: bytes32 = block.prevhash
    pool: address = create_from_blueprint(
        pool_implementation,  # blueprint: address
        _name,  # String[64]
        _symbol,  # String[32]
        _coins,  # address[N_COINS]
        _math_implementation,  # address
        _salt,  # bytes32
        packed_precisions,  # uint256
        packed_gamma_A,  # uint256
        packed_fee_params,  # uint256
        packed_rebalancing_params,  # uint256
        initial_price,  # uint256
        code_offset=3,
    )

    # populate pool data
    self.pool_list.append(pool)

    self.pool_data[pool].decimals = decimals
    self.pool_data[pool].coins = _coins
    self.pool_data[pool].implementation = pool_implementation

    # add coins to market:
    self._add_coins_to_market(_coins[0], _coins[1], pool)

    log TwocryptoPoolDeployed(
        pool,
        _name,
        _symbol,
        _coins,
        _math_implementation,
        _salt,
        precisions,
        packed_gamma_A,
        packed_fee_params,
        packed_rebalancing_params,
        initial_price,
        msg.sender,
    )

    return pool


@internal
def _add_coins_to_market(coin_a: address, coin_b: address, pool: address):

    key: uint256 = (
        convert(coin_a, uint256) ^ convert(coin_b, uint256)
    )
    self.markets[key].append(pool)


@external
def deploy_gauge(_pool: address) -> address:
    """
    @notice Deploy a liquidity gauge for a factory pool
    @param _pool Factory pool address to deploy a gauge for
    @return Address of the deployed gauge
    """
    assert self.pool_data[_pool].coins[0] != empty(address), "Unknown pool"
    assert self.pool_data[_pool].liquidity_gauge == empty(address), "Gauge already deployed"
    assert self.gauge_implementation != empty(address), "Gauge implementation not set"

    gauge: address = create_from_blueprint(self.gauge_implementation, _pool, code_offset=3)
    self.pool_data[_pool].liquidity_gauge = gauge

    log LiquidityGaugeDeployed(_pool, gauge)
    return gauge


# <--- Admin / Guarded Functionality --->


@external
def set_fee_receiver(_fee_receiver: address):
    """
    @notice Set fee receiver
    @param _fee_receiver Address that fees are sent to
    """
    assert msg.sender == self.admin, "dev: admin only"

    log UpdateFeeReceiver(self.fee_receiver, _fee_receiver)
    self.fee_receiver = _fee_receiver


@external
def set_pool_implementation(
    _pool_implementation: address, _implementation_index: uint256
):
    """
    @notice Set pool implementation
    @dev Set to empty(address) to prevent deployment of new pools
    @param _pool_implementation Address of the new pool implementation
    @param _implementation_index Index of the pool implementation
    """
    assert msg.sender == self.admin, "dev: admin only"

    log UpdatePoolImplementation(
        _implementation_index,
        self.pool_implementations[_implementation_index],
        _pool_implementation
    )

    self.pool_implementations[_implementation_index] = _pool_implementation


@external
def set_gauge_implementation(_gauge_implementation: address):
    """
    @notice Set gauge implementation
    @dev Set to empty(address) to prevent deployment of new gauges
    @param _gauge_implementation Address of the new token implementation
    """
    assert msg.sender == self.admin, "dev: admin only"

    log UpdateGaugeImplementation(self.gauge_implementation, _gauge_implementation)
    self.gauge_implementation = _gauge_implementation


@external
def set_views_implementation(_views_implementation: address):
    """
    @notice Set views contract implementation
    @param _views_implementation Address of the new views contract
    """
    assert msg.sender == self.admin,  "dev: admin only"

    log UpdateViewsImplementation(self.views_implementation, _views_implementation)
    self.views_implementation = _views_implementation


@external
def set_math_implementation(_math_implementation: address):
    """
    @notice Set math implementation
    @param _math_implementation Address of the new math contract
    """
    assert msg.sender == self.admin, "dev: admin only"

    log UpdateMathImplementation(self.math_implementation, _math_implementation)
    self.math_implementation = _math_implementation


@external
def commit_transfer_ownership(_addr: address):
    """
    @notice Transfer ownership of this contract to `addr`
    @param _addr Address of the new owner
    """
    assert msg.sender == self.admin, "dev: admin only"

    self.future_admin = _addr


@external
def accept_transfer_ownership():
    """
    @notice Accept a pending ownership transfer
    @dev Only callable by the new owner
    """
    assert msg.sender == self.future_admin, "dev: future admin only"

    log TransferOwnership(self.admin, msg.sender)
    self.admin = msg.sender


# <--- Factory Getters --->


@view
@external
def find_pool_for_coins(_from: address, _to: address, i: uint256 = 0) -> address:
    """
    @notice Find an available pool for exchanging two coins
    @param _from Address of coin to be sent
    @param _to Address of coin to be received
    @param i Index value. When multiple pools are available
            this value is used to return the n'th address.
    @return Pool address
    """
    key: uint256 = convert(_from, uint256) ^ convert(_to, uint256)
    return self.markets[key][i]


# <--- Pool Getters --->


@view
@external
def pool_count() -> uint256:
    """
    @notice Get number of pools deployed from the factory
    @return Number of pools deployed from factory
    """
    return len(self.pool_list)


@view
@external
def get_coins(_pool: address) -> address[N_COINS]:
    """
    @notice Get the coins within a pool
    @param _pool Pool address
    @return List of coin addresses
    """
    return self.pool_data[_pool].coins


@view
@external
def get_decimals(_pool: address) -> uint256[N_COINS]:
    """
    @notice Get decimal places for each coin within a pool
    @param _pool Pool address
    @return uint256 list of decimals
    """
    return self.pool_data[_pool].decimals


@view
@external
def get_balances(_pool: address) -> uint256[N_COINS]:
    """
    @notice Get balances for each coin within a pool
    @dev For pools using lending, these are the wrapped coin balances
    @param _pool Pool address
    @return uint256 list of balances
    """
    return [TwocryptoPool(_pool).balances(0), TwocryptoPool(_pool).balances(1)]


@view
@external
def get_coin_indices(
    _pool: address,
    _from: address,
    _to: address
) -> (uint256, uint256):
    """
    @notice Convert coin addresses to indices for use with pool methods
    @param _pool Pool address
    @param _from Coin address to be used as `i` within a pool
    @param _to Coin address to be used as `j` within a pool
    @return uint256 `i`, uint256 `j`
    """
    coins: address[2] = self.pool_data[_pool].coins

    if _from == coins[0] and _to == coins[1]:
        return 0, 1
    elif _from == coins[1] and _to == coins[0]:
        return 1, 0
    else:
        raise "Coins not found"


@view
@external
def get_gauge(_pool: address) -> address:
    """
    @notice Get the address of the liquidity gauge contract for a factory pool
    @dev Returns `empty(address)` if a gauge has not been deployed
    @param _pool Pool address
    @return Implementation contract address
    """
    return self.pool_data[_pool].liquidity_gauge


@view
@external
def get_market_counts(coin_a: address, coin_b: address) -> uint256:
    """
    @notice Gets the number of markets with the specified coins.
    @return Number of pools with the input coins
    """

    key: uint256 = (
        convert(coin_a, uint256) ^ convert(coin_b, uint256)
    )

    return len(self.markets[key])

Contract Security Audit

Contract ABI

[{"name":"TwocryptoPoolDeployed","inputs":[{"name":"pool","type":"address","indexed":false},{"name":"name","type":"string","indexed":false},{"name":"symbol","type":"string","indexed":false},{"name":"coins","type":"address[2]","indexed":false},{"name":"math","type":"address","indexed":false},{"name":"salt","type":"bytes32","indexed":false},{"name":"precisions","type":"uint256[2]","indexed":false},{"name":"packed_A_gamma","type":"uint256","indexed":false},{"name":"packed_fee_params","type":"uint256","indexed":false},{"name":"packed_rebalancing_params","type":"uint256","indexed":false},{"name":"packed_prices","type":"uint256","indexed":false},{"name":"deployer","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"LiquidityGaugeDeployed","inputs":[{"name":"pool","type":"address","indexed":false},{"name":"gauge","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"UpdateFeeReceiver","inputs":[{"name":"_old_fee_receiver","type":"address","indexed":false},{"name":"_new_fee_receiver","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"UpdatePoolImplementation","inputs":[{"name":"_implemention_id","type":"uint256","indexed":false},{"name":"_old_pool_implementation","type":"address","indexed":false},{"name":"_new_pool_implementation","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"UpdateGaugeImplementation","inputs":[{"name":"_old_gauge_implementation","type":"address","indexed":false},{"name":"_new_gauge_implementation","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"UpdateMathImplementation","inputs":[{"name":"_old_math_implementation","type":"address","indexed":false},{"name":"_new_math_implementation","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"UpdateViewsImplementation","inputs":[{"name":"_old_views_implementation","type":"address","indexed":false},{"name":"_new_views_implementation","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"TransferOwnership","inputs":[{"name":"_old_owner","type":"address","indexed":false},{"name":"_new_owner","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"initialise_ownership","inputs":[{"name":"_fee_receiver","type":"address"},{"name":"_admin","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"deploy_pool","inputs":[{"name":"_name","type":"string"},{"name":"_symbol","type":"string"},{"name":"_coins","type":"address[2]"},{"name":"implementation_id","type":"uint256"},{"name":"A","type":"uint256"},{"name":"gamma","type":"uint256"},{"name":"mid_fee","type":"uint256"},{"name":"out_fee","type":"uint256"},{"name":"fee_gamma","type":"uint256"},{"name":"allowed_extra_profit","type":"uint256"},{"name":"adjustment_step","type":"uint256"},{"name":"ma_exp_time","type":"uint256"},{"name":"initial_price","type":"uint256"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"nonpayable","type":"function","name":"deploy_gauge","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"nonpayable","type":"function","name":"set_fee_receiver","inputs":[{"name":"_fee_receiver","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"set_pool_implementation","inputs":[{"name":"_pool_implementation","type":"address"},{"name":"_implementation_index","type":"uint256"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"set_gauge_implementation","inputs":[{"name":"_gauge_implementation","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"set_views_implementation","inputs":[{"name":"_views_implementation","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"set_math_implementation","inputs":[{"name":"_math_implementation","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"commit_transfer_ownership","inputs":[{"name":"_addr","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"accept_transfer_ownership","inputs":[],"outputs":[]},{"stateMutability":"view","type":"function","name":"find_pool_for_coins","inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"find_pool_for_coins","inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"i","type":"uint256"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"pool_count","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"get_coins","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"address[2]"}]},{"stateMutability":"view","type":"function","name":"get_decimals","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"uint256[2]"}]},{"stateMutability":"view","type":"function","name":"get_balances","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"uint256[2]"}]},{"stateMutability":"view","type":"function","name":"get_coin_indices","inputs":[{"name":"_pool","type":"address"},{"name":"_from","type":"address"},{"name":"_to","type":"address"}],"outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"get_gauge","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"get_market_counts","inputs":[{"name":"coin_a","type":"address"},{"name":"coin_b","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"admin","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"future_admin","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"fee_receiver","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"pool_implementations","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"gauge_implementation","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"views_implementation","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"math_implementation","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"pool_list","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"address"}]}]

3461001a57326000556114cf61001f610000396114cf610000f35b600080fd60003560e01c6002601f821660011b61148f01601e39600051565b63f851a4408118610036573461148a5760015460405260206040f35b636b441a4081186114245760243610341761148a576004358060a01c61148a576040526001543318156100c057600f6060527f6465763a2061646d696e206f6e6c79000000000000000000000000000000000060805260605060605180608001601f826000031636823750506308c379a06020526020604052601f19601f6060510116604401603cfd5b60405160025500611424565b6317f7182a8118611424573461148a5760025460405260206040f3611424565b63cab4d3db8118611424573461148a5760035460405260206040f3611424565b633273ff47811861013b5760243610341761148a57600460043560205260005260406000205460405260206040f35b638df242078118611424573461148a5760055460405260206040f3611424565b63e31593d88118610177573461148a5760065460405260206040f35b63e5ea47b88118611424573461148a576002543318156101ee5760166040527f6465763a206675747572652061646d696e206f6e6c790000000000000000000060605260405060405180606001601f826000031636823750506308c379a06000526020602052601f19601f6040510116604401601cfd5b7f5c486528ec3e3f0ea91181cff8116f02bfa350e03b8b6f12e00765adbb5af85c6001546040523360605260406040a13360015500611424565b63a13c8f818118611424573461148a5760075460405260206040f3611424565b633a1d5d8e81186114245760243610341761148a57600435600a5481101561148a57600b015460405260206040f3611424565b6345e62f8581186114245760443610341761148a576004358060a01c61148a576040526024358060a01c61148a57606052600054331861148a5760015461148a576040516003556060516001557f2861448678f0be67f11bfb5481b3e3b4cfeb3acc6126ad60a05f95bfc6530666600060805260405160a05260406080a17f5c486528ec3e3f0ea91181cff8116f02bfa350e03b8b6f12e00765adbb5af85c600060805260605160a05260406080a100611424565b63c955fa048118611424576102043610341761148a57600435600401604081351161148a576020813501808260c0375050602435600401602081351161148a57602081350180826101203750506044358060a01c61148a57610160526064358060a01c61148a576101805260046084356020526000526040600020546101a0526007546101c0526101a05161042557601b6101e0527f506f6f6c20696d706c656d656e746174696f6e206e6f74207365740000000000610200526101e0506101e0518061020001601f826000031636823750506308c379a06101a05260206101c052601f19601f6101e05101166044016101bcfd5b6101c05161049357601b6101e0527f4d61746820696d706c656d656e746174696f6e206e6f74207365740000000000610200526101e0506101e0518061020001601f826000031636823750506308c379a06101a05260206101c052601f19601f6101e05101166044016101bcfd5b6402540be3fe60e4351161148a5760e435610104351061148a576402540be3fe610104351161148a57670de0b6b3a7640000610124351161148a57610124351561148a57670de0b6b3a7640000610144351161148a57670de0b6b3a7640000610164351161148a57610164351561148a57620d505d610184351161148a576057610184351061148a57620f42416101a4351015610531576000610546565b6c0c9f2c9cd04674edea3fffffff6101a43511155b1561148a576101805161016051186105be57600f6101e0527f4475706c696361746520636f696e730000000000000000000000000000000000610200526101e0506101e0518061020001601f826000031636823750506308c379a06101a05260206101c052601f19601f6101e05101166044016101bcfd5b6080366101e03760006002905b8061026052610260516001811161148a5760051b610160015163313ce5676102a05260206102a060046102bc845afa610609573d600060003e3d6000fd5b60203d1061148a576102a090505161028052601261028051111561068d5760196102a0527f4d617820313820646563696d616c7320666f7220636f696e73000000000000006102c0526102a0506102a051806102c001601f826000031636823750506308c379a061026052602061028052601f19601f6102a051011660440161027cfd5b61028051610260516001811161148a5760051b6101e0015261028051806012036012811161148a579050604d811161148a5780600a0a9050610260516001811161148a5760051b61022001526001018181186105cb57505061022051604052610240516060526106fe610280611440565b6102805161026052606060e46040376107186102a061142a565b6102a0516102805260606101446040376107336102c061142a565b6102c0516102a05260c43560405260a4356060526107526102e0611440565b6102e0516102c05260014303406102e0526101a05161016080610400528061040001602060c0510180828260c060045afa50508051806020830101601f82600003163682375050601f19601f82516020010116905081019050806104205280610400016101205181526101405160208201528051806020830101601f82600003163682375050601f19601f82516020010116905081019050610160516104405261018051610460526101c0516103205261032051610480526102e05161034052610340516104a0526102605161036052610360516104c0526102c05161038052610380516104e052610280516103a0526103a051610500526102a0516103c0526103c051610520526101a4356103e0526103e051610540526003823b03596001821261148a5781600382863c81810183818561040060045afa5050828201816000f0801561148a57905090509050905061030052600a5463ffffffff811161148a576103005181600b015560018101600a555060096103005160205260005260406000206003810190506101e0518155610200516001820155506009610300516020526000526040600020600181019050610160518155610180516001820155506101a05160096103005160205260005260406000206005810190505561016051604052610180516060526103005160805261094c61144f565b7f8152a3037e3dc54154ad0d2cadb1cf7e1d1b9e2b625faa3dfb4fe03d609102ca6101c0610300516103205280610340528061032001602060c0510180828260c060045afa50508051806020830101601f82600003163682375050601f19601f82516020010116905081019050806103605280610320016101205181526101405160208201528051806020830101601f82600003163682375050601f19601f825160200101169050810190506101605161038052610180516103a0526101c0516103c0526102e0516103e052610220516104005261024051610420526102c0516104405261028051610460526102a051610480526101a4356104a052336104c052610320a16020610300f3611424565b6396bebb348118610c605760243610341761148a576004358060a01c61148a576040526009604051602052600052604060002060018101905054610af757600c6060527f556e6b6e6f776e20706f6f6c000000000000000000000000000000000000000060805260605060605180608001601f826000031636823750506308c379a06020526020604052601f19601f6060510116604401603cfd5b600960405160205260005260406000205415610b6a5760166060527f476175676520616c7265616479206465706c6f7965640000000000000000000060805260605060605180608001601f826000031636823750506308c379a06020526020604052601f19601f6060510116604401603cfd5b600554610bce57601c6060527f476175676520696d706c656d656e746174696f6e206e6f74207365740000000060805260605060605180608001601f826000031636823750506308c379a06020526020604052601f19601f6060510116604401603cfd5b60055460405160805260805160a05260206003823b03596001821261148a5781600382863c81810160a051815250828201816000f0801561148a57905090509050905060605260605160096040516020526000526040600020557f656bb34c20491970a8c163f3bd62ead82022b379c3924960ec60f6dbfc5aab3b60405160805260605160a05260406080a160206060f35b63b07426f481186114245760243610341761148a576004358060a01c61148a57604052600154331815610cea57600f6060527f6465763a2061646d696e206f6e6c79000000000000000000000000000000000060805260605060605180608001601f826000031636823750506308c379a06020526020604052601f19601f6060510116604401603cfd5b7f68fe8fc3ac76ec17e21117df5e854c8c25b7b5f776aad2adc927fdd156bcd6de60075460605260405160805260406060a160405160075500611424565b63e41ab77181186114245760243610341761148a576004358060a01c61148a57604052600154331815610db257600f6060527f6465763a2061646d696e206f6e6c79000000000000000000000000000000000060805260605060605180608001601f826000031636823750506308c379a06020526020604052601f19601f6060510116604401603cfd5b7f2861448678f0be67f11bfb5481b3e3b4cfeb3acc6126ad60a05f95bfc653066660035460605260405160805260406060a160405160035500611424565b636f385ff681186114245760443610341761148a576004358060a01c61148a57604052600154331815610e7a57600f6060527f6465763a2061646d696e206f6e6c79000000000000000000000000000000000060805260605060605180608001601f826000031636823750506308c379a06020526020604052601f19601f6060510116604401603cfd5b7f6a42ef9605e135afaf6ae4f3683b161a3b7369d07c9d52c701ab69553e04c3b6602435606052600460243560205260005260406000205460805260405160a05260606060a1604051600460243560205260005260406000205500611424565b638f03182c8118610f9e5760243610341761148a576004358060a01c61148a57604052600154331815610f6457600f6060527f6465763a2061646d696e206f6e6c79000000000000000000000000000000000060805260605060605180608001601f826000031636823750506308c379a06020526020604052601f19601f6060510116604401603cfd5b7f1fd705f9c77053962a503f2f2f57f0862b4c3af687c25615c13817a86946c35960055460605260405160805260406060a1604051600555005b63a87df06c81186114245760443610341761148a5760006080526110a556611424565b63f6fa937f81186114245760243610341761148a576004358060a01c61148a5760405260015433181561104b57600f6060527f6465763a2061646d696e206f6e6c79000000000000000000000000000000000060805260605060605180608001601f826000031636823750506308c379a06020526020604052601f19601f6060510116604401603cfd5b7fd84eb1ea70cda40a6bfaa11f4f69efa10cbc5eb82760b3058f440512ec1d6d1f60065460605260405160805260406060a160405160065500611424565b636982eb0b81186114245760643610341761148a576044356080525b6004358060a01c61148a576040526024358060a01c61148a576060526060516040511860a052600860a0516020526000526040600020608051815481101561148a57600182010190505460c052602060c0f3611424565b63956aae3a8118611424573461148a57600a5460405260206040f3611424565b639ac90d3d81186114245760243610341761148a576004358060a01c61148a5760405260096040516020526000526040600020600181019050805460605260018101546080525060406060f3611424565b6352b5155581186114245760243610341761148a576004358060a01c61148a5760405260096040516020526000526040600020600381019050805460605260018101546080525060406060f3611424565b6392e3cc2d811861125c5760243610341761148a576004358060a01c61148a57604052604051634903b0d16060526000608052602060606024607c845afa61120b573d600060003e3d6000fd5b60203d1061148a57606090505160e052604051634903b0d160a052600160c052602060a0602460bc845afa611245573d600060003e3d6000fd5b60203d1061148a5760a090505161010052604060e0f35b63eb85226d81186114245760643610341761148a576004358060a01c61148a576040526024358060a01c61148a576060526044358060a01c61148a5760805260096040516020526000526040600020600181019050805460a052600181015460c0525060a051606051186112d75760c05160805118156112da565b60005b6113785760c051606051186112f65760a05160805118156112f9565b60005b61136057600f60e0527f436f696e73206e6f7420666f756e6400000000000000000000000000000000006101005260e05060e0518061010001601f826000031636823750506308c379a060a052602060c052601f19601f60e051011660440160bcfd611388565b600160e052600061010052604060e061138856611388565b600060e052600161010052604060e05bf3611424565b63daf297b981186114245760243610341761148a576004358060a01c61148a57604052600960405160205260005260406000205460605260206060f3611424565b63c1856b5281186114245760443610341761148a576004358060a01c61148a576040526024358060a01c61148a5760605260605160405118608052600860805160205260005260406000205460a052602060a0f35b60006000fd5b60805160605160401b60405160801b1717815250565b60605160801b60405117815250565b6060516040511860a052600860a0516020526000526040600020805463ffffffff811161148a57608051816001840101556001810182555050565b600080fd001a0228142414240330027b1424010c1424142400cc10890eda11be0248142414240d2813cf14240a5c116d0df01424015b138e10fc00ec1424111c14240fc1841914cf81184000a16576797065728300030a0015

Deployed Bytecode

0x60003560e01c6002601f821660011b61148f01601e39600051565b63f851a4408118610036573461148a5760015460405260206040f35b636b441a4081186114245760243610341761148a576004358060a01c61148a576040526001543318156100c057600f6060527f6465763a2061646d696e206f6e6c79000000000000000000000000000000000060805260605060605180608001601f826000031636823750506308c379a06020526020604052601f19601f6060510116604401603cfd5b60405160025500611424565b6317f7182a8118611424573461148a5760025460405260206040f3611424565b63cab4d3db8118611424573461148a5760035460405260206040f3611424565b633273ff47811861013b5760243610341761148a57600460043560205260005260406000205460405260206040f35b638df242078118611424573461148a5760055460405260206040f3611424565b63e31593d88118610177573461148a5760065460405260206040f35b63e5ea47b88118611424573461148a576002543318156101ee5760166040527f6465763a206675747572652061646d696e206f6e6c790000000000000000000060605260405060405180606001601f826000031636823750506308c379a06000526020602052601f19601f6040510116604401601cfd5b7f5c486528ec3e3f0ea91181cff8116f02bfa350e03b8b6f12e00765adbb5af85c6001546040523360605260406040a13360015500611424565b63a13c8f818118611424573461148a5760075460405260206040f3611424565b633a1d5d8e81186114245760243610341761148a57600435600a5481101561148a57600b015460405260206040f3611424565b6345e62f8581186114245760443610341761148a576004358060a01c61148a576040526024358060a01c61148a57606052600054331861148a5760015461148a576040516003556060516001557f2861448678f0be67f11bfb5481b3e3b4cfeb3acc6126ad60a05f95bfc6530666600060805260405160a05260406080a17f5c486528ec3e3f0ea91181cff8116f02bfa350e03b8b6f12e00765adbb5af85c600060805260605160a05260406080a100611424565b63c955fa048118611424576102043610341761148a57600435600401604081351161148a576020813501808260c0375050602435600401602081351161148a57602081350180826101203750506044358060a01c61148a57610160526064358060a01c61148a576101805260046084356020526000526040600020546101a0526007546101c0526101a05161042557601b6101e0527f506f6f6c20696d706c656d656e746174696f6e206e6f74207365740000000000610200526101e0506101e0518061020001601f826000031636823750506308c379a06101a05260206101c052601f19601f6101e05101166044016101bcfd5b6101c05161049357601b6101e0527f4d61746820696d706c656d656e746174696f6e206e6f74207365740000000000610200526101e0506101e0518061020001601f826000031636823750506308c379a06101a05260206101c052601f19601f6101e05101166044016101bcfd5b6402540be3fe60e4351161148a5760e435610104351061148a576402540be3fe610104351161148a57670de0b6b3a7640000610124351161148a57610124351561148a57670de0b6b3a7640000610144351161148a57670de0b6b3a7640000610164351161148a57610164351561148a57620d505d610184351161148a576057610184351061148a57620f42416101a4351015610531576000610546565b6c0c9f2c9cd04674edea3fffffff6101a43511155b1561148a576101805161016051186105be57600f6101e0527f4475706c696361746520636f696e730000000000000000000000000000000000610200526101e0506101e0518061020001601f826000031636823750506308c379a06101a05260206101c052601f19601f6101e05101166044016101bcfd5b6080366101e03760006002905b8061026052610260516001811161148a5760051b610160015163313ce5676102a05260206102a060046102bc845afa610609573d600060003e3d6000fd5b60203d1061148a576102a090505161028052601261028051111561068d5760196102a0527f4d617820313820646563696d616c7320666f7220636f696e73000000000000006102c0526102a0506102a051806102c001601f826000031636823750506308c379a061026052602061028052601f19601f6102a051011660440161027cfd5b61028051610260516001811161148a5760051b6101e0015261028051806012036012811161148a579050604d811161148a5780600a0a9050610260516001811161148a5760051b61022001526001018181186105cb57505061022051604052610240516060526106fe610280611440565b6102805161026052606060e46040376107186102a061142a565b6102a0516102805260606101446040376107336102c061142a565b6102c0516102a05260c43560405260a4356060526107526102e0611440565b6102e0516102c05260014303406102e0526101a05161016080610400528061040001602060c0510180828260c060045afa50508051806020830101601f82600003163682375050601f19601f82516020010116905081019050806104205280610400016101205181526101405160208201528051806020830101601f82600003163682375050601f19601f82516020010116905081019050610160516104405261018051610460526101c0516103205261032051610480526102e05161034052610340516104a0526102605161036052610360516104c0526102c05161038052610380516104e052610280516103a0526103a051610500526102a0516103c0526103c051610520526101a4356103e0526103e051610540526003823b03596001821261148a5781600382863c81810183818561040060045afa5050828201816000f0801561148a57905090509050905061030052600a5463ffffffff811161148a576103005181600b015560018101600a555060096103005160205260005260406000206003810190506101e0518155610200516001820155506009610300516020526000526040600020600181019050610160518155610180516001820155506101a05160096103005160205260005260406000206005810190505561016051604052610180516060526103005160805261094c61144f565b7f8152a3037e3dc54154ad0d2cadb1cf7e1d1b9e2b625faa3dfb4fe03d609102ca6101c0610300516103205280610340528061032001602060c0510180828260c060045afa50508051806020830101601f82600003163682375050601f19601f82516020010116905081019050806103605280610320016101205181526101405160208201528051806020830101601f82600003163682375050601f19601f825160200101169050810190506101605161038052610180516103a0526101c0516103c0526102e0516103e052610220516104005261024051610420526102c0516104405261028051610460526102a051610480526101a4356104a052336104c052610320a16020610300f3611424565b6396bebb348118610c605760243610341761148a576004358060a01c61148a576040526009604051602052600052604060002060018101905054610af757600c6060527f556e6b6e6f776e20706f6f6c000000000000000000000000000000000000000060805260605060605180608001601f826000031636823750506308c379a06020526020604052601f19601f6060510116604401603cfd5b600960405160205260005260406000205415610b6a5760166060527f476175676520616c7265616479206465706c6f7965640000000000000000000060805260605060605180608001601f826000031636823750506308c379a06020526020604052601f19601f6060510116604401603cfd5b600554610bce57601c6060527f476175676520696d706c656d656e746174696f6e206e6f74207365740000000060805260605060605180608001601f826000031636823750506308c379a06020526020604052601f19601f6060510116604401603cfd5b60055460405160805260805160a05260206003823b03596001821261148a5781600382863c81810160a051815250828201816000f0801561148a57905090509050905060605260605160096040516020526000526040600020557f656bb34c20491970a8c163f3bd62ead82022b379c3924960ec60f6dbfc5aab3b60405160805260605160a05260406080a160206060f35b63b07426f481186114245760243610341761148a576004358060a01c61148a57604052600154331815610cea57600f6060527f6465763a2061646d696e206f6e6c79000000000000000000000000000000000060805260605060605180608001601f826000031636823750506308c379a06020526020604052601f19601f6060510116604401603cfd5b7f68fe8fc3ac76ec17e21117df5e854c8c25b7b5f776aad2adc927fdd156bcd6de60075460605260405160805260406060a160405160075500611424565b63e41ab77181186114245760243610341761148a576004358060a01c61148a57604052600154331815610db257600f6060527f6465763a2061646d696e206f6e6c79000000000000000000000000000000000060805260605060605180608001601f826000031636823750506308c379a06020526020604052601f19601f6060510116604401603cfd5b7f2861448678f0be67f11bfb5481b3e3b4cfeb3acc6126ad60a05f95bfc653066660035460605260405160805260406060a160405160035500611424565b636f385ff681186114245760443610341761148a576004358060a01c61148a57604052600154331815610e7a57600f6060527f6465763a2061646d696e206f6e6c79000000000000000000000000000000000060805260605060605180608001601f826000031636823750506308c379a06020526020604052601f19601f6060510116604401603cfd5b7f6a42ef9605e135afaf6ae4f3683b161a3b7369d07c9d52c701ab69553e04c3b6602435606052600460243560205260005260406000205460805260405160a05260606060a1604051600460243560205260005260406000205500611424565b638f03182c8118610f9e5760243610341761148a576004358060a01c61148a57604052600154331815610f6457600f6060527f6465763a2061646d696e206f6e6c79000000000000000000000000000000000060805260605060605180608001601f826000031636823750506308c379a06020526020604052601f19601f6060510116604401603cfd5b7f1fd705f9c77053962a503f2f2f57f0862b4c3af687c25615c13817a86946c35960055460605260405160805260406060a1604051600555005b63a87df06c81186114245760443610341761148a5760006080526110a556611424565b63f6fa937f81186114245760243610341761148a576004358060a01c61148a5760405260015433181561104b57600f6060527f6465763a2061646d696e206f6e6c79000000000000000000000000000000000060805260605060605180608001601f826000031636823750506308c379a06020526020604052601f19601f6060510116604401603cfd5b7fd84eb1ea70cda40a6bfaa11f4f69efa10cbc5eb82760b3058f440512ec1d6d1f60065460605260405160805260406060a160405160065500611424565b636982eb0b81186114245760643610341761148a576044356080525b6004358060a01c61148a576040526024358060a01c61148a576060526060516040511860a052600860a0516020526000526040600020608051815481101561148a57600182010190505460c052602060c0f3611424565b63956aae3a8118611424573461148a57600a5460405260206040f3611424565b639ac90d3d81186114245760243610341761148a576004358060a01c61148a5760405260096040516020526000526040600020600181019050805460605260018101546080525060406060f3611424565b6352b5155581186114245760243610341761148a576004358060a01c61148a5760405260096040516020526000526040600020600381019050805460605260018101546080525060406060f3611424565b6392e3cc2d811861125c5760243610341761148a576004358060a01c61148a57604052604051634903b0d16060526000608052602060606024607c845afa61120b573d600060003e3d6000fd5b60203d1061148a57606090505160e052604051634903b0d160a052600160c052602060a0602460bc845afa611245573d600060003e3d6000fd5b60203d1061148a5760a090505161010052604060e0f35b63eb85226d81186114245760643610341761148a576004358060a01c61148a576040526024358060a01c61148a576060526044358060a01c61148a5760805260096040516020526000526040600020600181019050805460a052600181015460c0525060a051606051186112d75760c05160805118156112da565b60005b6113785760c051606051186112f65760a05160805118156112f9565b60005b61136057600f60e0527f436f696e73206e6f7420666f756e6400000000000000000000000000000000006101005260e05060e0518061010001601f826000031636823750506308c379a060a052602060c052601f19601f60e051011660440160bcfd611388565b600160e052600061010052604060e061138856611388565b600060e052600161010052604060e05bf3611424565b63daf297b981186114245760243610341761148a576004358060a01c61148a57604052600960405160205260005260406000205460605260206060f3611424565b63c1856b5281186114245760443610341761148a576004358060a01c61148a576040526024358060a01c61148a5760605260605160405118608052600860805160205260005260406000205460a052602060a0f35b60006000fd5b60805160605160401b60405160801b1717815250565b60605160801b60405117815250565b6060516040511860a052600860a0516020526000526040600020805463ffffffff811161148a57608051816001840101556001810182555050565b600080fd001a0228142414240330027b1424010c1424142400cc10890eda11be0248142414240d2813cf14240a5c116d0df01424015b138e10fc00ec1424111c14240fc1

Block Transaction Gas Used Reward
view all blocks validated

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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