Contract 0x2d0a931dd088ea108a73901f83065dca81ca474c

 
Txn Hash
Block
From
To
Value [Txn Fee]
0x8997332e48edf9d21b6712f4c206e19f9bbd3f7090997aaf1366b877044368f384691152021-06-20 19:11:5021 mins ago0x72b223de2f773c814465c4a8f2ef9faae702cfb3 IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.001132185
0xf750db04eada61b9fbf47571a1048e0c1408c573a553e2e6138e7ff519cba00484673042021-06-20 17:41:171 hr 52 mins ago0x0bcccc4fb4d8627f217c686c35c56f7fda80a2f8 IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.0015133
0x5cb7f5cf6bb42c8c29415285ae964206ff2b691a8980557ff54a0c46842e6fb384628312021-06-20 13:57:385 hrs 35 mins ago0xac546f5eeebcd52fb3711bb8705718d35daef7b1 IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.00094938
0xc8a1868d37de6450deb0053d504bcb4bc4373fa7eb83fa798dc0c5a16426217f84513522021-06-20 4:22:2215 hrs 10 mins ago0x39e8ebd1c9faed722d742443ac77a3c25e124eaa IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.0008745
0x71cdbc6c7e0a2ed9d38b0cfa749ea214d51b5f2fc9094028c154f8c58880423184475902021-06-20 1:14:1618 hrs 19 mins ago0x4aae510a864c6bb968cf7f0f83adfda48adb8a11 IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.0010524
0xb4282e7ca0f780f70e4a1ae33fd307c0d30e3e4d7abfea7666fba7acb73e3d9c84445012021-06-19 22:39:4020 hrs 53 mins ago0x9e1adf3b22771ef94ba1fb70f011f811bc3868bd IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.00105222
0x6bf308fbd464262a07a028dbe7c9084428b4e7e2068bedf6ae1ad9730837e84684444382021-06-19 22:36:3120 hrs 56 mins ago0x4ec97d6343933a9dd6541a210f5cebba6a7107e8 IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.00136838
0x7adfb55d3d817a809be57139886b6edcdf00b3699473892c139d97a53dcc56c584443222021-06-19 22:30:4321 hrs 2 mins ago0x4ec97d6343933a9dd6541a210f5cebba6a7107e8 IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.00105234
0x3da73ae3efc206bbbd89d24670e86ddec449ddb00aecb6b5d04b513f63c48abf84419992021-06-19 20:34:3422 hrs 58 mins ago0x76c7f467cd7f3e9f6fad66bebda37901e9cb82d4 IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.00144314
0xf04aca53b1257fb40b07e7abd17179e836e04868df2713dd9124bfc91612cc3b84405362021-06-19 19:21:251 day 11 mins ago0xfe206f90c58feb8e42474c5074de43c22da8bc35 IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.001132065
0x7b78871d563bc0bb1d5234ee0aa5800aeefe3ae94eb5e8d2a731f49516a9811284362802021-06-19 15:48:061 day 3 hrs ago0x7b32783a53344cf1d28a7c3ebf5587e0de652afa IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.00121406
0x59de0e83fcb4996e6976ff5eee0408c26c8d5f829b600ca8efa74af4bd8980eb84361742021-06-19 15:42:481 day 3 hrs ago0x90b51935e540968beaab18cde6d3e271b00d6efa IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.001132185
0xbe54cf0cc7a2c3a07ef0c6ddcf7bc3dc3b763442a80e025518479673e8638f4784340962021-06-19 13:54:401 day 5 hrs ago0x90b51935e540968beaab18cde6d3e271b00d6efa IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.00134074
0x43bc83916779818ba806ef348f9720f0de02465f1755ea3b6a55b967b58622c984308722021-06-19 11:10:341 day 8 hrs ago0x5a7931ad3d97581743bd755736472370b7794edf IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.001673865
0x366fdb0b4238d3e55c34598ce7ef3ae88e6d36ad4e3a66c9f53e517adeed2ecd84300542021-06-19 10:28:391 day 9 hrs ago0x3f3e93ed301519900489764cafcbf2c8362ed297 IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.001132305
0x10f7359d09cc85ca1fe3f62634b78deb12bb2e616482a61d0d3a836c5d5aaa0c84283452021-06-19 9:02:491 day 10 hrs ago0x3f3e93ed301519900489764cafcbf2c8362ed297 IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.00121418
0xcc4d4db2779b05a59ce51801c762b905ff07aaadc752a003e007806457a580e084281772021-06-19 8:54:251 day 10 hrs ago0x60cc8e2642781c0575e81fd53bb7c6d2829ff423 IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.00134074
0x9a69f4fb7bd8ed9862c8a305b9eba5091d53f7b31f6ad68e8e68c61fb677a6f084198562021-06-19 1:56:481 day 17 hrs ago0x4ec97d6343933a9dd6541a210f5cebba6a7107e8 IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.00136838
0xba0408fc42d94013ac4016d2de58926802c90fbae9ad4cf91d92d1b670a45ffe84194912021-06-19 1:38:331 day 17 hrs ago0xe41a092c50600c0752ab9675a87170ba37be4c9d IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.00202155
0x65062675f3d9361d8d94473b7febf8f3e1f3143301b863bca6c6a324cd30a11284194042021-06-19 1:34:121 day 17 hrs ago0xe41a092c50600c0752ab9675a87170ba37be4c9d IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.00214817
0xbbef3a661f14921522efccb39b5c11dccf87a6c0e3df30151a729a66caec353f84185682021-06-19 0:52:241 day 18 hrs ago0xe41a092c50600c0752ab9675a87170ba37be4c9d IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.00202155
0x75cd589d936f1f8c2994f4fc909d9d0e647e89c88d1a049c8c8585f512ad852084184562021-06-19 0:46:481 day 18 hrs ago0xe41a092c50600c0752ab9675a87170ba37be4c9d IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.00214817
0xf6a672c256433c28bc966241b3ab1d28694104d9bfad42679da64a3e831a2d1884183642021-06-19 0:42:121 day 18 hrs ago0xe41a092c50600c0752ab9675a87170ba37be4c9d IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.00194649
0x33121ea7be1a8c0fb600e37ab4f7a09eb6c638b51a6161974468d94d4edf734b84183482021-06-19 0:41:241 day 18 hrs ago0xe41a092c50600c0752ab9675a87170ba37be4c9d IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.00202149
0x3fee369cc836d5a7c5fbe7cbc84e8d4e6014bd2af26f2d8b51008bb7499d44f284183212021-06-19 0:40:031 day 18 hrs ago0xe41a092c50600c0752ab9675a87170ba37be4c9d IN  0x2d0a931dd088ea108a73901f83065dca81ca474c0 BNB0.00202149
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Similar Match)
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xA71eCd2b1E3e97E0603A1a1183D2Ad98006e7541

Contract Name:
Vyper_contract

Compiler Version
vyper:0.2.11

Optimization Enabled:
N/A

Other Settings:
, None license

Contract Source Code (Vyper language format)

# @version ^0.2.8
"""
@title "Zap" Depositer for metapool
@author Curve.Fi
@license Copyright (c) Curve.Fi, 2020 - all rights reserved
"""

from vyper.interfaces import ERC20


interface CurveMeta:
    def add_liquidity(amounts: uint256[N_COINS], min_mint_amount: uint256) -> uint256: nonpayable
    def remove_liquidity(_amount: uint256, min_amounts: uint256[N_COINS]) -> uint256[N_COINS]: nonpayable
    def remove_liquidity_one_coin(_token_amount: uint256, i: int128, min_amount: uint256) -> uint256: nonpayable
    def remove_liquidity_imbalance(amounts: uint256[N_COINS], max_burn_amount: uint256) -> uint256: nonpayable
    def calc_withdraw_one_coin(_token_amount: uint256, i: int128) -> uint256: view
    def calc_token_amount(amounts: uint256[N_COINS], deposit: bool) -> uint256: view
    def base_pool() -> address: view
    def coins(i: uint256) -> address: view

interface CurveBase:
    def add_liquidity(amounts: uint256[BASE_N_COINS], min_mint_amount: uint256): nonpayable
    def remove_liquidity(_amount: uint256, min_amounts: uint256[BASE_N_COINS]): nonpayable
    def remove_liquidity_one_coin(_token_amount: uint256, i: int128, min_amount: uint256): nonpayable
    def remove_liquidity_imbalance(amounts: uint256[BASE_N_COINS], max_burn_amount: uint256): nonpayable
    def calc_withdraw_one_coin(_token_amount: uint256, i: int128) -> uint256: view
    def calc_token_amount(amounts: uint256[BASE_N_COINS], deposit: bool) -> uint256: view
    def coins(i: uint256) -> address: view
    def fee() -> uint256: view


N_COINS: constant(int128) = 2
MAX_COIN: constant(int128) = N_COINS-1
BASE_N_COINS: constant(int128) = 3
N_ALL_COINS: constant(int128) = N_COINS + BASE_N_COINS - 1

FEE_DENOMINATOR: constant(uint256) = 10 ** 10
FEE_IMPRECISION: constant(uint256) = 100 * 10 ** 8  # % of the fee


pool: public(address)
token: public(address)
base_pool: public(address)

coins: public(address[N_COINS])
base_coins: public(address[BASE_N_COINS])


@external
def __init__(_pool: address, _token: address):
    """
    @notice Contract constructor
    @param _pool Metapool address
    @param _token Pool LP token address
    """
    self.pool = _pool
    self.token = _token
    base_pool: address = CurveMeta(_pool).base_pool()
    self.base_pool = base_pool

    for i in range(N_COINS):
        coin: address = CurveMeta(_pool).coins(convert(i, uint256))
        self.coins[i] = coin
        # approve coins for infinite transfers
        _response: Bytes[32] = raw_call(
            coin,
            concat(
                method_id("approve(address,uint256)"),
                convert(_pool, bytes32),
                convert(MAX_UINT256, bytes32),
            ),
            max_outsize=32,
        )
        if len(_response) > 0:
            assert convert(_response, bool)

    for i in range(BASE_N_COINS):
        coin: address = CurveBase(base_pool).coins(i)
        self.base_coins[i] = coin
        # approve underlying coins for infinite transfers
        _response: Bytes[32] = raw_call(
            coin,
            concat(
                method_id("approve(address,uint256)"),
                convert(base_pool, bytes32),
                convert(MAX_UINT256, bytes32),
            ),
            max_outsize=32,
        )
        if len(_response) > 0:
            assert convert(_response, bool)


@external
def add_liquidity(_amounts: uint256[N_ALL_COINS], _min_mint_amount: uint256) -> uint256:
    """
    @notice Wrap underlying coins and deposit them in the pool
    @param _amounts List of amounts of underlying coins to deposit
    @param _min_mint_amount Minimum amount of LP tokens to mint from the deposit
    @return Amount of LP tokens received by depositing
    """
    meta_amounts: uint256[N_COINS] = empty(uint256[N_COINS])
    base_amounts: uint256[BASE_N_COINS] = empty(uint256[BASE_N_COINS])
    deposit_base: bool = False

    # Transfer all coins in
    for i in range(N_ALL_COINS):
        amount: uint256 = _amounts[i]
        if amount == 0:
            continue
        coin: address = ZERO_ADDRESS
        if i < MAX_COIN:
            coin = self.coins[i]
            meta_amounts[i] = amount
        else:
            x: int128 = i - MAX_COIN
            coin = self.base_coins[x]
            base_amounts[x] = amount
            deposit_base = True
        # "safeTransferFrom" which works for ERC20s which return bool or not
        _response: Bytes[32] = raw_call(
            coin,
            concat(
                method_id("transferFrom(address,address,uint256)"),
                convert(msg.sender, bytes32),
                convert(self, bytes32),
                convert(amount, bytes32),
            ),
            max_outsize=32,
        )  # dev: failed transfer
        if len(_response) > 0:
            assert convert(_response, bool)  # dev: failed transfer

    # Deposit to the base pool
    if deposit_base:
        CurveBase(self.base_pool).add_liquidity(base_amounts, 0)
        meta_amounts[MAX_COIN] = ERC20(self.coins[MAX_COIN]).balanceOf(self)

    # Deposit to the meta pool
    CurveMeta(self.pool).add_liquidity(meta_amounts, _min_mint_amount)

    # Transfer meta token back
    lp_token: address = self.token
    lp_amount: uint256 = ERC20(lp_token).balanceOf(self)
    assert ERC20(lp_token).transfer(msg.sender, lp_amount)

    return lp_amount


@external
def remove_liquidity(_amount: uint256, _min_amounts: uint256[N_ALL_COINS]) -> uint256[N_ALL_COINS]:
    """
    @notice Withdraw and unwrap coins from the pool
    @dev Withdrawal amounts are based on current deposit ratios
    @param _amount Quantity of LP tokens to burn in the withdrawal
    @param _min_amounts Minimum amounts of underlying coins to receive
    @return List of amounts of underlying coins that were withdrawn
    """
    _token: address = self.token
    assert ERC20(_token).transferFrom(msg.sender, self, _amount)

    min_amounts_meta: uint256[N_COINS] = empty(uint256[N_COINS])
    min_amounts_base: uint256[BASE_N_COINS] = empty(uint256[BASE_N_COINS])
    amounts: uint256[N_ALL_COINS] = empty(uint256[N_ALL_COINS])

    # Withdraw from meta
    for i in range(MAX_COIN):
        min_amounts_meta[i] = _min_amounts[i]
    CurveMeta(self.pool).remove_liquidity(_amount, min_amounts_meta)

    # Withdraw from base
    _base_amount: uint256 = ERC20(self.coins[MAX_COIN]).balanceOf(self)
    for i in range(BASE_N_COINS):
        min_amounts_base[i] = _min_amounts[MAX_COIN+i]
    CurveBase(self.base_pool).remove_liquidity(_base_amount, min_amounts_base)

    # Transfer all coins out
    for i in range(N_ALL_COINS):
        coin: address = ZERO_ADDRESS
        if i < MAX_COIN:
            coin = self.coins[i]
        else:
            coin = self.base_coins[i - MAX_COIN]
        amounts[i] = ERC20(coin).balanceOf(self)
        # "safeTransfer" which works for ERC20s which return bool or not
        _response: Bytes[32] = raw_call(
            coin,
            concat(
                method_id("transfer(address,uint256)"),
                convert(msg.sender, bytes32),
                convert(amounts[i], bytes32),
            ),
            max_outsize=32,
        )  # dev: failed transfer
        if len(_response) > 0:
            assert convert(_response, bool)  # dev: failed transfer
        # end "safeTransfer"

    return amounts


@external
def remove_liquidity_one_coin(_token_amount: uint256, i: int128, _min_amount: uint256) -> uint256:
    """
    @notice Withdraw and unwrap a single coin from the pool
    @param _token_amount Amount of LP tokens to burn in the withdrawal
    @param i Index value of the coin to withdraw
    @param _min_amount Minimum amount of underlying coin to receive
    @return Amount of underlying coin received
    """
    assert ERC20(self.token).transferFrom(msg.sender, self, _token_amount)

    coin: address = ZERO_ADDRESS
    if i < MAX_COIN:
        coin = self.coins[i]
        # Withdraw a metapool coin
        CurveMeta(self.pool).remove_liquidity_one_coin(_token_amount, i, _min_amount)
    else:
        coin = self.base_coins[i - MAX_COIN]
        # Withdraw a base pool coin
        CurveMeta(self.pool).remove_liquidity_one_coin(_token_amount, MAX_COIN, 0)
        CurveBase(self.base_pool).remove_liquidity_one_coin(
            ERC20(self.coins[MAX_COIN]).balanceOf(self), i-MAX_COIN, _min_amount
        )

    # Tranfer the coin out
    coin_amount: uint256 = ERC20(coin).balanceOf(self)
    # "safeTransfer" which works for ERC20s which return bool or not
    _response: Bytes[32] = raw_call(
        coin,
        concat(
            method_id("transfer(address,uint256)"),
            convert(msg.sender, bytes32),
            convert(coin_amount, bytes32),
        ),
        max_outsize=32,
    )  # dev: failed transfer
    if len(_response) > 0:
        assert convert(_response, bool)  # dev: failed transfer
    # end "safeTransfer"

    return coin_amount


@external
def remove_liquidity_imbalance(_amounts: uint256[N_ALL_COINS], _max_burn_amount: uint256) -> uint256:
    """
    @notice Withdraw coins from the pool in an imbalanced amount
    @param _amounts List of amounts of underlying coins to withdraw
    @param _max_burn_amount Maximum amount of LP token to burn in the withdrawal
    @return Actual amount of the LP token burned in the withdrawal
    """
    base_pool: address = self.base_pool
    meta_pool: address = self.pool
    base_coins: address[BASE_N_COINS] = self.base_coins
    meta_coins: address[N_COINS] = self.coins
    lp_token: address = self.token

    fee: uint256 = CurveBase(base_pool).fee() * BASE_N_COINS / (4 * (BASE_N_COINS - 1))
    fee += fee * FEE_IMPRECISION / FEE_DENOMINATOR  # Overcharge to account for imprecision

    # Transfer the LP token in
    assert ERC20(lp_token).transferFrom(msg.sender, self, _max_burn_amount)

    withdraw_base: bool = False
    amounts_base: uint256[BASE_N_COINS] = empty(uint256[BASE_N_COINS])
    amounts_meta: uint256[N_COINS] = empty(uint256[N_COINS])
    leftover_amounts: uint256[N_COINS] = empty(uint256[N_COINS])

    # Prepare quantities
    for i in range(MAX_COIN):
        amounts_meta[i] = _amounts[i]

    for i in range(BASE_N_COINS):
        amount: uint256 = _amounts[MAX_COIN + i]
        if amount != 0:
            amounts_base[i] = amount
            withdraw_base = True

    if withdraw_base:
        amounts_meta[MAX_COIN] = CurveBase(self.base_pool).calc_token_amount(amounts_base, False)
        amounts_meta[MAX_COIN] += amounts_meta[MAX_COIN] * fee / FEE_DENOMINATOR + 1

    # Remove liquidity and deposit leftovers back
    CurveMeta(meta_pool).remove_liquidity_imbalance(amounts_meta, _max_burn_amount)
    if withdraw_base:
        CurveBase(base_pool).remove_liquidity_imbalance(amounts_base, amounts_meta[MAX_COIN])
        leftover_amounts[MAX_COIN] = ERC20(meta_coins[MAX_COIN]).balanceOf(self)
        if leftover_amounts[MAX_COIN] > 0:
            CurveMeta(meta_pool).add_liquidity(leftover_amounts, 0)

    # Transfer all coins out
    for i in range(N_ALL_COINS):
        coin: address = ZERO_ADDRESS
        amount: uint256 = 0
        if i < MAX_COIN:
            coin = meta_coins[i]
            amount = amounts_meta[i]
        else:
            coin = base_coins[i - MAX_COIN]
            amount = amounts_base[i - MAX_COIN]
        # "safeTransfer" which works for ERC20s which return bool or not
        if amount > 0:
            _response: Bytes[32] = raw_call(
                coin,
                concat(
                    method_id("transfer(address,uint256)"),
                    convert(msg.sender, bytes32),
                    convert(amount, bytes32),
                ),
                max_outsize=32,
            )  # dev: failed transfer
            if len(_response) > 0:
                assert convert(_response, bool)  # dev: failed transfer
            # end "safeTransfer"

    # Transfer the leftover LP token out
    leftover: uint256 = ERC20(lp_token).balanceOf(self)
    if leftover > 0:
        assert ERC20(lp_token).transfer(msg.sender, leftover)

    return _max_burn_amount - leftover


@view
@external
def calc_withdraw_one_coin(_token_amount: uint256, i: int128) -> uint256:
    """
    @notice Calculate the amount received when withdrawing and unwrapping a single coin
    @param _token_amount Amount of LP tokens to burn in the withdrawal
    @param i Index value of the underlying coin to withdraw
    @return Amount of coin received
    """
    if i < MAX_COIN:
        return CurveMeta(self.pool).calc_withdraw_one_coin(_token_amount, i)
    else:
        base_tokens: uint256 = CurveMeta(self.pool).calc_withdraw_one_coin(_token_amount, MAX_COIN)
        return CurveBase(self.base_pool).calc_withdraw_one_coin(base_tokens, i-MAX_COIN)


@view
@external
def calc_token_amount(_amounts: uint256[N_ALL_COINS], _is_deposit: bool) -> uint256:
    """
    @notice Calculate addition or reduction in token supply from a deposit or withdrawal
    @dev This calculation accounts for slippage, but not fees.
         Needed to prevent front-running, not for precise calculations!
    @param _amounts Amount of each underlying coin being deposited
    @param _is_deposit set True for deposits, False for withdrawals
    @return Expected amount of LP tokens received
    """
    meta_amounts: uint256[N_COINS] = empty(uint256[N_COINS])
    base_amounts: uint256[BASE_N_COINS] = empty(uint256[BASE_N_COINS])

    for i in range(MAX_COIN):
        meta_amounts[i] = _amounts[i]

    for i in range(BASE_N_COINS):
        base_amounts[i] = _amounts[i + MAX_COIN]

    base_tokens: uint256 = CurveBase(self.base_pool).calc_token_amount(base_amounts, _is_deposit)
    meta_amounts[MAX_COIN] = base_tokens

    return CurveMeta(self.pool).calc_token_amount(meta_amounts, _is_deposit)

Contract ABI

[{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"_pool","type":"address"},{"name":"_token","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"add_liquidity","inputs":[{"name":"_amounts","type":"uint256[4]"},{"name":"_min_mint_amount","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":31168},{"stateMutability":"nonpayable","type":"function","name":"remove_liquidity","inputs":[{"name":"_amount","type":"uint256"},{"name":"_min_amounts","type":"uint256[4]"}],"outputs":[{"name":"","type":"uint256[4]"}],"gas":32946},{"stateMutability":"nonpayable","type":"function","name":"remove_liquidity_one_coin","inputs":[{"name":"_token_amount","type":"uint256"},{"name":"i","type":"int128"},{"name":"_min_amount","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":14494},{"stateMutability":"nonpayable","type":"function","name":"remove_liquidity_imbalance","inputs":[{"name":"_amounts","type":"uint256[4]"},{"name":"_max_burn_amount","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":38227},{"stateMutability":"view","type":"function","name":"calc_withdraw_one_coin","inputs":[{"name":"_token_amount","type":"uint256"},{"name":"i","type":"int128"}],"outputs":[{"name":"","type":"uint256"}],"gas":3174},{"stateMutability":"view","type":"function","name":"calc_token_amount","inputs":[{"name":"_amounts","type":"uint256[4]"},{"name":"_is_deposit","type":"bool"}],"outputs":[{"name":"","type":"uint256"}],"gas":4441},{"stateMutability":"view","type":"function","name":"pool","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":1268},{"stateMutability":"view","type":"function","name":"token","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":1298},{"stateMutability":"view","type":"function","name":"base_pool","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":1328},{"stateMutability":"view","type":"function","name":"coins","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"address"}],"gas":1467},{"stateMutability":"view","type":"function","name":"base_coins","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"address"}],"gas":1497}]

6040611bb5610140396020611bb560c03960c05160a01c1561002057600080fd5b60206020611bb50160c03960c05160a01c1561003b57600080fd5b610140516000556101605160015560206102006004635d6362bb6101a0526101bc610140515afa61006b57600080fd5b601f3d1161007857600080fd5b6000506102005161018052610180516002556101a060006002818352015b6020610260602463c66106576101e0526101a05160008112156100b857600080fd5b610200526101fc610140515afa6100ce57600080fd5b601f3d116100db57600080fd5b600050610260516101c0526101c0516101a051600281106100fb57600080fd5b600360c052602060c020015560006004610240527f095ea7b300000000000000000000000000000000000000000000000000000000610260526102406004806020846102a001018260208501600060045af1505080518201915050610140516020826102a00101526020810190507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6020826102a0010152602081019050806102a0526102a090508051602001806103408284600060045af16101bd57600080fd5b505060206104006103405161036060006101c0515af16101dc57600080fd5b60203d808211156101ed57806101ef565b815b905090506103e0526103e08051602001806101e08284600060045af161021457600080fd5b505060006101e0511115610266576101e080602001516000825180602090131561023d57600080fd5b809190121561024b57600080fd5b806020036101000a8204905090509050151561026657600080fd5b8151600101808352811415610096575b50506101a060006003818352015b6020610260602463c66106576101e0526101a051610200526101fc610180515afa6102ae57600080fd5b601f3d116102bb57600080fd5b600050610260516101c0526101c0516101a051600381106102db57600080fd5b600460c052602060c020015560006004610240527f095ea7b300000000000000000000000000000000000000000000000000000000610260526102406004806020846102a001018260208501600060045af1505080518201915050610180516020826102a00101526020810190507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6020826102a0010152602081019050806102a0526102a090508051602001806103408284600060045af161039d57600080fd5b505060206104006103405161036060006101c0515af16103bc57600080fd5b60203d808211156103cd57806103cf565b815b905090506103e0526103e08051602001806101e08284600060045af16103f457600080fd5b505060006101e0511115610446576101e080602001516000825180602090131561041d57600080fd5b809190121561042b57600080fd5b806020036101000a8204905090509050151561044657600080fd5b8151600101808352811415610284575b5050611b9d56600436101561000d5761173a565b600035601c52600051341561002157600080fd5b63029b2f348114156104225760c0366101403761020060006004818352015b6004610200516004811061005357600080fd5b60200201356102205261022051151561006b57610281565b60006102405260016102005112156100c057610200516002811061008e57600080fd5b600360c052602060c0200154610240526102205161014061020051600281106100b657600080fd5b6020020152610132565b610200516001808203808060008112156100d657195b607f1c156100e357600080fd5b9050905090506102605261026051600381106100fe57600080fd5b600460c052602060c02001546102405261022051610180610260516003811061012657600080fd5b602002015260016101e0525b600060046102c0527f23b872dd000000000000000000000000000000000000000000000000000000006102e0526102c060048060208461032001018260208501600060045af1505080518201915050336020826103200101526020810190503060208261032001015260208101905061022051602082610320010152602081019050806103205261032090508051602001806103e08284600060045af16101d857600080fd5b505060206104c06103e0516104006000610240515af16101f757600080fd5b60203d80821115610208578061020a565b815b905090506104a0526104a08051602001806102608284600060045af161022f57600080fd5b505060006102605111156102815761026080602001516000825180602090131561025857600080fd5b809190121561026657600080fd5b806020036101000a8204905090509050151561028157600080fd5b8151600101808352811415610040575b50506101e05115610333576002543b6102a957600080fd5b600060006084634515cef36102005261018051610220526101a051610240526101c0516102605260006102805261021c60006002545af16102e957600080fd5b602061028060246370a0823161020052306102205261021c6001600360c052602060c02001545afa61031a57600080fd5b601f3d1161032757600080fd5b60005061028051610160525b60206102c06064630b4c7e4d61020052610140516102205261016051610240526084356102605261021c60006000545af161036d57600080fd5b601f3d1161037a57600080fd5b6000506102c0506001546102005260206102c060246370a0823161024052306102605261025c610200515afa6103af57600080fd5b601f3d116103bc57600080fd5b6000506102c0516102205260206102e0604463a9059cbb610240523361026052610220516102805261025c6000610200515af16103f857600080fd5b601f3d1161040557600080fd5b6000506102e05161041557600080fd5b6102205160005260206000f35b637d49d8758114156108865760015461014052602061022060646323b872dd610160523361018052306101a0526004356101c05261017c6000610140515af161046a57600080fd5b601f3d1161047757600080fd5b6000506102205161048757600080fd5b610120366101603761028060006001818352015b602461028051600481106104ae57600080fd5b602002013561016061028051600281106104c757600080fd5b60200201525b815160010180835281141561049b575b505060406103406064635b36389c610280526004356102a052610160516102c052610180516102e05261029c60006000545af161051957600080fd5b603f3d1161052657600080fd5b60005061034050602061032060246370a082316102a052306102c0526102bc6001600360c052602060c02001545afa61055e57600080fd5b601f3d1161056b57600080fd5b60005061032051610280526102a060006003818352015b602460016102a0518082018080600081121561059a57195b607f1c156105a757600080fd5b905090509050600481106105ba57600080fd5b60200201356101a06102a051600381106105d357600080fd5b60200201525b8151600101808352811415610582575b50506002543b6105f857600080fd5b60006000608463ecb586a56102a052610280516102c0526101a0516102e0526101c051610300526101e051610320526102bc60006002545af161063a57600080fd5b6102a060006004818352015b60006102c05260016102a051121561067e576102a0516002811061066957600080fd5b600360c052602060c02001546102c0526106c5565b6102a05160018082038080600081121561069457195b607f1c156106a157600080fd5b905090509050600381106106b457600080fd5b600460c052602060c02001546102c0525b602061036060246370a082316102e05230610300526102fc6102c0515afa6106ec57600080fd5b601f3d116106f957600080fd5b600050610360516102006102a0516004811061071457600080fd5b602002015260006004610340527fa9059cbb00000000000000000000000000000000000000000000000000000000610360526103406004806020846103a001018260208501600060045af1505080518201915050336020826103a00101526020810190506102006102a0516004811061078c57600080fd5b60200201516020826103a0010152602081019050806103a0526103a090508051602001806104408284600060045af16107c457600080fd5b505060206105006104405161046060006102c0515af16107e357600080fd5b60203d808211156107f457806107f6565b815b905090506104e0526104e08051602001806102e08284600060045af161081b57600080fd5b505060006102e051111561086d576102e080602001516000825180602090131561084457600080fd5b809190121561085257600080fd5b806020036101000a8204905090509050151561086d57600080fd5b8151600101808352811415610646575b50506080610200f35b631a4d01d2811415610c4a57602435808060008112156108a257195b607f1c156108af57600080fd5b905050602061020060646323b872dd61014052336101605230610180526004356101a05261015c60006001545af16108e657600080fd5b601f3d116108f357600080fd5b6000506102005161090357600080fd5b60006101405260016024351215610985576024356002811061092457600080fd5b600360c052602060c02001546101405260206102206064631a4d01d261016052600435610180526024356101a0526044356101c05261017c60006000545af161096c57600080fd5b601f3d1161097957600080fd5b60005061022050610abf565b60243560018082038080600081121561099a57195b607f1c156109a757600080fd5b905090509050600381106109ba57600080fd5b600460c052602060c02001546101405260206102206064631a4d01d2610160526004356101805260016101a05260006101c05261017c60006000545af1610a0057600080fd5b601f3d11610a0d57600080fd5b600050610220506002543b610a2157600080fd5b600060006064631a4d01d26102005260206101e060246370a0823161016052306101805261017c6001600360c052602060c02001545afa610a6157600080fd5b601f3d11610a6e57600080fd5b6000506101e05161022052602435600180820380806000811215610a8e57195b607f1c15610a9b57600080fd5b905090509050610240526044356102605261021c60006002545af1610abf57600080fd5b602061020060246370a0823161018052306101a05261019c610140515afa610ae657600080fd5b601f3d11610af357600080fd5b6000506102005161016052600060046101e0527fa9059cbb00000000000000000000000000000000000000000000000000000000610200526101e060048060208461024001018260208501600060045af15050805182019150503360208261024001015260208101905061016051602082610240010152602081019050806102405261024090508051602001806102e08284600060045af1610b9457600080fd5b505060206103a06102e0516103006000610140515af1610bb357600080fd5b60203d80821115610bc45780610bc6565b815b90509050610380526103808051602001806101808284600060045af1610beb57600080fd5b50506000610180511115610c3d57610180806020015160008251806020901315610c1457600080fd5b8091901215610c2257600080fd5b806020036101000a82049050905090501515610c3d57600080fd5b6101605160005260206000f35b6318a7bd768114156113b057600254610140526000546101605260048060c052602060c020546101805260018160c052602060c02001546101a05260028160c052602060c02001546101c0525060038060c052602060c020546101e05260018160c052602060c020015461020052506001546102205260206102c0600463ddca3f436102605261027c610140515afa610ce257600080fd5b601f3d11610cef57600080fd5b6000506102c05160038082028215828483041417610d0c57600080fd5b80905090509050600880820490509050610240526102408051610240516402540be4008082028215828483041417610d4357600080fd5b809050905090506402540be40080820490509050818183011015610d6657600080fd5b80820190509050815250602061032060646323b872dd610260523361028052306102a0526084356102c05261027c6000610220515af1610da557600080fd5b601f3d11610db257600080fd5b60005061032051610dc257600080fd5b610100366102603761036060006001818352015b60046103605160048110610de957600080fd5b60200201356102e06103605160028110610e0257600080fd5b60200201525b8151600101808352811415610dd6575b505061036060006003818352015b600460016103605180820180806000811215610e3e57195b607f1c15610e4b57600080fd5b90509050905060048110610e5e57600080fd5b6020020135610380526000610380511815610e9757610380516102806103605160038110610e8b57600080fd5b60200201526001610260525b8151600101808352811415610e26575b50506102605115610f705760206104406084633883e1196103605261028051610380526102a0516103a0526102c0516103c05260006103e05261037c6002545afa610ef157600080fd5b601f3d11610efe57600080fd5b6000506104405161030052610300805161030051610240518082028215828483041417610f2a57600080fd5b809050905090506402540be400808204905090506001818183011015610f4f57600080fd5b80820190509050818183011015610f6557600080fd5b808201905090508152505b6020610420606463e3103273610360526102e05161038052610300516103a0526084356103c05261037c6000610160515af1610fab57600080fd5b601f3d11610fb857600080fd5b6000506104205061026051156110b357610140513b610fd657600080fd5b600060006084639fdaea0c6103605261028051610380526102a0516103a0526102c0516103c052610300516103e05261037c6000610140515af161101957600080fd5b60206103e060246370a0823161036052306103805261037c610200515afa61104057600080fd5b601f3d1161104d57600080fd5b6000506103e0516103405260006103405111156110b35760206104206064630b4c7e4d610360526103205161038052610340516103a05260006103c05261037c6000610160515af161109e57600080fd5b601f3d116110ab57600080fd5b600050610420505b61036060006004818352015b604036610380376001610360511215611111576101e061036051600281106110e657600080fd5b6020020151610380526102e0610360516002811061110357600080fd5b60200201516103a052611196565b6101806103605160018082038080600081121561112a57195b607f1c1561113757600080fd5b9050905090506003811061114a57600080fd5b6020020151610380526102806103605160018082038080600081121561116c57195b607f1c1561117957600080fd5b9050905090506003811061118c57600080fd5b60200201516103a0525b60006103a05111156112e15760006004610420527fa9059cbb000000000000000000000000000000000000000000000000000000006104405261042060048060208461048001018260208501600060045af1505080518201915050336020826104800101526020810190506103a051602082610480010152602081019050806104805261048090508051602001806105208284600060045af161123857600080fd5b505060206105e0610520516105406000610380515af161125757600080fd5b60203d80821115611268578061126a565b815b905090506105c0526105c08051602001806103c08284600060045af161128f57600080fd5b505060006103c05111156112e1576103c08060200151600082518060209013156112b857600080fd5b80919012156112c657600080fd5b806020036101000a820490509050905015156112e157600080fd5b81516001018083528114156110bf575b5050602061040060246370a0823161038052306103a05261039c610220515afa61131a57600080fd5b601f3d1161132757600080fd5b6000506104005161036052600061036051111561138c576020610420604463a9059cbb61038052336103a052610360516103c05261039c6000610220515af161136f57600080fd5b601f3d1161137c57600080fd5b6000506104205161138c57600080fd5b60843561036051808210156113a057600080fd5b8082039050905060005260206000f35b63cc2b27d78114156114f157602435808060008112156113cc57195b607f1c156113d957600080fd5b905050600160243512156114375760206101e0604463cc2b27d761014052600435610160526024356101805261015c6000545afa61141657600080fd5b601f3d1161142357600080fd5b6000506101e05160005260206000f36114ef565b6020610200604463cc2b27d7610160526004356101805260016101a05261017c6000545afa61146557600080fd5b601f3d1161147257600080fd5b60005061020051610140526020610200604463cc2b27d76101605261014051610180526024356001808203808060008112156114aa57195b607f1c156114b757600080fd5b9050905090506101a05261017c6002545afa6114d257600080fd5b601f3d116114df57600080fd5b6000506102005160005260206000f35b005b63cf701ff781141561168e5760843560011c1561150d57600080fd5b60a036610140376101e060006001818352015b60046101e0516004811061153357600080fd5b60200201356101406101e0516002811061154c57600080fd5b60200201525b8151600101808352811415611520575b50506101e060006003818352015b60046101e05160018082018080600081121561158857195b607f1c1561159557600080fd5b905090509050600481106115a857600080fd5b60200201356101806101e051600381106115c157600080fd5b60200201525b8151600101808352811415611570575b505060206102e06084633883e1196102005261018051610220526101a051610240526101c051610260526084356102805261021c6002545afa61161957600080fd5b601f3d1161162657600080fd5b6000506102e0516101e0526101e0516101605260206102c0606463ed8e84f361020052610140516102205261016051610240526084356102605261021c6000545afa61167157600080fd5b601f3d1161167e57600080fd5b6000506102c05160005260206000f35b6316f0115b8114156116a65760005460005260206000f35b63fc0c546a8114156116be5760015460005260206000f35b635d6362bb8114156116d65760025460005260206000f35b63c661065781141561170757600435600281106116f257600080fd5b600360c052602060c020015460005260206000f35b6387cb4f57811415611738576004356003811061172357600080fd5b600460c052602060c020015460005260206000f35b505b60006000fd5b61045d611b9d0361045d60003961045d611b9d036000f30000000000000000000000008866c9f1cea0dd633e41208f23dd19430d1ed30600000000000000000000000018796c878f6b38b1f1bf31bc2dfeed4e1d8e033a

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.