Contract 0x445fe580ef8d70ff569ab36e80c647af338db351 9

 

Contract Overview

Curve.fi: Aave Pool
Balance:
0 MATIC

MATIC Value:
$0.00

Token:
 
Txn Hash
Method
Block
From
To
Value [Txn Fee]
0xedbea7b0d5a8e7dd18c128c65c1b47ba9dea6687b1a825498660462ee3e75e28Remove_liquidity...437090252023-06-09 10:20:227 mins ago0xca3467e0683eb009a3f8bb8d4f9af040684b9763 IN  Curve.fi: Aave Pool0 MATIC0.0629072388 158.9
0xe8ec22b3ac8befcf6f13b18cb6e2bfb3f140a1d3f98bcc9b6cde83844c6aabfdAdd_liquidity437078892023-06-09 9:36:3551 mins ago0x4aa6124c7daf7d2000a421818640f911f52961b4 IN  Curve.fi: Aave Pool0 MATIC0.08165184192
0x802c248df7fa95f39087d1196ab083f4960d1a3be86b4926a4ddbac7a2f0a1e4Remove_liquidity...437061102023-06-09 8:29:091 hr 59 mins ago0xc0b38a2a4324c984f8e90e3baa98a2f0fb74d2c8 IN  Curve.fi: Aave Pool0 MATIC0.0607298328 153.4
0x2efd9ab21eaca2b17398f808a8392bcfc5faa6241a680426378f224282821adaRemove_liquidity...437057172023-06-09 8:13:072 hrs 15 mins ago0xc0b38a2a4324c984f8e90e3baa98a2f0fb74d2c8 IN  Curve.fi: Aave Pool0 MATIC0.070918236 177
0x4a3d60be77fd46782d02aafc949d0a748b94bff61e6602cdeb99fef33d470337Remove_liquidity...437032702023-06-09 6:33:113 hrs 55 mins ago0x49d39e8bb31197f68a1c513da6a7c73f4b141e5d IN  Curve.fi: Aave Pool0 MATIC0.061751304621 158.408978
0xcaef7030b43cd7efc73f1d0c0786453ffd8458195adf331c1a52f9f840ef4fe0Remove_liquidity...436972022023-06-09 2:37:317 hrs 50 mins ago0xe5b1b7295b3a82d5ed9d16cf3c79ad0316efa279 IN  Curve.fi: Aave Pool0 MATIC0.058361258539 156.102910523
0x7052cffb087298ce71c962905458d7ecd6ef85871879af847a7714a9ccadaf15Add_liquidity436931132023-06-09 0:03:5610 hrs 24 mins ago0xada924cc00039bf2f778deed116186a16a5e4b19 IN  Curve.fi: Aave Pool0 MATIC0.035614981773 156.151955127
0x43de34db9b24fce23cb3200c8d65784e64c7bd4ca6b810b919383c1953baa4b3Add_liquidity436931072023-06-09 0:03:4410 hrs 24 mins ago0xada924cc00039bf2f778deed116186a16a5e4b19 IN  Curve.fi: Aave Pool0 MATIC0.067160018988 156.151955127
0x17acb576ff2d8a827a7d3c834cfe2f0178f9c3b8af6dae760b5dfcee01288b38Remove_liquidity...436885272023-06-08 21:05:5213 hrs 22 mins ago0xf6272c52ecea796d0b06ade94a70a3eb2293d8c0 IN  Curve.fi: Aave Pool0 MATIC0.062641779712 152.172797
0xcee4622227a34c3d53b809f2176832d741181dbe6621490dc3affd4e78d57386Remove_liquidity...436832182023-06-08 17:51:1016 hrs 37 mins ago0xa405bb5b1cea47eb4e456cfe82923688bc4acf84 IN  Curve.fi: Aave Pool0 MATIC0.057265376992 146.463259724
0x2b00782b27f28f3e98b16a521e43fd4343ca1dbc1c8c7a2d4a91fa2bc45d584eRemove_liquidity...436829092023-06-08 17:40:0216 hrs 48 mins ago0x242717a929352eac327d71e1e5391e02ca9fd516 IN  Curve.fi: Aave Pool0 MATIC0.062186226419 157.078764964
0x3172d8a87b42512552a331896f6b16a4b527037a16e5376a30a2e1ea6b9a6e33Remove_liquidity...436767052023-06-08 13:51:0620 hrs 37 mins ago0x98223b2f63a73f76073b138c3ee2c57bd8ddd084 IN  Curve.fi: Aave Pool0 MATIC0.065566451045 165.38683
0x8c0e98b8a01e5e1f6f7622f7397cadf8a0850c786d75d13f1fd81d6bac4da61eAdd_liquidity436754772023-06-08 13:04:2321 hrs 23 mins ago0x1f4ccb44b142e94718b7a21002ca804f9ca5188f IN  Curve.fi: Aave Pool0 MATIC0.154933065628 206.698132547
0xd985514e2eac88d3a6277b40957ce15a04e5e6cdef2f85a679bf8e37e01519b5Remove_liquidity...436719392023-06-08 10:56:1623 hrs 31 mins ago0xad3e1ddae478d08799a124dea6a38807f7d28fea IN  Curve.fi: Aave Pool0 MATIC0.062920571159 158.933676758
0x3fd622e9e25e60fe3ec843e42b082660ba476319ad7eb803fb1f04f255ff36b5Remove_liquidity...436701272023-06-08 9:50:081 day 38 mins ago0x674998fd0beadc9e2f2a474cde8de9c8a9ec2e4f IN  Curve.fi: Aave Pool0 MATIC0.060564999922 152.983641808
0x9a3f9218f5dbec0644fda71ae81994799c756eeff6f3c2314fb154114cdce9aeRemove_liquidity436693792023-06-08 9:23:041 day 1 hr ago0xc2b26932cac15d9823fca5f808570c1b570116ec IN  Curve.fi: Aave Pool0 MATIC0.097625522943 150.389312432
0x4866eeafd6983fad0351dbeba702ec4d237e624d14883eca42ad6ae1dd5b7532Add_liquidity436675182023-06-08 8:16:361 day 2 hrs ago0x1f4ccb44b142e94718b7a21002ca804f9ca5188f IN  Curve.fi: Aave Pool0 MATIC0.118575348132 154.664439
0xedc50782a8a7e9a2080c906b7e1d0397c5b49fc0a930dbcd02ef68c4f72593deRemove_liquidity...436674762023-06-08 8:15:081 day 2 hrs ago0x7624b0284b2a76da321b2f7ef27481d004dc235a IN  Curve.fi: Aave Pool0 MATIC0.066711484484 176.105244987
0x84a2d701fdd34b5b0acb47c81b1c0edd53678d07b39f740760a7589339b729b7Add_liquidity436666512023-06-08 7:45:431 day 2 hrs ago0xbf327e90c97ac8170dd5491db69190625d697b7a IN  Curve.fi: Aave Pool0 MATIC0.079189361269 186.209611
0xd65ca939a0c5f14072fa6427d3c4c676e836b6cad210d4f8d64b270222c22f69Remove_liquidity...436657982023-06-08 7:13:571 day 3 hrs ago0x7c9f43215d3b3d5055433a9d7b12bcbf9f4be442 IN  Curve.fi: Aave Pool0 MATIC0.090659268229
0xaa2a74c01a531df242bb095c2351c53125b17bdf12bc5da4286d49a1e791103cAdd_liquidity436564002023-06-08 1:17:041 day 9 hrs ago0x026fd09af688e30028c5a19d41819b06262e51e0 IN  Curve.fi: Aave Pool0 MATIC0.06255864231 149.197099729
0xca7af788a231ffb55b4484e076b19f9b9c6f00c1bb881f79f03fcaf29024bb1bRemove_liquidity...436558952023-06-08 0:57:461 day 9 hrs ago0x026fd09af688e30028c5a19d41819b06262e51e0 IN  Curve.fi: Aave Pool0 MATIC0.059213924654 151.456207361
0x515bcd612b6ce4446ef1508d0b9352d0bc5cc0943fc385734305e5a10fed52f4Remove_liquidity...436475072023-06-07 19:42:031 day 14 hrs ago0x034ef3febbb12e0173b8c1fb52f6a23c47801a51 IN  Curve.fi: Aave Pool0 MATIC0.071867930894 184.360890084
0x0025b51c03d249e8a51fffd55df8d966970f273e487b1b591628c25e586331fdRemove_liquidity...436474882023-06-07 19:40:531 day 14 hrs ago gelause.nft  IN  Curve.fi: Aave Pool0 MATIC0.054119559656 142.883136
0x9f61565ee13b532291b4ff73b62d4e2d28a25230b29a10532394a2d97f180d20Add_liquidity436419542023-06-07 16:16:281 day 18 hrs ago0x2fcb38042dab5cfd33fbdca41873e15cbf3cfda5 IN  Curve.fi: Aave Pool0 MATIC0.250388551382 330.714464906
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Vyper_contract

Compiler Version
vyper:0.2.12

Optimization Enabled:
N/A

Other Settings:
, None license

Contract Source Code (Vyper language format)

# @version 0.2.12
"""
@title Curve aPool for use on Polygon
@author Curve.Fi
@license Copyright (c) Curve.Fi, 2020 - all rights reserved
@notice Pool implementation with aToken-style lending
"""

from vyper.interfaces import ERC20


interface LendingPool:
    def withdraw(_underlying_asset: address, _amount: uint256, _receiver: address): nonpayable

interface CurveToken:
    def mint(_to: address, _value: uint256) -> bool: nonpayable
    def burnFrom(_to: address, _value: uint256) -> bool: nonpayable


# Events
event TokenExchange:
    buyer: indexed(address)
    sold_id: int128
    tokens_sold: uint256
    bought_id: int128
    tokens_bought: uint256

event TokenExchangeUnderlying:
    buyer: indexed(address)
    sold_id: int128
    tokens_sold: uint256
    bought_id: int128
    tokens_bought: uint256

event AddLiquidity:
    provider: indexed(address)
    token_amounts: uint256[N_COINS]
    fees: uint256[N_COINS]
    invariant: uint256
    token_supply: uint256

event RemoveLiquidity:
    provider: indexed(address)
    token_amounts: uint256[N_COINS]
    fees: uint256[N_COINS]
    token_supply: uint256

event RemoveLiquidityOne:
    provider: indexed(address)
    token_amount: uint256
    coin_amount: uint256

event RemoveLiquidityImbalance:
    provider: indexed(address)
    token_amounts: uint256[N_COINS]
    fees: uint256[N_COINS]
    invariant: uint256
    token_supply: uint256

event CommitNewAdmin:
    deadline: indexed(uint256)
    admin: indexed(address)

event NewAdmin:
    admin: indexed(address)

event CommitNewFee:
    deadline: indexed(uint256)
    fee: uint256
    admin_fee: uint256
    offpeg_fee_multiplier: uint256

event NewFee:
    fee: uint256
    admin_fee: uint256
    offpeg_fee_multiplier: uint256

event RampA:
    old_A: uint256
    new_A: uint256
    initial_time: uint256
    future_time: uint256

event StopRampA:
    A: uint256
    t: uint256


N_COINS: constant(int128) = 3
PRECISION_MUL: constant(uint256[N_COINS]) = [1, 1000000000000, 1000000000000]
PRECISION: constant(uint256) = 10 ** 18

FEE_DENOMINATOR: constant(uint256) = 10 ** 10
MAX_ADMIN_FEE: constant(uint256) = 10 * 10 ** 9
MAX_FEE: constant(uint256) = 5 * 10 ** 9

MAX_A: constant(uint256) = 10 ** 6
MAX_A_CHANGE: constant(uint256) = 10
A_PRECISION: constant(uint256) = 100

ADMIN_ACTIONS_DELAY: constant(uint256) = 3 * 86400
MIN_RAMP_TIME: constant(uint256) = 86400

MATIC_REWARDS: constant(address) = 0x357D51124f59836DeD84c8a1730D72B749d8BC23
AAVE_LENDING_POOL: constant(address) = 0x8dFf5E27EA6b7AC08EbFdf9eB090F32ee9a30fcf
WMATIC: constant(address) = 0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270

coins: public(address[N_COINS])
underlying_coins: public(address[N_COINS])
admin_balances: public(uint256[N_COINS])

fee: public(uint256)  # fee * 1e10
offpeg_fee_multiplier: public(uint256)  # * 1e10
admin_fee: public(uint256)  # admin_fee * 1e10

owner: public(address)
lp_token: public(address)

aave_lending_pool: address
aave_referral: uint256

initial_A: public(uint256)
future_A: public(uint256)
initial_A_time: public(uint256)
future_A_time: public(uint256)

admin_actions_deadline: public(uint256)
transfer_ownership_deadline: public(uint256)
future_fee: public(uint256)
future_admin_fee: public(uint256)
future_offpeg_fee_multiplier: public(uint256)  # * 1e10
future_owner: public(address)

is_killed: bool
kill_deadline: uint256
KILL_DEADLINE_DT: constant(uint256) = 2 * 30 * 86400

reward_receiver: public(address)
admin_fee_receiver: public(address)

@external
def __init__(
    _coins: address[N_COINS],
    _underlying_coins: address[N_COINS],
    _pool_token: address,
    _A: uint256,
    _fee: uint256,
    _admin_fee: uint256,
    _offpeg_fee_multiplier: uint256,
):
    """
    @notice Contract constructor
    @param _coins List of wrapped coin addresses
    @param _underlying_coins List of underlying coin addresses
    @param _pool_token Pool LP token address
    @param _A Amplification coefficient multiplied by n * (n - 1)
    @param _fee Swap fee expressed as an integer with 1e10 precision
    @param _admin_fee Percentage of fee taken as an admin fee,
                      expressed as an integer with 1e10 precision
    @param _offpeg_fee_multiplier Offpeg fee multiplier
    """
    for i in range(N_COINS):
        assert _coins[i] != ZERO_ADDRESS
        assert _underlying_coins[i] != ZERO_ADDRESS

    self.coins = _coins
    self.underlying_coins = _underlying_coins
    self.initial_A = _A * A_PRECISION
    self.future_A = _A * A_PRECISION
    self.fee = _fee
    self.admin_fee = _admin_fee
    self.offpeg_fee_multiplier = _offpeg_fee_multiplier
    self.owner = msg.sender
    self.admin_fee_receiver = msg.sender
    self.kill_deadline = block.timestamp + KILL_DEADLINE_DT
    self.lp_token = _pool_token

    # approve transfer of underlying coin to aave lending pool
    for coin in _underlying_coins:
        _response: Bytes[32] = raw_call(
            coin,
            concat(
                method_id("approve(address,uint256)"),
                convert(AAVE_LENDING_POOL, bytes32),
                convert(MAX_UINT256, bytes32)
            ),
            max_outsize=32
        )
        if len(_response) != 0:
            assert convert(_response, bool)


@view
@internal
def _A() -> uint256:
    t1: uint256 = self.future_A_time
    A1: uint256 = self.future_A

    if block.timestamp < t1:
        # handle ramping up and down of A
        A0: uint256 = self.initial_A
        t0: uint256 = self.initial_A_time
        # Expressions in uint256 cannot have negative numbers, thus "if"
        if A1 > A0:
            return A0 + (A1 - A0) * (block.timestamp - t0) / (t1 - t0)
        else:
            return A0 - (A0 - A1) * (block.timestamp - t0) / (t1 - t0)

    else:  # when t1 == 0 or block.timestamp >= t1
        return A1


@view
@external
def A() -> uint256:
    return self._A() / A_PRECISION


@view
@external
def A_precise() -> uint256:
    return self._A()


@pure
@internal
def _dynamic_fee(xpi: uint256, xpj: uint256, _fee: uint256, _feemul: uint256) -> uint256:
    if _feemul <= FEE_DENOMINATOR:
        return _fee
    else:
        xps2: uint256 = (xpi + xpj)
        xps2 *= xps2  # Doing just ** 2 can overflow apparently
        return (_feemul * _fee) / (
            (_feemul - FEE_DENOMINATOR) * 4 * xpi * xpj / xps2 + \
            FEE_DENOMINATOR)


@view
@external
def dynamic_fee(i: int128, j: int128) -> uint256:
    """
    @notice Return the fee for swapping between `i` and `j`
    @param i Index value for the coin to send
    @param j Index value of the coin to recieve
    @return Swap fee expressed as an integer with 1e10 precision
    """
    precisions: uint256[N_COINS] = PRECISION_MUL
    xpi: uint256 = (ERC20(self.coins[i]).balanceOf(self) - self.admin_balances[i]) * precisions[i]
    xpj: uint256 = (ERC20(self.coins[j]).balanceOf(self) - self.admin_balances[j]) * precisions[j]
    return self._dynamic_fee(xpi, xpj, self.fee, self.offpeg_fee_multiplier)


@view
@external
def balances(i: uint256) -> uint256:
    """
    @notice Get the current balance of a coin within the
            pool, less the accrued admin fees
    @param i Index value for the coin to query balance of
    @return Token balance
    """
    return ERC20(self.coins[i]).balanceOf(self) - self.admin_balances[i]


@view
@internal
def _balances() -> uint256[N_COINS]:
    result: uint256[N_COINS] = empty(uint256[N_COINS])
    for i in range(N_COINS):
        result[i] = ERC20(self.coins[i]).balanceOf(self) - self.admin_balances[i]
    return result


@pure
@internal
def get_D(xp: uint256[N_COINS], amp: uint256) -> uint256:
    """
    D invariant calculation in non-overflowing integer operations
    iteratively

    A * sum(x_i) * n**n + D = A * D * n**n + D**(n+1) / (n**n * prod(x_i))

    Converging solution:
    D[j+1] = (A * n**n * sum(x_i) - D[j]**(n+1) / (n**n prod(x_i))) / (A * n**n - 1)
    """
    S: uint256 = 0

    for _x in xp:
        S += _x
    if S == 0:
        return 0

    Dprev: uint256 = 0
    D: uint256 = S
    Ann: uint256 = amp * N_COINS
    for _i in range(255):
        D_P: uint256 = D
        for _x in xp:
            D_P = D_P * D / (_x * N_COINS + 1)  # +1 is to prevent /0
        Dprev = D
        D = (Ann * S / A_PRECISION + D_P * N_COINS) * D / ((Ann - A_PRECISION) * D / A_PRECISION + (N_COINS + 1) * D_P)
        # Equality with the precision of 1
        if D > Dprev:
            if D - Dprev <= 1:
                return D
        else:
            if Dprev - D <= 1:
                return D
    # convergence typically occurs in 4 rounds or less, this should be unreachable!
    # if it does happen the pool is borked and LPs can withdraw via `remove_liquidity`
    raise



@view
@internal
def get_D_precisions(coin_balances: uint256[N_COINS], amp: uint256) -> uint256:
    xp: uint256[N_COINS] = PRECISION_MUL
    for i in range(N_COINS):
        xp[i] *= coin_balances[i]
    return self.get_D(xp, amp)


@view
@external
def get_virtual_price() -> uint256:
    """
    @notice The current virtual price of the pool LP token
    @dev Useful for calculating profits
    @return LP token virtual price normalized to 1e18
    """
    D: uint256 = self.get_D_precisions(self._balances(), self._A())
    # D is in the units similar to DAI (e.g. converted to precision 1e18)
    # When balanced, D = n * x_u - total virtual value of the portfolio
    token_supply: uint256 = ERC20(self.lp_token).totalSupply()
    return D * PRECISION / token_supply


@view
@external
def calc_token_amount(_amounts: uint256[N_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 coin being deposited
    @param is_deposit set True for deposits, False for withdrawals
    @return Expected amount of LP tokens received
    """
    coin_balances: uint256[N_COINS] = self._balances()
    amp: uint256 = self._A()
    D0: uint256 = self.get_D_precisions(coin_balances, amp)
    for i in range(N_COINS):
        if is_deposit:
            coin_balances[i] += _amounts[i]
        else:
            coin_balances[i] -= _amounts[i]
    D1: uint256 = self.get_D_precisions(coin_balances, amp)
    token_amount: uint256 = ERC20(self.lp_token).totalSupply()
    diff: uint256 = 0
    if is_deposit:
        diff = D1 - D0
    else:
        diff = D0 - D1
    return diff * token_amount / D0


@internal
def _claim_rewards():
    # push wMatic rewards into the reward receiver
    reward_receiver: address = self.reward_receiver
    if reward_receiver != ZERO_ADDRESS:
        response: Bytes[32] = raw_call(
            MATIC_REWARDS,
            concat(
                method_id("claimRewards(address[],uint256,address)"),
                convert(32 * 3, bytes32),
                convert(MAX_UINT256, bytes32),
                convert(self, bytes32),
                convert(3, bytes32),
                convert(self.coins[0], bytes32),
                convert(self.coins[1], bytes32),
                convert(self.coins[2], bytes32),
            ),
            max_outsize=32
        )
        amount: uint256 = convert(response, uint256)
        if amount > 0:
            assert ERC20(WMATIC).transfer(reward_receiver, amount)


@external
@nonreentrant('lock')
def add_liquidity(_amounts: uint256[N_COINS], _min_mint_amount: uint256, _use_underlying: bool = False) -> uint256:
    """
    @notice Deposit coins into the pool
    @param _amounts List of amounts of coins to deposit
    @param _min_mint_amount Minimum amount of LP tokens to mint from the deposit
    @param _use_underlying If True, deposit underlying assets instead of aTokens
    @return Amount of LP tokens received by depositing
    """

    assert not self.is_killed  # dev: is killed
    self._claim_rewards()

    # Initial invariant
    amp: uint256 = self._A()
    old_balances: uint256[N_COINS] = self._balances()
    lp_token: address = self.lp_token
    token_supply: uint256 = ERC20(lp_token).totalSupply()
    D0: uint256 = 0
    if token_supply != 0:
        D0 = self.get_D_precisions(old_balances, amp)

    new_balances: uint256[N_COINS] = old_balances
    for i in range(N_COINS):
        if token_supply == 0:
            assert _amounts[i] != 0  # dev: initial deposit requires all coins
        new_balances[i] += _amounts[i]

    # Invariant after change
    D1: uint256 = self.get_D_precisions(new_balances, amp)
    assert D1 > D0

    # We need to recalculate the invariant accounting for fees
    # to calculate fair user's share
    fees: uint256[N_COINS] = empty(uint256[N_COINS])
    mint_amount: uint256 = 0
    if token_supply != 0:
        # Only account for fees if we are not the first to deposit
        ys: uint256 = (D0 + D1) / N_COINS
        _fee: uint256 = self.fee * N_COINS / (4 * (N_COINS - 1))
        _feemul: uint256 = self.offpeg_fee_multiplier
        _admin_fee: uint256 = self.admin_fee
        difference: uint256 = 0
        for i in range(N_COINS):
            ideal_balance: uint256 = D1 * old_balances[i] / D0
            new_balance: uint256 = new_balances[i]
            if ideal_balance > new_balance:
                difference = ideal_balance - new_balance
            else:
                difference = new_balance - ideal_balance
            xs: uint256 = old_balances[i] + new_balance
            fees[i] = self._dynamic_fee(xs, ys, _fee, _feemul) * difference / FEE_DENOMINATOR
            if _admin_fee != 0:
                self.admin_balances[i] += fees[i] * _admin_fee / FEE_DENOMINATOR
            new_balances[i] = new_balance - fees[i]
        D2: uint256 = self.get_D_precisions(new_balances, amp)
        mint_amount = token_supply * (D2 - D0) / D0
    else:
        mint_amount = D1  # Take the dust if there was any

    assert mint_amount >= _min_mint_amount, "Slippage screwed you"

    # Take coins from the sender
    if _use_underlying:
        aave_referral: bytes32 = convert(self.aave_referral, bytes32)

        # Take coins from the sender
        for i in range(N_COINS):
            amount: uint256 = _amounts[i]
            if amount != 0:
                coin: address = self.underlying_coins[i]
                # transfer underlying coin from msg.sender to self
                _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
                )
                if len(_response) != 0:
                    assert convert(_response, bool)

                # deposit to aave lending pool
                raw_call(
                    AAVE_LENDING_POOL,
                    concat(
                        method_id("deposit(address,uint256,address,uint16)"),
                        convert(coin, bytes32),
                        convert(amount, bytes32),
                        convert(self, bytes32),
                        aave_referral,
                    )
                )
    else:
        for i in range(N_COINS):
            amount: uint256 = _amounts[i]
            if amount != 0:
                assert ERC20(self.coins[i]).transferFrom(msg.sender, self, amount) # dev: failed transfer

    # Mint pool tokens
    CurveToken(lp_token).mint(msg.sender, mint_amount)

    log AddLiquidity(msg.sender, _amounts, fees, D1, token_supply + mint_amount)

    return mint_amount


@view
@internal
def get_y(i: int128, j: int128, x: uint256, xp: uint256[N_COINS]) -> uint256:
    """
    Calculate x[j] if one makes x[i] = x

    Done by solving quadratic equation iteratively.
    x_1**2 + x1 * (sum' - (A*n**n - 1) * D / (A * n**n)) = D ** (n + 1) / (n ** (2 * n) * prod' * A)
    x_1**2 + b*x_1 = c

    x_1 = (x_1**2 + c) / (2*x_1 + b)
    """
    # x in the input is converted to the same price/precision

    assert i != j       # dev: same coin
    assert j >= 0       # dev: j below zero
    assert j < N_COINS  # dev: j above N_COINS

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

    amp: uint256 = self._A()
    D: uint256 = self.get_D(xp, amp)
    Ann: uint256 = amp * N_COINS
    c: uint256 = D
    S_: uint256 = 0
    _x: uint256 = 0
    y_prev: uint256 = 0

    for _i in range(N_COINS):
        if _i == i:
            _x = x
        elif _i != j:
            _x = xp[_i]
        else:
            continue
        S_ += _x
        c = c * D / (_x * N_COINS)
    c = c * D * A_PRECISION / (Ann * N_COINS)
    b: uint256 = S_ + D * A_PRECISION / Ann  # - D
    y: uint256 = D
    for _i in range(255):
        y_prev = y
        y = (y*y + c) / (2 * y + b - D)
        # Equality with the precision of 1
        if y > y_prev:
            if y - y_prev <= 1:
                return y
        else:
            if y_prev - y <= 1:
                return y
    raise


@view
@internal
def _get_dy(i: int128, j: int128, dx: uint256) -> uint256:
    xp: uint256[N_COINS] = self._balances()
    precisions: uint256[N_COINS] = PRECISION_MUL
    for k in range(N_COINS):
        xp[k] *= precisions[k]

    x: uint256 = xp[i] + dx * precisions[i]
    y: uint256 = self.get_y(i, j, x, xp)
    dy: uint256 = (xp[j] - y) / precisions[j]
    _fee: uint256 = self._dynamic_fee(
            (xp[i] + x) / 2, (xp[j] + y) / 2, self.fee, self.offpeg_fee_multiplier
        ) * dy / FEE_DENOMINATOR
    return dy - _fee


@view
@external
def get_dy(i: int128, j: int128, dx: uint256) -> uint256:
    return self._get_dy(i, j, dx)


@view
@external
def get_dy_underlying(i: int128, j: int128, dx: uint256) -> uint256:
    return self._get_dy(i, j, dx)


@internal
def _exchange(i: int128, j: int128, dx: uint256) -> uint256:
    assert not self.is_killed  # dev: is killed
    # dx and dy are in aTokens

    self._claim_rewards()
    xp: uint256[N_COINS] = self._balances()
    precisions: uint256[N_COINS] = PRECISION_MUL
    for k in range(N_COINS):
        xp[k] *= precisions[k]

    x: uint256 = xp[i] + dx * precisions[i]
    y: uint256 = self.get_y(i, j, x, xp)
    dy: uint256 = xp[j] - y
    dy_fee: uint256 = dy * self._dynamic_fee(
            (xp[i] + x) / 2, (xp[j] + y) / 2, self.fee, self.offpeg_fee_multiplier
        ) / FEE_DENOMINATOR

    admin_fee: uint256 = self.admin_fee
    if admin_fee != 0:
        dy_admin_fee: uint256 = dy_fee * admin_fee / FEE_DENOMINATOR
        if dy_admin_fee != 0:
            self.admin_balances[j] += dy_admin_fee / precisions[j]

    return (dy - dy_fee) / precisions[j]


@external
@nonreentrant('lock')
def exchange(i: int128, j: int128, dx: uint256, min_dy: uint256) -> uint256:
    """
    @notice Perform an exchange between two coins
    @dev Index values can be found via the `coins` public getter method
    @param i Index value for the coin to send
    @param j Index valie of the coin to recieve
    @param dx Amount of `i` being exchanged
    @param min_dy Minimum amount of `j` to receive
    @return Actual amount of `j` received
    """
    dy: uint256 = self._exchange(i, j, dx)
    assert dy >= min_dy, "Exchange resulted in fewer coins than expected"

    assert ERC20(self.coins[i]).transferFrom(msg.sender, self, dx)
    assert ERC20(self.coins[j]).transfer(msg.sender, dy)

    log TokenExchange(msg.sender, i, dx, j, dy)

    return dy


@external
@nonreentrant('lock')
def exchange_underlying(i: int128, j: int128, dx: uint256, min_dy: uint256) -> uint256:
    """
    @notice Perform an exchange between two underlying coins
    @dev Index values can be found via the `underlying_coins` public getter method
    @param i Index value for the underlying coin to send
    @param j Index valie of the underlying coin to recieve
    @param dx Amount of `i` being exchanged
    @param min_dy Minimum amount of `j` to receive
    @return Actual amount of `j` received
    """
    dy: uint256 = self._exchange(i, j, dx)
    assert dy >= min_dy, "Exchange resulted in fewer coins than expected"

    u_coin_i: address = self.underlying_coins[i]

    # transfer underlying coin from msg.sender to self
    _response: Bytes[32] = raw_call(
        u_coin_i,
        concat(
            method_id("transferFrom(address,address,uint256)"),
            convert(msg.sender, bytes32),
            convert(self, bytes32),
            convert(dx, bytes32)
        ),
        max_outsize=32
    )
    if len(_response) != 0:
        assert convert(_response, bool)

    # deposit to aave lending pool
    raw_call(
        AAVE_LENDING_POOL,
        concat(
            method_id("deposit(address,uint256,address,uint16)"),
            convert(u_coin_i, bytes32),
            convert(dx, bytes32),
            convert(self, bytes32),
            convert(self.aave_referral, bytes32),
        )
    )
    # withdraw `j` underlying from lending pool and transfer to caller
    LendingPool(AAVE_LENDING_POOL).withdraw(self.underlying_coins[j], dy, msg.sender)

    log TokenExchangeUnderlying(msg.sender, i, dx, j, dy)

    return dy


@external
@nonreentrant('lock')
def remove_liquidity(
    _amount: uint256,
    _min_amounts: uint256[N_COINS],
    _use_underlying: bool = False,
) -> uint256[N_COINS]:
    """
    @notice Withdraw 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
    @param _use_underlying If True, withdraw underlying assets instead of aTokens
    @return List of amounts of coins that were withdrawn
    """
    if not self.is_killed:
        self._claim_rewards()
    amounts: uint256[N_COINS] = self._balances()
    lp_token: address = self.lp_token
    total_supply: uint256 = ERC20(lp_token).totalSupply()
    CurveToken(lp_token).burnFrom(msg.sender, _amount)  # dev: insufficient funds

    for i in range(N_COINS):
        value: uint256 = amounts[i] * _amount / total_supply
        assert value >= _min_amounts[i], "Withdrawal resulted in fewer coins than expected"
        amounts[i] = value
        if _use_underlying:
            LendingPool(AAVE_LENDING_POOL).withdraw(self.underlying_coins[i], value, msg.sender)
        else:
            assert ERC20(self.coins[i]).transfer(msg.sender, value)

    log RemoveLiquidity(msg.sender, amounts, empty(uint256[N_COINS]), total_supply - _amount)

    return amounts


@external
@nonreentrant('lock')
def remove_liquidity_imbalance(
    _amounts: uint256[N_COINS],
    _max_burn_amount: uint256,
    _use_underlying: bool = False
) -> 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
    @param _use_underlying If True, withdraw underlying assets instead of aTokens
    @return Actual amount of the LP token burned in the withdrawal
    """
    assert not self.is_killed  # dev: is killed

    self._claim_rewards()
    amp: uint256 = self._A()
    old_balances: uint256[N_COINS] = self._balances()
    D0: uint256 = self.get_D_precisions(old_balances, amp)
    new_balances: uint256[N_COINS] = old_balances
    for i in range(N_COINS):
        new_balances[i] -= _amounts[i]
    D1: uint256 = self.get_D_precisions(new_balances, amp)
    ys: uint256 = (D0 + D1) / N_COINS

    lp_token: address = self.lp_token
    token_supply: uint256 = ERC20(lp_token).totalSupply()
    assert token_supply != 0  # dev: zero total supply

    _fee: uint256 = self.fee * N_COINS / (4 * (N_COINS - 1))
    _feemul: uint256 = self.offpeg_fee_multiplier
    _admin_fee: uint256 = self.admin_fee
    fees: uint256[N_COINS] = empty(uint256[N_COINS])
    for i in range(N_COINS):
        ideal_balance: uint256 = D1 * old_balances[i] / D0
        new_balance: uint256 = new_balances[i]
        difference: uint256 = 0
        if ideal_balance > new_balance:
            difference = ideal_balance - new_balance
        else:
            difference = new_balance - ideal_balance
        xs: uint256 = new_balance + old_balances[i]
        fees[i] = self._dynamic_fee(xs, ys, _fee, _feemul) * difference / FEE_DENOMINATOR
        if _admin_fee != 0:
            self.admin_balances[i] += fees[i] * _admin_fee / FEE_DENOMINATOR
        new_balances[i] -= fees[i]
    D2: uint256 = self.get_D_precisions(new_balances, amp)

    token_amount: uint256 = (D0 - D2) * token_supply / D0
    assert token_amount != 0  # dev: zero tokens burned
    assert token_amount <= _max_burn_amount, "Slippage screwed you"

    CurveToken(lp_token).burnFrom(msg.sender, token_amount)  # dev: insufficient funds

    for i in range(N_COINS):
        amount: uint256 = _amounts[i]
        if amount != 0:
            if _use_underlying:
                LendingPool(AAVE_LENDING_POOL).withdraw(self.underlying_coins[i], amount, msg.sender)
            else:
                assert ERC20(self.coins[i]).transfer(msg.sender, amount)

    log RemoveLiquidityImbalance(msg.sender, _amounts, fees, D1, token_supply - token_amount)

    return token_amount


@pure
@internal
def get_y_D(A_: uint256, i: int128, xp: uint256[N_COINS], D: uint256) -> uint256:
    """
    Calculate x[i] if one reduces D from being calculated for xp to D

    Done by solving quadratic equation iteratively.
    x_1**2 + x1 * (sum' - (A*n**n - 1) * D / (A * n**n)) = D ** (n + 1) / (n ** (2 * n) * prod' * A)
    x_1**2 + b*x_1 = c

    x_1 = (x_1**2 + c) / (2*x_1 + b)
    """
    # x in the input is converted to the same price/precision

    assert i >= 0       # dev: i below zero
    assert i < N_COINS  # dev: i above N_COINS

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

    for _i in range(N_COINS):
        if _i != i:
            _x = xp[_i]
        else:
            continue
        S_ += _x
        c = c * D / (_x * N_COINS)
    c = c * D * A_PRECISION / (Ann * N_COINS)
    b: uint256 = S_ + D * A_PRECISION / Ann
    y: uint256 = D

    for _i in range(255):
        y_prev = y
        y = (y*y + c) / (2 * y + b - D)
        # Equality with the precision of 1
        if y > y_prev:
            if y - y_prev <= 1:
                return y
        else:
            if y_prev - y <= 1:
                return y
    raise


@view
@internal
def _calc_withdraw_one_coin(_token_amount: uint256, i: int128) -> uint256:
    # First, need to calculate
    # * Get current D
    # * Solve Eqn against y_i for D - _token_amount
    amp: uint256 = self._A()
    xp: uint256[N_COINS] = self._balances()
    precisions: uint256[N_COINS] = PRECISION_MUL

    for j in range(N_COINS):
        xp[j] *= precisions[j]

    D0: uint256 = self.get_D(xp, amp)
    D1: uint256 = D0 - _token_amount * D0 / ERC20(self.lp_token).totalSupply()
    new_y: uint256 = self.get_y_D(amp, i, xp, D1)

    xp_reduced: uint256[N_COINS] = xp
    ys: uint256 = (D0 + D1) / (2 * N_COINS)

    _fee: uint256 = self.fee * N_COINS / (4 * (N_COINS - 1))
    feemul: uint256 = self.offpeg_fee_multiplier
    for j in range(N_COINS):
        dx_expected: uint256 = 0
        xavg: uint256 = 0
        if j == i:
            dx_expected = xp[j] * D1 / D0 - new_y
            xavg = (xp[j] + new_y) / 2
        else:
            dx_expected = xp[j] - xp[j] * D1 / D0
            xavg = xp[j]
        xp_reduced[j] -= self._dynamic_fee(xavg, ys, _fee, feemul) * dx_expected / FEE_DENOMINATOR

    dy: uint256 = xp_reduced[i] - self.get_y_D(amp, i, xp_reduced, D1)

    return (dy - 1) / precisions[i]


@view
@external
def calc_withdraw_one_coin(_token_amount: uint256, i: int128) -> uint256:
    """
    @notice Calculate the amount received when withdrawing a single coin
    @dev Result is the same for underlying or wrapped asset withdrawals
    @param _token_amount Amount of LP tokens to burn in the withdrawal
    @param i Index value of the coin to withdraw
    @return Amount of coin received
    """
    return self._calc_withdraw_one_coin(_token_amount, i)


@external
@nonreentrant('lock')
def remove_liquidity_one_coin(
    _token_amount: uint256,
    i: int128,
    _min_amount: uint256,
    _use_underlying: bool = False
) -> uint256:
    """
    @notice Withdraw 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 coin to receive
    @param _use_underlying If True, withdraw underlying assets instead of aTokens
    @return Amount of coin received
    """
    assert not self.is_killed  # dev: is killed

    self._claim_rewards()
    dy: uint256 = self._calc_withdraw_one_coin(_token_amount, i)
    assert dy >= _min_amount, "Not enough coins removed"

    CurveToken(self.lp_token).burnFrom(msg.sender, _token_amount)  # dev: insufficient funds

    if _use_underlying:
        LendingPool(AAVE_LENDING_POOL).withdraw(self.underlying_coins[i], dy, msg.sender)
    else:
        assert ERC20(self.coins[i]).transfer(msg.sender, dy)

    log RemoveLiquidityOne(msg.sender, _token_amount, dy)

    return dy


### Admin functions ###

@external
def ramp_A(_future_A: uint256, _future_time: uint256):
    assert msg.sender == self.owner  # dev: only owner
    assert block.timestamp >= self.initial_A_time + MIN_RAMP_TIME
    assert _future_time >= block.timestamp + MIN_RAMP_TIME  # dev: insufficient time

    _initial_A: uint256 = self._A()
    _future_A_p: uint256 = _future_A * A_PRECISION

    assert _future_A > 0 and _future_A < MAX_A
    if _future_A_p < _initial_A:
        assert _future_A_p * MAX_A_CHANGE >= _initial_A
    else:
        assert _future_A_p <= _initial_A * MAX_A_CHANGE

    self.initial_A = _initial_A
    self.future_A = _future_A_p
    self.initial_A_time = block.timestamp
    self.future_A_time = _future_time

    log RampA(_initial_A, _future_A_p, block.timestamp, _future_time)


@external
def stop_ramp_A():
    assert msg.sender == self.owner  # dev: only owner

    current_A: uint256 = self._A()
    self.initial_A = current_A
    self.future_A = current_A
    self.initial_A_time = block.timestamp
    self.future_A_time = block.timestamp
    # now (block.timestamp < t1) is always False, so we return saved A

    log StopRampA(current_A, block.timestamp)


@external
def commit_new_fee(new_fee: uint256, new_admin_fee: uint256, new_offpeg_fee_multiplier: uint256):
    assert msg.sender == self.owner  # dev: only owner
    assert self.admin_actions_deadline == 0  # dev: active action
    assert new_fee <= MAX_FEE  # dev: fee exceeds maximum
    assert new_admin_fee <= MAX_ADMIN_FEE  # dev: admin fee exceeds maximum
    assert new_offpeg_fee_multiplier * new_fee <= MAX_FEE * FEE_DENOMINATOR  # dev: offpeg multiplier exceeds maximum

    _deadline: uint256 = block.timestamp + ADMIN_ACTIONS_DELAY
    self.admin_actions_deadline = _deadline
    self.future_fee = new_fee
    self.future_admin_fee = new_admin_fee
    self.future_offpeg_fee_multiplier = new_offpeg_fee_multiplier

    log CommitNewFee(_deadline, new_fee, new_admin_fee, new_offpeg_fee_multiplier)


@external
def apply_new_fee():
    assert msg.sender == self.owner  # dev: only owner
    assert block.timestamp >= self.admin_actions_deadline  # dev: insufficient time
    assert self.admin_actions_deadline != 0  # dev: no active action

    self.admin_actions_deadline = 0
    _fee: uint256 = self.future_fee
    _admin_fee: uint256 = self.future_admin_fee
    _fml: uint256 = self.future_offpeg_fee_multiplier
    self.fee = _fee
    self.admin_fee = _admin_fee
    self.offpeg_fee_multiplier = _fml

    log NewFee(_fee, _admin_fee, _fml)


@external
def revert_new_parameters():
    assert msg.sender == self.owner  # dev: only owner

    self.admin_actions_deadline = 0


@external
def commit_transfer_ownership(_owner: address):
    assert msg.sender == self.owner  # dev: only owner
    assert self.transfer_ownership_deadline == 0  # dev: active transfer

    _deadline: uint256 = block.timestamp + ADMIN_ACTIONS_DELAY
    self.transfer_ownership_deadline = _deadline
    self.future_owner = _owner

    log CommitNewAdmin(_deadline, _owner)


@external
def apply_transfer_ownership():
    assert msg.sender == self.owner  # dev: only owner
    assert block.timestamp >= self.transfer_ownership_deadline  # dev: insufficient time
    assert self.transfer_ownership_deadline != 0  # dev: no active transfer

    self.transfer_ownership_deadline = 0
    _owner: address = self.future_owner
    self.owner = _owner

    log NewAdmin(_owner)


@external
def revert_transfer_ownership():
    assert msg.sender == self.owner  # dev: only owner

    self.transfer_ownership_deadline = 0


@external
def withdraw_admin_fees():
    assert msg.sender == self.owner  # dev: only owner

    for i in range(N_COINS):
        value: uint256 = self.admin_balances[i]
        if value != 0:
            assert ERC20(self.coins[i]).transfer(self.admin_fee_receiver, value)
            self.admin_balances[i] = 0


@external
def donate_admin_fees():
    """
    Just in case admin balances somehow become higher than total (rounding error?)
    this can be used to fix the state, too
    """
    assert msg.sender == self.owner  # dev: only owner
    self.admin_balances = empty(uint256[N_COINS])


@external
def kill_me():
    assert msg.sender == self.owner  # dev: only owner
    assert self.kill_deadline > block.timestamp  # dev: deadline has passed
    self.is_killed = True


@external
def unkill_me():
    assert msg.sender == self.owner  # dev: only owner
    self.is_killed = False


@external
def set_aave_referral(referral_code: uint256):
    assert msg.sender == self.owner  # dev: only owner
    assert referral_code < 2 ** 16  # dev: uint16 overflow
    self.aave_referral = referral_code


@external
def set_reward_receiver(_reward_receiver: address):
    assert msg.sender == self.owner
    self.reward_receiver = _reward_receiver


@external
def set_admin_fee_receiver(_admin_fee_receiver: address):
    assert msg.sender == self.owner
    self.admin_fee_receiver = _admin_fee_receiver

Contract Security Audit

Contract ABI

[{"name":"TokenExchange","inputs":[{"name":"buyer","type":"address","indexed":true},{"name":"sold_id","type":"int128","indexed":false},{"name":"tokens_sold","type":"uint256","indexed":false},{"name":"bought_id","type":"int128","indexed":false},{"name":"tokens_bought","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"TokenExchangeUnderlying","inputs":[{"name":"buyer","type":"address","indexed":true},{"name":"sold_id","type":"int128","indexed":false},{"name":"tokens_sold","type":"uint256","indexed":false},{"name":"bought_id","type":"int128","indexed":false},{"name":"tokens_bought","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"AddLiquidity","inputs":[{"name":"provider","type":"address","indexed":true},{"name":"token_amounts","type":"uint256[3]","indexed":false},{"name":"fees","type":"uint256[3]","indexed":false},{"name":"invariant","type":"uint256","indexed":false},{"name":"token_supply","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"RemoveLiquidity","inputs":[{"name":"provider","type":"address","indexed":true},{"name":"token_amounts","type":"uint256[3]","indexed":false},{"name":"fees","type":"uint256[3]","indexed":false},{"name":"token_supply","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"RemoveLiquidityOne","inputs":[{"name":"provider","type":"address","indexed":true},{"name":"token_amount","type":"uint256","indexed":false},{"name":"coin_amount","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"RemoveLiquidityImbalance","inputs":[{"name":"provider","type":"address","indexed":true},{"name":"token_amounts","type":"uint256[3]","indexed":false},{"name":"fees","type":"uint256[3]","indexed":false},{"name":"invariant","type":"uint256","indexed":false},{"name":"token_supply","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"CommitNewAdmin","inputs":[{"name":"deadline","type":"uint256","indexed":true},{"name":"admin","type":"address","indexed":true}],"anonymous":false,"type":"event"},{"name":"NewAdmin","inputs":[{"name":"admin","type":"address","indexed":true}],"anonymous":false,"type":"event"},{"name":"CommitNewFee","inputs":[{"name":"deadline","type":"uint256","indexed":true},{"name":"fee","type":"uint256","indexed":false},{"name":"admin_fee","type":"uint256","indexed":false},{"name":"offpeg_fee_multiplier","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"NewFee","inputs":[{"name":"fee","type":"uint256","indexed":false},{"name":"admin_fee","type":"uint256","indexed":false},{"name":"offpeg_fee_multiplier","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"RampA","inputs":[{"name":"old_A","type":"uint256","indexed":false},{"name":"new_A","type":"uint256","indexed":false},{"name":"initial_time","type":"uint256","indexed":false},{"name":"future_time","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"StopRampA","inputs":[{"name":"A","type":"uint256","indexed":false},{"name":"t","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"_coins","type":"address[3]"},{"name":"_underlying_coins","type":"address[3]"},{"name":"_pool_token","type":"address"},{"name":"_A","type":"uint256"},{"name":"_fee","type":"uint256"},{"name":"_admin_fee","type":"uint256"},{"name":"_offpeg_fee_multiplier","type":"uint256"}],"outputs":[]},{"stateMutability":"view","type":"function","name":"A","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":10374},{"stateMutability":"view","type":"function","name":"A_precise","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":10336},{"stateMutability":"view","type":"function","name":"dynamic_fee","inputs":[{"name":"i","type":"int128"},{"name":"j","type":"int128"}],"outputs":[{"name":"","type":"uint256"}],"gas":22113},{"stateMutability":"view","type":"function","name":"balances","inputs":[{"name":"i","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":7358},{"stateMutability":"view","type":"function","name":"get_virtual_price","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":2702067},{"stateMutability":"view","type":"function","name":"calc_token_amount","inputs":[{"name":"_amounts","type":"uint256[3]"},{"name":"is_deposit","type":"bool"}],"outputs":[{"name":"","type":"uint256"}],"gas":5368162},{"stateMutability":"nonpayable","type":"function","name":"add_liquidity","inputs":[{"name":"_amounts","type":"uint256[3]"},{"name":"_min_mint_amount","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"add_liquidity","inputs":[{"name":"_amounts","type":"uint256[3]"},{"name":"_min_mint_amount","type":"uint256"},{"name":"_use_underlying","type":"bool"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"get_dy","inputs":[{"name":"i","type":"int128"},{"name":"j","type":"int128"},{"name":"dx","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":6289374},{"stateMutability":"view","type":"function","name":"get_dy_underlying","inputs":[{"name":"i","type":"int128"},{"name":"j","type":"int128"},{"name":"dx","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":6289404},{"stateMutability":"nonpayable","type":"function","name":"exchange","inputs":[{"name":"i","type":"int128"},{"name":"j","type":"int128"},{"name":"dx","type":"uint256"},{"name":"min_dy","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":6465508},{"stateMutability":"nonpayable","type":"function","name":"exchange_underlying","inputs":[{"name":"i","type":"int128"},{"name":"j","type":"int128"},{"name":"dx","type":"uint256"},{"name":"min_dy","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":6484358},{"stateMutability":"nonpayable","type":"function","name":"remove_liquidity","inputs":[{"name":"_amount","type":"uint256"},{"name":"_min_amounts","type":"uint256[3]"}],"outputs":[{"name":"","type":"uint256[3]"}]},{"stateMutability":"nonpayable","type":"function","name":"remove_liquidity","inputs":[{"name":"_amount","type":"uint256"},{"name":"_min_amounts","type":"uint256[3]"},{"name":"_use_underlying","type":"bool"}],"outputs":[{"name":"","type":"uint256[3]"}]},{"stateMutability":"nonpayable","type":"function","name":"remove_liquidity_imbalance","inputs":[{"name":"_amounts","type":"uint256[3]"},{"name":"_max_burn_amount","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"remove_liquidity_imbalance","inputs":[{"name":"_amounts","type":"uint256[3]"},{"name":"_max_burn_amount","type":"uint256"},{"name":"_use_underlying","type":"bool"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"calc_withdraw_one_coin","inputs":[{"name":"_token_amount","type":"uint256"},{"name":"i","type":"int128"}],"outputs":[{"name":"","type":"uint256"}],"gas":4491030},{"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"}]},{"stateMutability":"nonpayable","type":"function","name":"remove_liquidity_one_coin","inputs":[{"name":"_token_amount","type":"uint256"},{"name":"i","type":"int128"},{"name":"_min_amount","type":"uint256"},{"name":"_use_underlying","type":"bool"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"ramp_A","inputs":[{"name":"_future_A","type":"uint256"},{"name":"_future_time","type":"uint256"}],"outputs":[],"gas":159459},{"stateMutability":"nonpayable","type":"function","name":"stop_ramp_A","inputs":[],"outputs":[],"gas":154920},{"stateMutability":"nonpayable","type":"function","name":"commit_new_fee","inputs":[{"name":"new_fee","type":"uint256"},{"name":"new_admin_fee","type":"uint256"},{"name":"new_offpeg_fee_multiplier","type":"uint256"}],"outputs":[],"gas":148809},{"stateMutability":"nonpayable","type":"function","name":"apply_new_fee","inputs":[],"outputs":[],"gas":141271},{"stateMutability":"nonpayable","type":"function","name":"revert_new_parameters","inputs":[],"outputs":[],"gas":23012},{"stateMutability":"nonpayable","type":"function","name":"commit_transfer_ownership","inputs":[{"name":"_owner","type":"address"}],"outputs":[],"gas":77050},{"stateMutability":"nonpayable","type":"function","name":"apply_transfer_ownership","inputs":[],"outputs":[],"gas":65727},{"stateMutability":"nonpayable","type":"function","name":"revert_transfer_ownership","inputs":[],"outputs":[],"gas":23102},{"stateMutability":"nonpayable","type":"function","name":"withdraw_admin_fees","inputs":[],"outputs":[],"gas":90981},{"stateMutability":"nonpayable","type":"function","name":"donate_admin_fees","inputs":[],"outputs":[],"gas":63303},{"stateMutability":"nonpayable","type":"function","name":"kill_me","inputs":[],"outputs":[],"gas":40385},{"stateMutability":"nonpayable","type":"function","name":"unkill_me","inputs":[],"outputs":[],"gas":23222},{"stateMutability":"nonpayable","type":"function","name":"set_aave_referral","inputs":[{"name":"referral_code","type":"uint256"}],"outputs":[],"gas":38352},{"stateMutability":"nonpayable","type":"function","name":"set_reward_receiver","inputs":[{"name":"_reward_receiver","type":"address"}],"outputs":[],"gas":38385},{"stateMutability":"nonpayable","type":"function","name":"set_admin_fee_receiver","inputs":[{"name":"_admin_fee_receiver","type":"address"}],"outputs":[],"gas":38415},{"stateMutability":"view","type":"function","name":"coins","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"address"}],"gas":3397},{"stateMutability":"view","type":"function","name":"underlying_coins","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"address"}],"gas":3427},{"stateMutability":"view","type":"function","name":"admin_balances","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":3457},{"stateMutability":"view","type":"function","name":"fee","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3378},{"stateMutability":"view","type":"function","name":"offpeg_fee_multiplier","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3408},{"stateMutability":"view","type":"function","name":"admin_fee","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3438},{"stateMutability":"view","type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3468},{"stateMutability":"view","type":"function","name":"lp_token","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3498},{"stateMutability":"view","type":"function","name":"initial_A","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3528},{"stateMutability":"view","type":"function","name":"future_A","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3558},{"stateMutability":"view","type":"function","name":"initial_A_time","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3588},{"stateMutability":"view","type":"function","name":"future_A_time","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3618},{"stateMutability":"view","type":"function","name":"admin_actions_deadline","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3648},{"stateMutability":"view","type":"function","name":"transfer_ownership_deadline","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3678},{"stateMutability":"view","type":"function","name":"future_fee","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3708},{"stateMutability":"view","type":"function","name":"future_admin_fee","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3738},{"stateMutability":"view","type":"function","name":"future_offpeg_fee_multiplier","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3768},{"stateMutability":"view","type":"function","name":"future_owner","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3798},{"stateMutability":"view","type":"function","name":"reward_receiver","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3828},{"stateMutability":"view","type":"function","name":"admin_fee_receiver","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3858}]

610160615b9d610140396020615b9d60c03960c05160a01c1561002157600080fd5b60206020615b9d0160c03960c05160a01c1561003c57600080fd5b60206040615b9d0160c03960c05160a01c1561005757600080fd5b60206060615b9d0160c03960c05160a01c1561007257600080fd5b60206080615b9d0160c03960c05160a01c1561008d57600080fd5b602060a0615b9d0160c03960c05160a01c156100a857600080fd5b602060c0615b9d0160c03960c05160a01c156100c357600080fd5b6102a060006003818352015b60006101406102a051600381106100e557600080fd5b6020020151186100f457600080fd5b60006101a06102a0516003811061010a57600080fd5b60200201511861011957600080fd5b81516001018083528114156100cf575b5050600060c052602060c02061014051815561016051600182015561018051600282015550600160c052602060c0206101a05181556101c05160018201556101e051600282015550610220516064808202821582848304141761018b57600080fd5b80905090509050600a5561022051606480820282158284830414176101af57600080fd5b80905090509050600b55610240516003556102605160055561028051600455336006553360175542624f1a008181830110156101ea57600080fd5b80820190509050601555610200516007556102c060006003818352015b60206102c051026101a001516102a05260006004610340527f095ea7b300000000000000000000000000000000000000000000000000000000610360526103406004806020846103a001018260208501600060045af1505080518201915050738dff5e27ea6b7ac08ebfdf9eb090f32ee9a30fcf6020826103a00101526020810190507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6020826103a0010152602081019050806103a0526103a090508051602001806104408284600060045af16102de57600080fd5b505060206105006104405161046060006102a0515af16102fd57600080fd5b60203d8082111561030e5780610310565b815b905090506104e0526104e08051602001806102e08284600060045af161033557600080fd5b505060006102e0511815610387576102e080602001516000825180602090131561035e57600080fd5b809190121561036c57600080fd5b806020036101000a8204905090509050151561038757600080fd5b8151600101808352811415610207575b5050615b8556600436101561000d57613519565b600035601c52600051341561002157600080fd5b63f446c1d0811415610050576006580161351f565b610140526101405160648082049050905060005260206000f35b6376a2f0f0811415610076576006580161351f565b610140526101405160005260206000f35b6376a9cd3e8114156102c0576004358080600081121561009257195b607f1c1561009f57600080fd5b905050602435808060008112156100b257195b607f1c156100bf57600080fd5b90505060016101405264e8d4a510006101605264e8d4a5100061018052602061024060246370a082316101c052306101e0526101dc6004356003811061010457600080fd5b600060c052602060c02001545afa61011b57600080fd5b601f3d1161012857600080fd5b600050610240516004356003811061013f57600080fd5b600260c052602060c02001548082101561015857600080fd5b808203905090506101406004356003811061017257600080fd5b6020020151808202821582848304141761018b57600080fd5b809050905090506101a052602061026060246370a082316101e05230610200526101fc602435600381106101be57600080fd5b600060c052602060c02001545afa6101d557600080fd5b601f3d116101e257600080fd5b60005061026051602435600381106101f957600080fd5b600260c052602060c02001548082101561021257600080fd5b808203905090506101406024356003811061022c57600080fd5b6020020151808202821582848304141761024557600080fd5b809050905090506101c0526101405161016051610180516101a0516101c0516101a0516101e0526101c0516102005260035461022052600454610240526102405161022051610200516101e051600658016136b7565b6102a0526101c0526101a0526101805261016052610140526102a05160005260206000f35b634903b0d18114156103585760206101c060246370a0823161014052306101605261015c600435600381106102f457600080fd5b600060c052602060c02001545afa61030b57600080fd5b601f3d1161031857600080fd5b6000506101c0516004356003811061032f57600080fd5b600260c052602060c02001548082101561034857600080fd5b8082039050905060005260206000f35b63bb7b8b808114156104f6576101405160065801613825565b61016052610180526101a0526101405261016080516101c05280602001516101e052806040015161020052506101405161016051610180516101a0516101c0516101e051610200516006580161351f565b61022052610200526101e0526101c0526101a05261018052610160526101405261022051610240526101405161016051610180516101a0516101c0516101e0516102005161022051610240516101c051610260526101e05161028052610200516102a052610240516102c0526102c0516102a051610280516102605160065801613c43565b610320526102405261022052610200526101e0526101c0526101a052610180526101605261014052610320516101405260206101e060046318160ddd6101805261019c6007545afa61049857600080fd5b601f3d116104a557600080fd5b6000506101e0516101605261014051670de0b6b3a764000080820282158284830414176104d157600080fd5b809050905090506101605180806104e757600080fd5b82049050905060005260206000f35b633883e1198114156108005760643560011c1561051257600080fd5b61014051610160516101805160065801613825565b6101a0526101c0526101e0526101805261016052610140526101a0805161014052806020015161016052806040015161018052506101405161016051610180516101a0516006580161351f565b6101c0526101a0526101805261016052610140526101c0516101a0526101405161016051610180516101a0516101c051610140516101e052610160516102005261018051610220526101a051610240526102405161022051610200516101e05160065801613c43565b6102a0526101c0526101a0526101805261016052610140526102a0516101c0526101e060006003818352015b60643515610661576101406101e0516003811061062557600080fd5b60200201805160046101e0516003811061063e57600080fd5b602002013581818301101561065257600080fd5b808201905090508152506106ab565b6101406101e0516003811061067557600080fd5b60200201805160046101e0516003811061068e57600080fd5b6020020135808210156106a057600080fd5b808203905090508152505b8151600101808352811415610609575b50506101405161016051610180516101a0516101c0516101e0516101405161020052610160516102205261018051610240526101a051610260526102605161024051610220516102005160065801613c43565b6102c0526101e0526101c0526101a0526101805261016052610140526102c0516101e052602061028060046318160ddd6102205261023c6007545afa61075357600080fd5b601f3d1161076057600080fd5b60005061028051610200526000610220526064351561079e576101e0516101c0518082101561078e57600080fd5b80820390509050610220526107bf565b6101c0516101e051808210156107b357600080fd5b80820390509050610220525b610220516102005180820282158284830414176107db57600080fd5b809050905090506101c05180806107f157600080fd5b82049050905060005260206000f35b634515cef381141561081757600061014052610848565b632b6e993a8114156108435760843560011c1561083357600080fd5b6020608461014037600050610848565b611401565b6018541561085557600080fd5b60016018556014541561086757600080fd5b6101405160065801613d6e565b6101405260005061014051610160516006580161351f565b61018052610160526101405261018051610160526101405161016051610180516101a0516101c05160065801613825565b6101e05261020052610220526101c0526101a0526101805261016052610140526101e080516101805280602001516101a05280604001516101c052506007546101e052602061028060046318160ddd6102205261023c6101e0515afa61092257600080fd5b601f3d1161092f57600080fd5b600050610280516102005260006102205260006102005118156109d2576101405161016051610180516101a0516101c0516101e051610200516102205161018051610240526101a051610260526101c05161028052610160516102a0526102a05161028051610260516102405160065801613c43565b6103005261022052610200526101e0526101c0526101a05261018052610160526101405261030051610220525b61018051610240526101a051610260526101c051610280526102a060006003818352015b610200511515610a2457600060046102a05160038110610a1557600080fd5b602002013518610a2457600080fd5b6102406102a05160038110610a3857600080fd5b60200201805160046102a05160038110610a5157600080fd5b6020020135818183011015610a6557600080fd5b808201905090508152505b81516001018083528114156109f6575b50506101405161016051610180516101a0516101c0516101e05161020051610220516102405161026051610280516102a051610240516102c052610260516102e0526102805161030052610160516103205261032051610300516102e0516102c05160065801613c43565b610380526102a05261028052610260526102405261022052610200526101e0526101c0526101a052610180526101605261014052610380516102a052610220516102a05111610b3957600080fd5b6080366102c0376000610200511815610f7157610220516102a051818183011015610b6357600080fd5b808201905090506003808204905090506103405260035460038082028215828483041417610b9057600080fd5b8090509050905060088082049050905061036052600454610380526005546103a05260006103c0526103e060006003818352015b6102a0516101806103e05160038110610bdc57600080fd5b60200201518082028215828483041417610bf557600080fd5b80905090509050610220518080610c0b57600080fd5b820490509050610400526102406103e05160038110610c2957600080fd5b60200201516104205261042051610400511115610c6557610400516104205180821015610c5557600080fd5b808203905090506103c052610c86565b610420516104005180821015610c7a57600080fd5b808203905090506103c0525b6101806103e05160038110610c9a57600080fd5b602002015161042051818183011015610cb257600080fd5b8082019050905061044052610140610460525b61046051516020610460510161046052610460610460511015610ce757610cc5565b6104405161048052610340516104a052610360516104c052610380516104e0526104e0516104c0516104a05161048051600658016136b7565b61054052610440610460525b6104605152602061046051036104605261014061046051101515610d4f57610d2c565b610540516103c0518082028215828483041417610d6b57600080fd5b809050905090506402540be400808204905090506102c06103e05160038110610d9357600080fd5b602002015260006103a0511815610e21576103e05160038110610db557600080fd5b600260c052602060c0200180546102c06103e05160038110610dd657600080fd5b60200201516103a0518082028215828483041417610df357600080fd5b809050905090506402540be40080820490509050818183011015610e1657600080fd5b808201905090508155505b610420516102c06103e05160038110610e3957600080fd5b602002015180821015610e4b57600080fd5b808203905090506102406103e05160038110610e6657600080fd5b60200201525b8151600101808352811415610bc4575b5050610140610400525b61040051516020610400510161040052610400610400511015610ea857610e86565b61024051610420526102605161044052610280516104605261016051610480526104805161046051610440516104205160065801613c43565b6104e0526103e0610400525b6104005152602061040051036104005261014061040051101515610f1057610eed565b6104e0516103e052610200516103e0516102205180821015610f3157600080fd5b808203905090508082028215828483041417610f4c57600080fd5b80905090509050610220518080610f6257600080fd5b82049050905061032052610f7a565b6102a051610320525b6064356103205110151515610fce576308c379a0610340526020610360526014610380527f536c697070616765207363726577656420796f750000000000000000000000006103a05261038050606461035cfd5b6101405115611284576009546103405261036060006003818352015b60046103605160038110610ffd57600080fd5b602002013561038052600061038051181561126d57610360516003811061102357600080fd5b600160c052602060c02001546103a05260006004610420527f23b872dd000000000000000000000000000000000000000000000000000000006104405261042060048060208461048001018260208501600060045af1505080518201915050336020826104800101526020810190503060208261048001015260208101905061038051602082610480010152602081019050806104805261048090508051602001806105408284600060045af16110d957600080fd5b505060206106206105405161056060006103a0515af16110f857600080fd5b60203d80821115611109578061110b565b815b90509050610600526106008051602001806103c08284600060045af161113057600080fd5b505060006103c0511815611182576103c080602001516000825180602090131561115957600080fd5b809190121561116757600080fd5b806020036101000a8204905090509050151561118257600080fd5b60006004610420527fe8eda9df000000000000000000000000000000000000000000000000000000006104405261042060048060208461048001018260208501600060045af15050805182019150506103a051602082610480010152602081019050610380516020826104800101526020810190503060208261048001015260208101905061034051602082610480010152602081019050806104805261048090508051602001806105608284600060045af161123e57600080fd5b505060006000610560516105806000738dff5e27ea6b7ac08ebfdf9eb090f32ee9a30fcf5af161126d57600080fd5b8151600101808352811415610fea575b5050611337565b61034060006003818352015b600461034051600381106112a357600080fd5b602002013561036052600061036051181561132457602061044060646323b872dd61038052336103a052306103c052610360516103e05261039c600061034051600381106112f057600080fd5b600060c052602060c02001545af161130757600080fd5b601f3d1161131457600080fd5b6000506104405161132457600080fd5b8151600101808352811415611290575b50505b60206103e060446340c10f19610340523361036052610320516103805261035c60006101e0515af161136857600080fd5b601f3d1161137557600080fd5b6000506103e05060606004610340376102c0516103a0526102e0516103c052610300516103e0526102a0516104005261020051610320518181830110156113bb57600080fd5b8082019050905061042052337f423f6495a08fc652425cf4ed0d1f9e37e571d9b9529b1c1c23cce780b2e7df0d610100610340a261032051600052600060185560206000f35b635e0d443f811415611488576004358080600081121561141d57195b607f1c1561142a57600080fd5b9050506024358080600081121561143d57195b607f1c1561144a57600080fd5b9050506004356101405260243561016052604435610180526101805161016051610140516006580161445d565b6101e0526101e05160005260206000f35b6307211ef781141561150f57600435808060008112156114a457195b607f1c156114b157600080fd5b905050602435808060008112156114c457195b607f1c156114d157600080fd5b9050506004356101405260243561016052604435610180526101805161016051610140516006580161445d565b6101e0526101e05160005260206000f35b633df0212481141561174b576018541561152857600080fd5b60016018556004358080600081121561153d57195b607f1c1561154a57600080fd5b9050506024358080600081121561155d57195b607f1c1561156a57600080fd5b9050506101405160043561016052602435610180526044356101a0526101a05161018051610160516006580161485e565b610200526101405261020051610140526064356101405110151515611624576308c379a061016052602061018052602e6101a0527f45786368616e676520726573756c74656420696e20666577657220636f696e736101c0527f207468616e2065787065637465640000000000000000000000000000000000006101e0526101a050608461017cfd5b602061022060646323b872dd610160523361018052306101a0526044356101c05261017c60006004356003811061165a57600080fd5b600060c052602060c02001545af161167157600080fd5b601f3d1161167e57600080fd5b6000506102205161168e57600080fd5b6020610200604463a9059cbb610160523361018052610140516101a05261017c6000602435600381106116c057600080fd5b600060c052602060c02001545af16116d757600080fd5b601f3d116116e457600080fd5b600050610200516116f457600080fd5b60043561016052604435610180526024356101a052610140516101c052337f8b3e96f2b889fa771c53c981b40daf005f63f637f1869f707052d15a3dd971406080610160a261014051600052600060185560206000f35b63a6417ed6811415611b8e576018541561176457600080fd5b60016018556004358080600081121561177957195b607f1c1561178657600080fd5b9050506024358080600081121561179957195b607f1c156117a657600080fd5b9050506101405160043561016052602435610180526044356101a0526101a05161018051610160516006580161485e565b610200526101405261020051610140526064356101405110151515611860576308c379a061016052602061018052602e6101a0527f45786368616e676520726573756c74656420696e20666577657220636f696e736101c0527f207468616e2065787065637465640000000000000000000000000000000000006101e0526101a050608461017cfd5b6004356003811061187057600080fd5b600160c052602060c020015461016052600060046101e0527f23b872dd00000000000000000000000000000000000000000000000000000000610200526101e060048060208461024001018260208501600060045af15050805182019150503360208261024001015260208101905030602082610240010152602081019050604435602082610240010152602081019050806102405261024090508051602001806103008284600060045af161192557600080fd5b505060206103e0610300516103206000610160515af161194457600080fd5b60203d808211156119555780611957565b815b905090506103c0526103c08051602001806101808284600060045af161197c57600080fd5b505060006101805118156119ce576101808060200151600082518060209013156119a557600080fd5b80919012156119b357600080fd5b806020036101000a820490509050905015156119ce57600080fd5b600060046101e0527fe8eda9df00000000000000000000000000000000000000000000000000000000610200526101e060048060208461024001018260208501600060045af15050805182019150506101605160208261024001015260208101905060443560208261024001015260208101905030602082610240010152602081019050600954602082610240010152602081019050806102405261024090508051602001806103208284600060045af1611a8857600080fd5b505060006000610320516103406000738dff5e27ea6b7ac08ebfdf9eb090f32ee9a30fcf5af1611ab757600080fd5b738dff5e27ea6b7ac08ebfdf9eb090f32ee9a30fcf3b611ad657600080fd5b6000600060646369328dec6101e05260243560038110611af557600080fd5b600160c052602060c020015461020052610140516102205233610240526101fc6000738dff5e27ea6b7ac08ebfdf9eb090f32ee9a30fcf5af1611b3757600080fd5b6004356101e05260443561020052602435610220526101405161024052337fd013ca23e77a65003c2c659c5442c00c805371b7fc1ebd4c206c41d1536bd90b60806101e0a261014051600052600060185560206000f35b63ecb586a5811415611ba557600061014052611bd6565b63fce64736811415611bd15760843560011c15611bc157600080fd5b6020608461014037600050611bd6565b611f5d565b60185415611be357600080fd5b60016018556014541515611c06576101405160065801613d6e565b610140526000505b6101405161016051610180516101a05160065801613825565b6101c0526101e052610200526101a0526101805261016052610140526101c080516101605280602001516101805280604001516101a052506007546101c052602061026060046318160ddd6102005261021c6101c0515afa611c8057600080fd5b601f3d11611c8d57600080fd5b600050610260516101e05260206102a060446379cc67906102005233610220526004356102405261021c60006101c0515af1611cc857600080fd5b601f3d11611cd557600080fd5b6000506102a05061020060006003818352015b6101606102005160038110611cfc57600080fd5b60200201516004358082028215828483041417611d1857600080fd5b809050905090506101e0518080611d2e57600080fd5b8204905090506102205260246102005160038110611d4b57600080fd5b60200201356102205110151515611dc6576308c379a0610240526020610260526030610280527f5769746864726177616c20726573756c74656420696e20666577657220636f696102a0527f6e73207468616e206578706563746564000000000000000000000000000000006102c05261028050608461025cfd5b610220516101606102005160038110611dde57600080fd5b60200201526101405115611e7257738dff5e27ea6b7ac08ebfdf9eb090f32ee9a30fcf3b611e0b57600080fd5b6000600060646369328dec610240526102005160038110611e2b57600080fd5b600160c052602060c0200154610260526102205161028052336102a05261025c6000738dff5e27ea6b7ac08ebfdf9eb090f32ee9a30fcf5af1611e6d57600080fd5b611ed9565b60206102e0604463a9059cbb610240523361026052610220516102805261025c60006102005160038110611ea557600080fd5b600060c052602060c02001545af1611ebc57600080fd5b601f3d11611ec957600080fd5b6000506102e051611ed957600080fd5b8151600101808352811415611ce8575b5050610160516102005261018051610220526101a05161024052606036610260376101e05160043580821015611f1e57600080fd5b808203905090506102c052337fa49d4cf02656aebf8c771f5a8585638a2a15ee6c97cf7205d4208ed7c1df252d60e0610200a260006018556060610160f35b639fdaea0c811415611f7457600061014052611fa5565b635b8369f5811415611fa05760843560011c15611f9057600080fd5b6020608461014037600050611fa5565b6128c0565b60185415611fb257600080fd5b600160185560145415611fc457600080fd5b6101405160065801613d6e565b6101405260005061014051610160516006580161351f565b61018052610160526101405261018051610160526101405161016051610180516101a0516101c05160065801613825565b6101e05261020052610220526101c0526101a0526101805261016052610140526101e080516101805280602001516101a05280604001516101c052506101405161016051610180516101a0516101c0516101e05161018051610200526101a051610220526101c0516102405261016051610260526102605161024051610220516102005160065801613c43565b6102c0526101e0526101c0526101a0526101805261016052610140526102c0516101e05261018051610200526101a051610220526101c0516102405261026060006003818352015b610200610260516003811061210357600080fd5b6020020180516004610260516003811061211c57600080fd5b60200201358082101561212e57600080fd5b808203905090508152505b81516001018083528114156120ef575b50506101405161016051610180516101a0516101c0516101e051610200516102205161024051610260516102005161028052610220516102a052610240516102c052610160516102e0526102e0516102c0516102a0516102805160065801613c43565b61034052610260526102405261022052610200526101e0526101c0526101a05261018052610160526101405261034051610260526101e051610260518181830110156121f757600080fd5b80820190509050600380820490509050610280526007546102a052602061034060046318160ddd6102e0526102fc6102a0515afa61223457600080fd5b601f3d1161224157600080fd5b600050610340516102c05260006102c0511861225c57600080fd5b6003546003808202821582848304141761227557600080fd5b809050905090506008808204905090506102e0526004546103005260055461032052606036610340376103a060006003818352015b610260516101806103a051600381106122c257600080fd5b602002015180820282158284830414176122db57600080fd5b809050905090506101e05180806122f157600080fd5b8204905090506103c0526102006103a0516003811061230f57600080fd5b60200201516103e0526000610400526103e0516103c0511115612351576103c0516103e0518082101561234157600080fd5b8082039050905061040052612372565b6103e0516103c0518082101561236657600080fd5b80820390509050610400525b6103e0516101806103a0516003811061238a57600080fd5b602002015181818301101561239e57600080fd5b8082019050905061042052610140610440525b610440515160206104405101610440526104406104405110156123d3576123b1565b610420516104605261028051610480526102e0516104a052610300516104c0526104c0516104a0516104805161046051600658016136b7565b61052052610420610440525b610440515260206104405103610440526101406104405110151561243b57612418565b6105205161040051808202821582848304141761245757600080fd5b809050905090506402540be400808204905090506103406103a0516003811061247f57600080fd5b6020020152600061032051181561250d576103a051600381106124a157600080fd5b600260c052602060c0200180546103406103a051600381106124c257600080fd5b60200201516103205180820282158284830414176124df57600080fd5b809050905090506402540be4008082049050905081818301101561250257600080fd5b808201905090508155505b6102006103a0516003811061252157600080fd5b6020020180516103406103a0516003811061253b57600080fd5b60200201518082101561254d57600080fd5b808203905090508152505b81516001018083528114156122aa575b50506101406103c0525b6103c0515160206103c051016103c0526103c06103c051101561259457612572565b610200516103e0526102205161040052610240516104205261016051610440526104405161042051610400516103e05160065801613c43565b6104a0526103a06103c0525b6103c0515260206103c051036103c0526101406103c0511015156125fc576125d9565b6104a0516103a0526101e0516103a0518082101561261957600080fd5b808203905090506102c051808202821582848304141761263857600080fd5b809050905090506101e051808061264e57600080fd5b8204905090506103c05260006103c0511861266857600080fd5b6064356103c051111515156126bc576308c379a06103e0526020610400526014610420527f536c697070616765207363726577656420796f75000000000000000000000000610440526104205060646103fcfd5b602061048060446379cc67906103e05233610400526103c051610420526103fc60006102a0515af16126ed57600080fd5b601f3d116126fa57600080fd5b600050610480506103e060006003818352015b60046103e0516003811061272057600080fd5b602002013561040052600061040051181561282b5761014051156127c457738dff5e27ea6b7ac08ebfdf9eb090f32ee9a30fcf3b61275d57600080fd5b6000600060646369328dec610420526103e0516003811061277d57600080fd5b600160c052602060c0200154610440526104005161046052336104805261043c6000738dff5e27ea6b7ac08ebfdf9eb090f32ee9a30fcf5af16127bf57600080fd5b61282b565b60206104c0604463a9059cbb610420523361044052610400516104605261043c60006103e051600381106127f757600080fd5b600060c052602060c02001545af161280e57600080fd5b601f3d1161281b57600080fd5b6000506104c05161282b57600080fd5b815160010180835281141561270d575b5050606060046103e037610340516104405261036051610460526103805161048052610260516104a0526102c0516103c0518082101561287a57600080fd5b808203905090506104c052337f173599dbf9c6ca6f7c3b590df07ae98a45d74ff54065505141e7de6c46a624c26101006103e0a26103c051600052600060185560206000f35b63cc2b27d781141561291c57602435808060008112156128dc57195b607f1c156128e957600080fd5b90505060043561014052602435610160526101605161014051600658016150b5565b6101c0526101c05160005260206000f35b631a4d01d281141561293357600061014052612964565b63517a55a381141561295f5760643560011c1561294f57600080fd5b6020606461014037600050612964565b612bc6565b6018541561297157600080fd5b60016018556024358080600081121561298657195b607f1c1561299357600080fd5b905050601454156129a357600080fd5b6101405160065801613d6e565b610140526000506101405161016051600435610180526024356101a0526101a05161018051600658016150b5565b61020052610160526101405261020051610160526044356101605110151515612a46576308c379a06101805260206101a05260186101c0527f4e6f7420656e6f75676820636f696e732072656d6f76656400000000000000006101e0526101c050606461019cfd5b602061022060446379cc679061018052336101a0526004356101c05261019c60006007545af1612a7557600080fd5b601f3d11612a8257600080fd5b600050610220506101405115612b1757738dff5e27ea6b7ac08ebfdf9eb090f32ee9a30fcf3b612ab157600080fd5b6000600060646369328dec6101805260243560038110612ad057600080fd5b600160c052602060c02001546101a052610160516101c052336101e05261019c6000738dff5e27ea6b7ac08ebfdf9eb090f32ee9a30fcf5af1612b1257600080fd5b612b7d565b6020610220604463a9059cbb61018052336101a052610160516101c05261019c600060243560038110612b4957600080fd5b600060c052602060c02001545af1612b6057600080fd5b601f3d11612b6d57600080fd5b60005061022051612b7d57600080fd5b60043561018052610160516101a052337f9e96dd3b997a2a257eec4df9bb6eaf626e206df5f543bd963682d143300be3106040610180a261016051600052600060185560206000f35b633c157e64811415612d67576006543314612be057600080fd5b600c5462015180818183011015612bf657600080fd5b80820190509050421015612c0957600080fd5b4262015180818183011015612c1d57600080fd5b808201905090506024351015612c3257600080fd5b610140516006580161351f565b6101605261014052610160516101405260043560648082028215828483041417612c6857600080fd5b809050905090506101605260006004351115612c8b57620f424060043510612c8e565b60005b612c9757600080fd5b61014051610160511015612cda576101405161016051600a8082028215828483041417612cc357600080fd5b809050905090501015612cd557600080fd5b612d0a565b61014051600a8082028215828483041417612cf457600080fd5b80905090509050610160511115612d0a57600080fd5b61014051600a5561016051600b5542600c55602435600d556101405161018052610160516101a052426101c0526024356101e0527fa2b71ec6df949300b59aab36b55e189697b750119dd349fcfa8c0f779e83c2546080610180a1005b63551a6588811415612dea576006543314612d8157600080fd5b610140516006580161351f565b6101605261014052610160516101405261014051600a5561014051600b5542600c5542600d55610140516101605242610180527f46e22fb3709ad289f62ce63d469248536dbc78d82b84a3d7e74ad606dc2019386040610160a1005b630746dd5a811415612ee9576006543314612e0457600080fd5b600e5415612e1157600080fd5b64012a05f2006004351115612e2557600080fd5b6402540be4006024351115612e3957600080fd5b6802b5e3af16b18800006044356004358082028215828483041417612e5d57600080fd5b809050905090501115612e6f57600080fd5b426203f480818183011015612e8357600080fd5b808201905090506101405261014051600e5560043560105560243560115560443560125560043561016052602435610180526044356101a052610140517fe347cde074ab87e09449fa2b03e8f2cf79094cb1265f4c914365d2247d4147a36060610160a2005b634f12fe97811415612f91576006543314612f0357600080fd5b600e54421015612f1257600080fd5b6000600e5418612f2157600080fd5b6000600e55601054610140526011546101605260125461018052610140516003556101605160055561018051600455610140516101a052610160516101c052610180516101e0527fcfca96e0fef3432146913b2a5a2268a55d3f475fe057e7ffde1082b77693f4f360606101a0a1005b63226840fb811415612fb2576006543314612fab57600080fd5b6000600e55005b636b441a408114156130445760043560a01c15612fce57600080fd5b6006543314612fdc57600080fd5b600f5415612fe957600080fd5b426203f480818183011015612ffd57600080fd5b808201905090506101405261014051600f55600435601355600435610140517f181aa3aa17d4cbf99265dd4443eba009433d3cde79d60164fde1d1a192beb93560006000a3005b636a1c05ae8114156130bb57600654331461305e57600080fd5b600f5442101561306d57600080fd5b6000600f541861307c57600080fd5b6000600f556013546101405261014051600655610140517f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c60006000a2005b6386fbf1938114156130dc5760065433146130d557600080fd5b6000600f55005b6330c540858114156131cc5760065433146130f657600080fd5b61014060006003818352015b610140516003811061311357600080fd5b600260c052602060c02001546101605260006101605118156131b8576020610220604463a9059cbb610180526017546101a052610160516101c05261019c6000610140516003811061316457600080fd5b600060c052602060c02001545af161317b57600080fd5b601f3d1161318857600080fd5b6000506102205161319857600080fd5b600061014051600381106131ab57600080fd5b600260c052602060c02001555b8151600101808352811415613102575b5050005b63524c39018114156132055760065433146131e657600080fd5b600260c052602060c02060008155600060018201556000600282015550005b63e369885381141561323457600654331461321f57600080fd5b426015541161322d57600080fd5b6001601455005b633046f97281141561325557600654331461324e57600080fd5b6000601455005b63b6aa64c581141561328857600654331461326f57600080fd5b620100006004351061328057600080fd5b600435600955005b63c51b88618114156132ba5760043560a01c156132a457600080fd5b60065433146132b257600080fd5b600435601655005b637242e5248114156132ec5760043560a01c156132d657600080fd5b60065433146132e457600080fd5b600435601755005b63c661065781141561331d576004356003811061330857600080fd5b600060c052602060c020015460005260206000f35b63b9947eb081141561334e576004356003811061333957600080fd5b600160c052602060c020015460005260206000f35b63e2e7d26481141561337f576004356003811061336a57600080fd5b600260c052602060c020015460005260206000f35b63ddca3f438114156133975760035460005260206000f35b638edfdd5f8114156133af5760045460005260206000f35b63fee3f7f98114156133c75760055460005260206000f35b638da5cb5b8114156133df5760065460005260206000f35b6382c630668114156133f75760075460005260206000f35b635409491a81141561340f57600a5460005260206000f35b63b4b577ad81141561342757600b5460005260206000f35b632081066c81141561343f57600c5460005260206000f35b631405228881141561345757600d5460005260206000f35b63405e28f881141561346f57600e5460005260206000f35b63e0a0b58681141561348757600f5460005260206000f35b6358680d0b81141561349f5760105460005260206000f35b63e38244628114156134b75760115460005260206000f35b631e4c4ef88114156134cf5760125460005260206000f35b631ec0cdc18114156134e75760135460005260206000f35b63b618ba628114156134ff5760165460005260206000f35b636e42e4d28114156135175760175460005260206000f35b505b60006000fd5b61014052600d5461016052600b5461018052610160514210156136a557600a546101a052600c546101c0526101a0516101805111156135ff576101a051610180516101a0518082101561357157600080fd5b80820390509050426101c0518082101561358a57600080fd5b8082039050905080820282158284830414176135a557600080fd5b80905090509050610160516101c051808210156135c157600080fd5b8082039050905080806135d357600080fd5b8204905090508181830110156135e857600080fd5b8082019050905060005260005161014051566136a0565b6101a0516101a051610180518082101561361857600080fd5b80820390509050426101c0518082101561363157600080fd5b80820390509050808202821582848304141761364c57600080fd5b80905090509050610160516101c0518082101561366857600080fd5b80820390509050808061367a57600080fd5b8204905090508082101561368d57600080fd5b8082039050905060005260005161014051565b6136b5565b6101805160005260005161014051565b005b6101c0526101405261016052610180526101a0526402540be4006101a0511115156136f057610180516000526000516101c05156613823565b610140516101605181818301101561370757600080fd5b808201905090506101e0526101e080516101e051808202821582848304141761372f57600080fd5b809050905090508152506101a05161018051808202821582848304141761375557600080fd5b809050905090506101a0516402540be4008082101561377357600080fd5b808203905090506004808202821582848304141761379057600080fd5b809050905090506101405180820282158284830414176137af57600080fd5b809050905090506101605180820282158284830414176137ce57600080fd5b809050905090506101e05180806137e457600080fd5b8204905090506402540be4008181830110156137ff57600080fd5b80820190509050808061381157600080fd5b8204905090506000526000516101c051565b005b61014052606036610160376101c060006003818352015b602061026060246370a082316101e05230610200526101fc6101c0516003811061386557600080fd5b600060c052602060c02001545afa61387c57600080fd5b601f3d1161388957600080fd5b600050610260516101c051600381106138a157600080fd5b600260c052602060c0200154808210156138ba57600080fd5b808203905090506101606101c051600381106138d557600080fd5b60200201525b815160010180835281141561383c575b505060606101c0525b60006101c05111151561390657613922565b60206101c05103610160015160206101c051036101c0526138f4565b61014051565b6101c0526101405261016052610180526101a05260006101e05261022060006003818352015b602061022051026101400151610200526101e080516102005181818301101561397657600080fd5b808201905090508152505b815160010180835281141561394e575b50506101e05115156139ab5760006000526000516101c051565b6000610200526101e051610220526101a051600380820282158284830414176139d357600080fd5b8090509050905061024052610260600060ff818352015b61022051610280526102c060006003818352015b60206102c0510261014001516102a05261028051610220518082028215828483041417613a2a57600080fd5b809050905090506102a05160038082028215828483041417613a4b57600080fd5b809050905090506001818183011015613a6357600080fd5b808201905090508080613a7557600080fd5b820490509050610280525b81516001018083528114156139fe575b50506102205161020052610240516101e0518082028215828483041417613ab657600080fd5b809050905090506064808204905090506102805160038082028215828483041417613ae057600080fd5b80905090509050818183011015613af657600080fd5b80820190509050610220518082028215828483041417613b1557600080fd5b8090509050905061024051606480821015613b2f57600080fd5b80820390509050610220518082028215828483041417613b4e57600080fd5b809050905090506064808204905090506004610280518082028215828483041417613b7857600080fd5b80905090509050818183011015613b8e57600080fd5b808201905090508080613ba057600080fd5b8204905090506102205261020051610220511115613bf4576001610220516102005180821015613bcf57600080fd5b80820390509050111515613bef576102205160005250506000516101c051565b613c2b565b6001610200516102205180821015613c0b57600080fd5b80820390509050111515613c2b576102205160005250506000516101c051565b81516001018083528114156139ea575b505060006000fd5b6101c0526101405261016052610180526101a05260016101e05264e8d4a510006102005264e8d4a510006102205261024060006003818352015b6101e06102405160038110613c9157600080fd5b6020020180516101406102405160038110613cab57600080fd5b60200201518082028215828483041417613cc457600080fd5b809050905090508152505b8151600101808352811415613c7d575b50506101405161016051610180516101a0516101c0516101e05161020051610220516101e05161024052610200516102605261022051610280526101a0516102a0526102a05161028051610260516102405160065801613928565b6103005261022052610200526101e0526101c0526101a052610180526101605261014052610300516000526000516101c051565b61014052601654610160526000610160511815613fc357600060046101e0527f3111e7b300000000000000000000000000000000000000000000000000000000610200526101e060048060208461024001018260208501600060045af150508051820191505060606020826102400101526020810190507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602082610240010152602081019050306020826102400101526020810190506003602082610240010152602081019050600060c052602060c020546020826102400101526020810190506001600060c052602060c02001546020826102400101526020810190506002600060c052602060c0200154602082610240010152602081019050806102405261024090508051602001806103808284600060045af1613eae57600080fd5b505060206104e0610380516103a0600073357d51124f59836ded84c8a1730d72b749d8bc235af1613ede57600080fd5b60203d80821115613eef5780613ef1565b815b905090506104c0526104c08051602001806101808284600060045af1613f1657600080fd5b5050610180806020015160008251806020901315613f3357600080fd5b8091901215613f4157600080fd5b806020036101000a82049050905090506101e05260006101e0511115613fc35760206102a0604463a9059cbb6102005261016051610220526101e0516102405261021c6000730d500b1d8e8ef31e21c99d1db9a6444d3adf12705af1613fa657600080fd5b601f3d11613fb357600080fd5b6000506102a051613fc357600080fd5b61014051565b610200526101405261016052610180526101a0526101c0526101e052610160516101405118613ff757600080fd5b600061016051121561400857600080fd5b6003610160511261401857600080fd5b600061014051121561402957600080fd5b6003610140511261403957600080fd5b6101405161016051610180516101a0516101c0516101e05161020051610220516006580161351f565b6102405261022052610200526101e0526101c0526101a05261018052610160526101405261024051610220526101405161016051610180516101a0516101c0516101e0516102005161022051610240516101a051610260526101c051610280526101e0516102a052610220516102c0526102c0516102a051610280516102605160065801613928565b610320526102405261022052610200526101e0526101c0526101a0526101805261016052610140526103205161024052610220516003808202821582848304141761413557600080fd5b809050905090506102605261024051610280526060366102a03761030060006003818352015b6101405161030051141561417657610180516102c0526141ab565b610160516103005118156141a6576101a0610300516003811061419857600080fd5b60200201516102c0526141ab565b614227565b6102a080516102c0518181830110156141c357600080fd5b80820190509050815250610280516102405180820282158284830414176141e957600080fd5b809050905090506102c0516003808202821582848304141761420a57600080fd5b80905090509050808061421c57600080fd5b820490509050610280525b815160010180835281141561415b575b50506102805161024051808202821582848304141761425557600080fd5b809050905090506064808202821582848304141761427257600080fd5b80905090509050610260516003808202821582848304141761429357600080fd5b8090509050905080806142a557600080fd5b820490509050610280526102a05161024051606480820282158284830414176142cd57600080fd5b809050905090506102605180806142e357600080fd5b8204905090508181830110156142f857600080fd5b80820190509050610300526102405161032052610340600060ff818352015b610320516102e0526103205161032051808202821582848304141761433b57600080fd5b809050905090506102805181818301101561435557600080fd5b80820190509050600261032051808202821582848304141761437657600080fd5b809050905090506103005181818301101561439057600080fd5b8082019050905061024051808210156143a857600080fd5b8082039050905080806143ba57600080fd5b820490509050610320526102e05161032051111561440e576001610320516102e051808210156143e957600080fd5b808203905090501115156144095761032051600052505060005161020051565b614445565b60016102e051610320518082101561442557600080fd5b808203905090501115156144455761032051600052505060005161020051565b8151600101808352811415614317575b505060006000fd5b6101a0526101405261016052610180526101405161016051610180516101a0516101c0516101e0516102005160065801613825565b610220526102405261026052610200526101e0526101c0526101a05261018052610160526101405261022080516101c05280602001516101e0528060400151610200525060016102205264e8d4a510006102405264e8d4a510006102605261028060006003818352015b6101c0610280516003811061451057600080fd5b602002018051610220610280516003811061452a57600080fd5b6020020151808202821582848304141761454357600080fd5b809050905090508152505b81516001018083528114156144fc575b50506101c0610140516003811061457457600080fd5b602002015161018051610220610140516003811061459157600080fd5b602002015180820282158284830414176145aa57600080fd5b809050905090508181830110156145c057600080fd5b80820190509050610280526101405161016051610180516101a0516101c0516101e05161020051610220516102405161026051610280516102a051610140516102c052610160516102e05261028051610300526101c051610320526101e051610340526102005161036052610360516103405161032051610300516102e0516102c05160065801613fc9565b6103c0526102a05261028052610260526102405261022052610200526101e0526101c0526101a0526101805261016052610140526103c0516102a0526101c0610160516003811061469c57600080fd5b60200201516102a051808210156146b257600080fd5b8082039050905061022061016051600381106146cd57600080fd5b602002015180806146dd57600080fd5b8204905090506102c0526101405161016051610180516101a0516101c0516101e05161020051610220516102405161026051610280516102a0516102c0516102e0516101c0610140516003811061473357600080fd5b60200201516102805181818301101561474b57600080fd5b80820190509050600280820490509050610300526101c0610160516003811061477357600080fd5b60200201516102a05181818301101561478b57600080fd5b8082019050905060028082049050905061032052600354610340526004546103605261036051610340516103205161030051600658016136b7565b6103c0526102e0526102c0526102a05261028052610260526102405261022052610200526101e0526101c0526101a0526101805261016052610140526103c0516102c051808202821582848304141761481e57600080fd5b809050905090506402540be400808204905090506102e0526102c0516102e0518082101561484b57600080fd5b808203905090506000526000516101a051565b6101a0526101405261016052610180526014541561487b57600080fd5b6101405161016051610180516101a05160065801613d6e565b6101a0526101805261016052610140526000506101405161016051610180516101a0516101c0516101e0516102005160065801613825565b610220526102405261026052610200526101e0526101c0526101a05261018052610160526101405261022080516101c05280602001516101e0528060400151610200525060016102205264e8d4a510006102405264e8d4a510006102605261028060006003818352015b6101c0610280516003811061494a57600080fd5b602002018051610220610280516003811061496457600080fd5b6020020151808202821582848304141761497d57600080fd5b809050905090508152505b8151600101808352811415614936575b50506101c061014051600381106149ae57600080fd5b60200201516101805161022061014051600381106149cb57600080fd5b602002015180820282158284830414176149e457600080fd5b809050905090508181830110156149fa57600080fd5b80820190509050610280526101405161016051610180516101a0516101c0516101e05161020051610220516102405161026051610280516102a051610140516102c052610160516102e05261028051610300526101c051610320526101e051610340526102005161036052610360516103405161032051610300516102e0516102c05160065801613fc9565b6103c0526102a05261028052610260526102405261022052610200526101e0526101c0526101a0526101805261016052610140526103c0516102a0526101c06101605160038110614ad657600080fd5b60200201516102a05180821015614aec57600080fd5b808203905090506102c0526102c0516101405161016051610180516101a0516101c0516101e05161020051610220516102405161026051610280516102a0516102c0516102e0516101c06101405160038110614b4757600080fd5b602002015161028051818183011015614b5f57600080fd5b80820190509050600280820490509050610300526101c06101605160038110614b8757600080fd5b60200201516102a051818183011015614b9f57600080fd5b8082019050905060028082049050905061032052600354610340526004546103605261036051610340516103205161030051600658016136b7565b6103c0526102e0526102c0526102a05261028052610260526102405261022052610200526101e0526101c0526101a0526101805261016052610140526103c0518082028215828483041417614c2e57600080fd5b809050905090506402540be400808204905090506102e052600554610300526000610300511815614cff576102e051610300518082028215828483041417614c7557600080fd5b809050905090506402540be40080820490509050610320526000610320511815614cff576101605160038110614caa57600080fd5b600260c052602060c020018054610320516102206101605160038110614ccf57600080fd5b60200201518080614cdf57600080fd5b820490509050818183011015614cf457600080fd5b808201905090508155505b6102c0516102e05180821015614d1457600080fd5b808203905090506102206101605160038110614d2f57600080fd5b60200201518080614d3f57600080fd5b8204905090506000526000516101a051565b610200526101405261016052610180526101a0526101c0526101e0526000610160511215614d7e57600080fd5b60036101605112614d8e57600080fd5b6101405160038082028215828483041417614da857600080fd5b80905090509050610220526101e05161024052606036610260376102c060006003818352015b610160516102c0511815614dfe576101806102c05160038110614df057600080fd5b602002015161028052614e03565b614e7f565b610260805161028051818183011015614e1b57600080fd5b80820190509050815250610240516101e0518082028215828483041417614e4157600080fd5b809050905090506102805160038082028215828483041417614e6257600080fd5b809050905090508080614e7457600080fd5b820490509050610240525b8151600101808352811415614dce575b5050610240516101e0518082028215828483041417614ead57600080fd5b8090509050905060648082028215828483041417614eca57600080fd5b809050905090506102205160038082028215828483041417614eeb57600080fd5b809050905090508080614efd57600080fd5b82049050905061024052610260516101e05160648082028215828483041417614f2557600080fd5b80905090509050610220518080614f3b57600080fd5b820490509050818183011015614f5057600080fd5b808201905090506102c0526101e0516102e052610300600060ff818352015b6102e0516102a0526102e0516102e0518082028215828483041417614f9357600080fd5b8090509050905061024051818183011015614fad57600080fd5b8082019050905060026102e0518082028215828483041417614fce57600080fd5b809050905090506102c051818183011015614fe857600080fd5b808201905090506101e0518082101561500057600080fd5b80820390509050808061501257600080fd5b8204905090506102e0526102a0516102e05111156150665760016102e0516102a0518082101561504157600080fd5b80820390509050111515615061576102e051600052505060005161020051565b61509d565b60016102a0516102e0518082101561507d57600080fd5b8082039050905011151561509d576102e051600052505060005161020051565b8151600101808352811415614f6f575b505060006000fd5b6101805261014052610160526101405161016051610180516101a0516006580161351f565b6101c0526101a0526101805261016052610140526101c0516101a0526101405161016051610180516101a0516101c0516101e0516102005160065801613825565b610220526102405261026052610200526101e0526101c0526101a05261018052610160526101405261022080516101c05280602001516101e0528060400151610200525060016102205264e8d4a510006102405264e8d4a510006102605261028060006003818352015b6101c0610280516003811061519957600080fd5b60200201805161022061028051600381106151b357600080fd5b602002015180820282158284830414176151cc57600080fd5b809050905090508152505b8151600101808352811415615185575b50506101405161016051610180516101a0516101c0516101e05161020051610220516102405161026051610280516101c0516102a0526101e0516102c052610200516102e0526101a05161030052610300516102e0516102c0516102a05160065801613928565b6103605261028052610260526102405261022052610200526101e0526101c0526101a052610180526101605261014052610360516102805261028051610140516102805180820282158284830414176152a657600080fd5b80905090509050602061032060046318160ddd6102c0526102dc6007545afa6152ce57600080fd5b601f3d116152db57600080fd5b6000506103205180806152ed57600080fd5b8204905090508082101561530057600080fd5b808203905090506102a0526101405161016051610180516101a0516101c0516101e05161020051610220516102405161026051610280516102a0516102c0516101a0516102e05261016051610300526101c051610320526101e0516103405261020051610360526102a0516103805261038051610360516103405161032051610300516102e05160065801614d51565b6103e0526102c0526102a05261028052610260526102405261022052610200526101e0526101c0526101a0526101805261016052610140526103e0516102c0526101c0516102e0526101e051610300526102005161032052610280516102a0518181830110156153ff57600080fd5b80820190509050600680820490509050610340526003546003808202821582848304141761542c57600080fd5b8090509050905060088082049050905061036052600454610380526103a060006003818352015b6040366103c037610160516103a0511415615516576101c06103a0516003811061547c57600080fd5b60200201516102a051808202821582848304141761549957600080fd5b809050905090506102805180806154af57600080fd5b8204905090506102c051808210156154c657600080fd5b808203905090506103c0526101c06103a051600381106154e557600080fd5b60200201516102c0518181830110156154fd57600080fd5b808201905090506002808204905090506103e0526155b2565b6101c06103a0516003811061552a57600080fd5b60200201516101c06103a0516003811061554357600080fd5b60200201516102a051808202821582848304141761556057600080fd5b8090509050905061028051808061557657600080fd5b8204905090508082101561558957600080fd5b808203905090506103c0526101c06103a051600381106155a857600080fd5b60200201516103e0525b6102e06103a051600381106155c657600080fd5b602002018051610140610400525b610400515160206104005101610400526104006104005110156155f6576155d4565b6103e0516104205261034051610440526103605161046052610380516104805261048051610460516104405161042051600658016136b7565b6104e0526103e0610400525b610400515260206104005103610400526101406104005110151561565e5761563b565b6104e0516103c051808202821582848304141761567a57600080fd5b809050905090506402540be400808204905090508082101561569b57600080fd5b808203905090508152505b8151600101808352811415615453575b50506102e061016051600381106156cc57600080fd5b60200201516101406103c0525b6103c0515160206103c051016103c0526103c06103c05110156156fb576156d9565b6101a0516103e05261016051610400526102e05161042052610300516104405261032051610460526102a0516104805261048051610460516104405161042051610400516103e05160065801614d51565b6104e0526103a06103c0525b6103c0515260206103c051036103c0526101406103c05110151561577b57615758565b6104e0518082101561578c57600080fd5b808203905090506103a0526103a0516001808210156157aa57600080fd5b8082039050905061022061016051600381106157c557600080fd5b602002015180806157d557600080fd5b82049050905060005260005161018051565b61039e615b850361039e60003961039e615b85036000f300000000000000000000000027f8d03b3a2196956ed754badc28d73be8830a6e0000000000000000000000001a13f4ca1d028320a707d99520abfefca3998b7f00000000000000000000000060d55f02a771d515e077c9c2403a1ef324885cec0000000000000000000000008f3cf7ad23cd3cadbd9735aff958023239c6a0630000000000000000000000002791bca1f2de4661ed88a30c99a7a9449aa84174000000000000000000000000c2132d05d31c914a87c6611c10748aeb04b58e8f000000000000000000000000e7a24ef0c5e95ffb0f6684b813a78f2a3ad7d17100000000000000000000000000000000000000000000000000000000000000c800000000000000000000000000000000000000000000000000000000003d0900000000000000000000000000000000000000000000000000000000012a05f20000000000000000000000000000000000000000000000000000000004a817c800

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000027f8d03b3a2196956ed754badc28d73be8830a6e0000000000000000000000001a13f4ca1d028320a707d99520abfefca3998b7f00000000000000000000000060d55f02a771d515e077c9c2403a1ef324885cec0000000000000000000000008f3cf7ad23cd3cadbd9735aff958023239c6a0630000000000000000000000002791bca1f2de4661ed88a30c99a7a9449aa84174000000000000000000000000c2132d05d31c914a87c6611c10748aeb04b58e8f000000000000000000000000e7a24ef0c5e95ffb0f6684b813a78f2a3ad7d17100000000000000000000000000000000000000000000000000000000000000c800000000000000000000000000000000000000000000000000000000003d0900000000000000000000000000000000000000000000000000000000012a05f20000000000000000000000000000000000000000000000000000000004a817c800

-----Decoded View---------------
Arg [0] : _coins (address[3]): 0x27f8d03b3a2196956ed754badc28d73be8830a6e,0x1a13f4ca1d028320a707d99520abfefca3998b7f,0x60d55f02a771d515e077c9c2403a1ef324885cec
Arg [1] : _underlying_coins (address[3]): 0x8f3cf7ad23cd3cadbd9735aff958023239c6a063,0x2791bca1f2de4661ed88a30c99a7a9449aa84174,0xc2132d05d31c914a87c6611c10748aeb04b58e8f
Arg [2] : _pool_token (address): 0xe7a24ef0c5e95ffb0f6684b813a78f2a3ad7d171
Arg [3] : _A (uint256): 200
Arg [4] : _fee (uint256): 4000000
Arg [5] : _admin_fee (uint256): 5000000000
Arg [6] : _offpeg_fee_multiplier (uint256): 20000000000

-----Encoded View---------------
11 Constructor Arguments found :
Arg [0] : 00000000000000000000000027f8d03b3a2196956ed754badc28d73be8830a6e
Arg [1] : 0000000000000000000000001a13f4ca1d028320a707d99520abfefca3998b7f
Arg [2] : 00000000000000000000000060d55f02a771d515e077c9c2403a1ef324885cec
Arg [3] : 0000000000000000000000008f3cf7ad23cd3cadbd9735aff958023239c6a063
Arg [4] : 0000000000000000000000002791bca1f2de4661ed88a30c99a7a9449aa84174
Arg [5] : 000000000000000000000000c2132d05d31c914a87c6611c10748aeb04b58e8f
Arg [6] : 000000000000000000000000e7a24ef0c5e95ffb0f6684b813a78f2a3ad7d171
Arg [7] : 00000000000000000000000000000000000000000000000000000000000000c8
Arg [8] : 00000000000000000000000000000000000000000000000000000000003d0900
Arg [9] : 000000000000000000000000000000000000000000000000000000012a05f200
Arg [10] : 00000000000000000000000000000000000000000000000000000004a817c800


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.