ETH Price: $2,823.59 (+7.35%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Migrate_to_new_p...173990152023-06-03 8:36:59523 days ago1685781419IN
Curve Finance: Pool Migrator
0 ETH0.0014881924.63689807
Migrate_to_new_p...173990072023-06-03 8:35:23523 days ago1685781323IN
Curve Finance: Pool Migrator
0 ETH0.0012397722.62287615
Migrate_to_new_p...157494362022-10-14 22:48:47754 days ago1665787727IN
Curve Finance: Pool Migrator
0 ETH0.0047096314.20700431
Migrate_to_new_p...157494142022-10-14 22:44:23754 days ago1665787463IN
Curve Finance: Pool Migrator
0 ETH0.0051214815.4494305
Migrate_to_new_p...157493732022-10-14 22:36:11754 days ago1665786971IN
Curve Finance: Pool Migrator
0 ETH0.0049496814.83132093
Migrate_to_new_p...157491332022-10-14 21:47:59754 days ago1665784079IN
Curve Finance: Pool Migrator
0 ETH0.0052332816.46659202
Migrate_to_new_p...129818862021-08-08 3:12:131187 days ago1628392333IN
Curve Finance: Pool Migrator
0 ETH0.0154398549
Migrate_to_new_p...129387652021-08-01 9:12:461194 days ago1627809166IN
Curve Finance: Pool Migrator
0 ETH0.0052743624
Migrate_to_new_p...126574242021-06-18 8:34:131238 days ago1624005253IN
Curve Finance: Pool Migrator
0 ETH0.0030009310
Migrate_to_new_p...126560032021-06-18 3:20:381238 days ago1623986438IN
Curve Finance: Pool Migrator
0 ETH0.0036312712.1
Migrate_to_new_p...126335312021-06-14 16:02:501241 days ago1623686570IN
Curve Finance: Pool Migrator
0 ETH0.0045315815.1
Migrate_to_new_p...126069072021-06-10 12:57:191245 days ago1623329839IN
Curve Finance: Pool Migrator
0 ETH0.0032253610.9
Migrate_to_new_p...125694042021-06-04 17:35:271251 days ago1622828127IN
Curve Finance: Pool Migrator
0 ETH0.0058589119.8
Migrate_to_new_p...125276752021-05-29 6:39:041258 days ago1622270344IN
Curve Finance: Pool Migrator
0 ETH0.0085808929
Migrate_to_new_p...125067312021-05-26 0:34:211261 days ago1621989261IN
Curve Finance: Pool Migrator
0 ETH0.0114581638.724
Migrate_to_new_p...124838552021-05-22 11:33:151264 days ago1621683195IN
Curve Finance: Pool Migrator
0 ETH0.0103566735
Migrate_to_new_p...124764272021-05-21 7:45:581266 days ago1621583158IN
Curve Finance: Pool Migrator
0 ETH0.0136116346
Migrate_to_new_p...124577322021-05-18 10:06:431269 days ago1621332403IN
Curve Finance: Pool Migrator
0 ETH0.014713250
Migrate_to_new_p...124512522021-05-17 10:11:211270 days ago1621246281IN
Curve Finance: Pool Migrator
0 ETH0.0147952550
Migrate_to_new_p...124440462021-05-16 7:04:081271 days ago1621148648IN
Curve Finance: Pool Migrator
0 ETH0.015602453
Migrate_to_new_p...124401762021-05-15 16:51:341271 days ago1621097494IN
Curve Finance: Pool Migrator
0 ETH0.0228610282
Migrate_to_new_p...124244342021-05-13 6:27:391274 days ago1620887259IN
Curve Finance: Pool Migrator
0 ETH0.03034827101
Migrate_to_new_p...123942072021-05-08 14:28:011278 days ago1620484081IN
Curve Finance: Pool Migrator
0 ETH0.05618714187
Migrate_to_new_p...123900592021-05-07 23:08:241279 days ago1620428904IN
Curve Finance: Pool Migrator
0 ETH0.0123195941.00000145
Migrate_to_new_p...123815782021-05-06 15:37:231280 days ago1620315443IN
Curve Finance: Pool Migrator
0 ETH0.0213339371
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Vyper_contract

Compiler Version
vyper:0.2.11

Optimization Enabled:
N/A

Other Settings:
MIT license

Contract Source Code (Vyper language format)

# @version 0.2.11
"""
@title Pool Migrator
@author Curve.fi
@notice Zap for moving liquidity between Curve factory pools in a single transaction
@license MIT
"""

interface ERC20:
    def approve(_spender: address, _amount: uint256): nonpayable

interface Swap:
    def transferFrom(_owner: address, _spender: address, _amount: uint256) -> bool: nonpayable
    def add_liquidity(_amounts: uint256[2], _min_mint_amount: uint256, _receiver: address) -> uint256: nonpayable
    def remove_liquidity(_burn_amount: uint256, _min_amounts: uint256[2]) -> uint256[2]: nonpayable
    def coins(i: uint256) -> address: view


# pool -> coins are approved?
is_approved: HashMap[address, bool]


@external
def migrate_to_new_pool(_old_pool: address, _new_pool: address, _amount: uint256) -> uint256:
    """
    @notice Migrate liquidity between two pools
    @dev Each pool must be deployed by the curve factory and contain identical
         assets. The migrator must have approval to transfer `_old_pool` tokens
         on behalf of the caller.
    @param _old_pool Address of the pool to migrate from
    @param _new_pool Address of the pool to migrate into
    @param _amount Number of `_old_pool` LP tokens to migrate
    @return uint256 Number of `_new_pool` LP tokens received
    """
    Swap(_old_pool).transferFrom(msg.sender, self, _amount)
    amounts: uint256[2] = Swap(_old_pool).remove_liquidity(_amount, [0, 0])

    if not self.is_approved[_new_pool]:
        for i in range(2):
            coin: address = Swap(_new_pool).coins(i)
            ERC20(coin).approve(_new_pool, MAX_UINT256)
        self.is_approved[_new_pool] = True

    return Swap(_new_pool).add_liquidity(amounts, 0, msg.sender)

Contract Security Audit

Contract ABI

[{"stateMutability":"nonpayable","type":"function","name":"migrate_to_new_pool","inputs":[{"name":"_old_pool","type":"address"},{"name":"_new_pool","type":"address"},{"name":"_amount","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":43866}]

61023c56600436101561000d57610232565b600035601c52600051341561002157600080fd5b63c1c4d12b8114156102305760043560a01c1561003d57600080fd5b60243560a01c1561004d57600080fd5b602061020060646323b872dd61014052336101605230610180526044356101a05261015c60006004355af161008157600080fd5b601f3d1161008e57600080fd5b6000506102005060406102406064635b36389c610180526044356101a05260006101c05260006101e05261019c60006004355af16100cb57600080fd5b603f3d116100d857600080fd5b60005061024080516101405280602001516101605250600060243560e05260c052604060c0205415156101d55761018060006002818352015b6020610240602463c66106576101c052610180516101e0526101dc6024355afa61013a57600080fd5b601f3d1161014757600080fd5b600050610240516101a0526101a0513b61016057600080fd5b60006000604463095ea7b36101c0526024356101e0527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610200526101dc60006101a0515af16101af57600080fd5b8151600101808352811415610111575b50506001600060243560e05260c052604060c020555b60206102606084630c3e4b5461018052610140516101a052610160516101c05260006101e052336102005261019c60006024355af161021357600080fd5b601f3d1161022057600080fd5b6000506102605160005260206000f35b505b60006000fd5b61000461023c0361000460003961000461023c036000f3

Deployed Bytecode

0x600436101561000d57610232565b600035601c52600051341561002157600080fd5b63c1c4d12b8114156102305760043560a01c1561003d57600080fd5b60243560a01c1561004d57600080fd5b602061020060646323b872dd61014052336101605230610180526044356101a05261015c60006004355af161008157600080fd5b601f3d1161008e57600080fd5b6000506102005060406102406064635b36389c610180526044356101a05260006101c05260006101e05261019c60006004355af16100cb57600080fd5b603f3d116100d857600080fd5b60005061024080516101405280602001516101605250600060243560e05260c052604060c0205415156101d55761018060006002818352015b6020610240602463c66106576101c052610180516101e0526101dc6024355afa61013a57600080fd5b601f3d1161014757600080fd5b600050610240516101a0526101a0513b61016057600080fd5b60006000604463095ea7b36101c0526024356101e0527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610200526101dc60006101a0515af16101af57600080fd5b8151600101808352811415610111575b50506001600060243560e05260c052604060c020555b60206102606084630c3e4b5461018052610140516101a052610160516101c05260006101e052336102005261019c60006024355af161021357600080fd5b601f3d1161022057600080fd5b6000506102605160005260206000f35b505b60006000fd

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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