diff --git a/mev_inspect/abis/curve/DepositBUSD.json b/mev_inspect/abis/curve/DepositBUSD.json new file mode 100644 index 0000000..9dc606d --- /dev/null +++ b/mev_inspect/abis/curve/DepositBUSD.json @@ -0,0 +1 @@ +[{"outputs":[],"inputs":[{"type":"address[4]","name":"_coins"},{"type":"address[4]","name":"_underlying_coins"},{"type":"address","name":"_curve"},{"type":"address","name":"_token"}],"constant":false,"payable":false,"type":"constructor"},{"name":"add_liquidity","outputs":[],"inputs":[{"type":"uint256[4]","name":"uamounts"},{"type":"uint256","name":"min_mint_amount"}],"constant":false,"payable":false,"type":"function","gas":164560},{"name":"remove_liquidity","outputs":[],"inputs":[{"type":"uint256","name":"_amount"},{"type":"uint256[4]","name":"min_uamounts"}],"constant":false,"payable":false,"type":"function","gas":99521},{"name":"remove_liquidity_imbalance","outputs":[],"inputs":[{"type":"uint256[4]","name":"uamounts"},{"type":"uint256","name":"max_burn_amount"}],"constant":false,"payable":false,"type":"function","gas":120148},{"name":"calc_withdraw_one_coin","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"uint256","name":"_token_amount"},{"type":"int128","name":"i"}],"constant":true,"payable":false,"type":"function","gas":3881601},{"name":"remove_liquidity_one_coin","outputs":[],"inputs":[{"type":"uint256","name":"_token_amount"},{"type":"int128","name":"i"},{"type":"uint256","name":"min_uamount"}],"constant":false,"payable":false,"type":"function"},{"name":"remove_liquidity_one_coin","outputs":[],"inputs":[{"type":"uint256","name":"_token_amount"},{"type":"int128","name":"i"},{"type":"uint256","name":"min_uamount"},{"type":"bool","name":"donate_dust"}],"constant":false,"payable":false,"type":"function"},{"name":"withdraw_donated_dust","outputs":[],"inputs":[],"constant":false,"payable":false,"type":"function","gas":63973},{"name":"coins","outputs":[{"type":"address","name":""}],"inputs":[{"type":"int128","name":"arg0"}],"constant":true,"payable":false,"type":"function","gas":1680},{"name":"underlying_coins","outputs":[{"type":"address","name":""}],"inputs":[{"type":"int128","name":"arg0"}],"constant":true,"payable":false,"type":"function","gas":1710},{"name":"curve","outputs":[{"type":"address","name":""}],"inputs":[],"constant":true,"payable":false,"type":"function","gas":1541},{"name":"token","outputs":[{"type":"address","name":""}],"inputs":[],"constant":true,"payable":false,"type":"function","gas":1571}] diff --git a/mev_inspect/abis/curve/DepositCompound.json b/mev_inspect/abis/curve/DepositCompound.json new file mode 100644 index 0000000..61b5ace --- /dev/null +++ b/mev_inspect/abis/curve/DepositCompound.json @@ -0,0 +1 @@ +[{"outputs":[],"inputs":[{"type":"address[2]","name":"_coins"},{"type":"address[2]","name":"_underlying_coins"},{"type":"address","name":"_curve"},{"type":"address","name":"_token"}],"constant":false,"payable":false,"type":"constructor"},{"name":"add_liquidity","outputs":[],"inputs":[{"type":"uint256[2]","name":"uamounts"},{"type":"uint256","name":"min_mint_amount"}],"constant":false,"payable":false,"type":"function","gas":117283},{"name":"remove_liquidity","outputs":[],"inputs":[{"type":"uint256","name":"_amount"},{"type":"uint256[2]","name":"min_uamounts"}],"constant":false,"payable":false,"type":"function","gas":83606},{"name":"remove_liquidity_imbalance","outputs":[],"inputs":[{"type":"uint256[2]","name":"uamounts"},{"type":"uint256","name":"max_burn_amount"}],"constant":false,"payable":false,"type":"function","gas":96829},{"name":"calc_withdraw_one_coin","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"uint256","name":"_token_amount"},{"type":"int128","name":"i"}],"constant":true,"payable":false,"type":"function","gas":2945630},{"name":"remove_liquidity_one_coin","outputs":[],"inputs":[{"type":"uint256","name":"_token_amount"},{"type":"int128","name":"i"},{"type":"uint256","name":"min_uamount"}],"constant":false,"payable":false,"type":"function"},{"name":"remove_liquidity_one_coin","outputs":[],"inputs":[{"type":"uint256","name":"_token_amount"},{"type":"int128","name":"i"},{"type":"uint256","name":"min_uamount"},{"type":"bool","name":"donate_dust"}],"constant":false,"payable":false,"type":"function"},{"name":"withdraw_donated_dust","outputs":[],"inputs":[],"constant":false,"payable":false,"type":"function","gas":63973},{"name":"coins","outputs":[{"type":"address","name":""}],"inputs":[{"type":"int128","name":"arg0"}],"constant":true,"payable":false,"type":"function","gas":1680},{"name":"underlying_coins","outputs":[{"type":"address","name":""}],"inputs":[{"type":"int128","name":"arg0"}],"constant":true,"payable":false,"type":"function","gas":1710},{"name":"curve","outputs":[{"type":"address","name":""}],"inputs":[],"constant":true,"payable":false,"type":"function","gas":1541},{"name":"token","outputs":[{"type":"address","name":""}],"inputs":[],"constant":true,"payable":false,"type":"function","gas":1571}] diff --git a/mev_inspect/abis/curve/DepositPAX.json b/mev_inspect/abis/curve/DepositPAX.json new file mode 100644 index 0000000..2019a0c --- /dev/null +++ b/mev_inspect/abis/curve/DepositPAX.json @@ -0,0 +1 @@ +[{"outputs":[],"inputs":[{"type":"address[4]","name":"_coins"},{"type":"address[4]","name":"_underlying_coins"},{"type":"address","name":"_curve"},{"type":"address","name":"_token"}],"constant":false,"payable":false,"type":"constructor"},{"name":"add_liquidity","outputs":[],"inputs":[{"type":"uint256[4]","name":"uamounts"},{"type":"uint256","name":"min_mint_amount"}],"constant":false,"payable":false,"type":"function","gas":165036},{"name":"remove_liquidity","outputs":[],"inputs":[{"type":"uint256","name":"_amount"},{"type":"uint256[4]","name":"min_uamounts"}],"constant":false,"payable":false,"type":"function","gas":100343},{"name":"remove_liquidity_imbalance","outputs":[],"inputs":[{"type":"uint256[4]","name":"uamounts"},{"type":"uint256","name":"max_burn_amount"}],"constant":false,"payable":false,"type":"function","gas":121298},{"name":"calc_withdraw_one_coin","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"uint256","name":"_token_amount"},{"type":"int128","name":"i"}],"constant":true,"payable":false,"type":"function","gas":3881771},{"name":"remove_liquidity_one_coin","outputs":[],"inputs":[{"type":"uint256","name":"_token_amount"},{"type":"int128","name":"i"},{"type":"uint256","name":"min_uamount"}],"constant":false,"payable":false,"type":"function"},{"name":"remove_liquidity_one_coin","outputs":[],"inputs":[{"type":"uint256","name":"_token_amount"},{"type":"int128","name":"i"},{"type":"uint256","name":"min_uamount"},{"type":"bool","name":"donate_dust"}],"constant":false,"payable":false,"type":"function"},{"name":"withdraw_donated_dust","outputs":[],"inputs":[],"constant":false,"payable":false,"type":"function","gas":63973},{"name":"coins","outputs":[{"type":"address","name":""}],"inputs":[{"type":"int128","name":"arg0"}],"constant":true,"payable":false,"type":"function","gas":1680},{"name":"underlying_coins","outputs":[{"type":"address","name":""}],"inputs":[{"type":"int128","name":"arg0"}],"constant":true,"payable":false,"type":"function","gas":1710},{"name":"curve","outputs":[{"type":"address","name":""}],"inputs":[],"constant":true,"payable":false,"type":"function","gas":1541},{"name":"token","outputs":[{"type":"address","name":""}],"inputs":[],"constant":true,"payable":false,"type":"function","gas":1571}] diff --git a/mev_inspect/abis/curve/DepositTriCrypto.json b/mev_inspect/abis/curve/DepositTriCrypto.json new file mode 100644 index 0000000..612fe91 --- /dev/null +++ b/mev_inspect/abis/curve/DepositTriCrypto.json @@ -0,0 +1 @@ +[{"outputs":[],"inputs":[{"type":"address[4]","name":"_coins"},{"type":"address[4]","name":"_underlying_coins"},{"type":"address","name":"_curve"},{"type":"address","name":"_token"}],"constant":false,"payable":false,"type":"constructor"},{"name":"add_liquidity","outputs":[],"inputs":[{"type":"uint256[4]","name":"uamounts"},{"type":"uint256","name":"min_mint_amount"}],"constant":false,"payable":false,"type":"function","gas":166032},{"name":"remove_liquidity","outputs":[],"inputs":[{"type":"uint256","name":"_amount"},{"type":"uint256[4]","name":"min_uamounts"}],"constant":false,"payable":false,"type":"function","gas":101481},{"name":"remove_liquidity_imbalance","outputs":[],"inputs":[{"type":"uint256[4]","name":"uamounts"},{"type":"uint256","name":"max_burn_amount"}],"constant":false,"payable":false,"type":"function","gas":125088},{"name":"calc_withdraw_one_coin","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"uint256","name":"_token_amount"},{"type":"int128","name":"i"}],"constant":true,"payable":false,"type":"function","gas":3881771},{"name":"remove_liquidity_one_coin","outputs":[],"inputs":[{"type":"uint256","name":"_token_amount"},{"type":"int128","name":"i"},{"type":"uint256","name":"min_uamount"}],"constant":false,"payable":false,"type":"function"},{"name":"remove_liquidity_one_coin","outputs":[],"inputs":[{"type":"uint256","name":"_token_amount"},{"type":"int128","name":"i"},{"type":"uint256","name":"min_uamount"},{"type":"bool","name":"donate_dust"}],"constant":false,"payable":false,"type":"function"},{"name":"withdraw_donated_dust","outputs":[],"inputs":[],"constant":false,"payable":false,"type":"function","gas":63973},{"name":"coins","outputs":[{"type":"address","name":""}],"inputs":[{"type":"int128","name":"arg0"}],"constant":true,"payable":false,"type":"function","gas":1680},{"name":"underlying_coins","outputs":[{"type":"address","name":""}],"inputs":[{"type":"int128","name":"arg0"}],"constant":true,"payable":false,"type":"function","gas":1710},{"name":"curve","outputs":[{"type":"address","name":""}],"inputs":[],"constant":true,"payable":false,"type":"function","gas":1541},{"name":"token","outputs":[{"type":"address","name":""}],"inputs":[],"constant":true,"payable":false,"type":"function","gas":1571}] diff --git a/mev_inspect/abis/curve/DepositUSDT.json b/mev_inspect/abis/curve/DepositUSDT.json new file mode 100644 index 0000000..746a779 --- /dev/null +++ b/mev_inspect/abis/curve/DepositUSDT.json @@ -0,0 +1 @@ +[{"outputs":[],"inputs":[{"type":"address[3]","name":"_coins"},{"type":"address[3]","name":"_underlying_coins"},{"type":"address","name":"_curve"},{"type":"address","name":"_token"}],"constant":false,"payable":false,"type":"constructor"},{"name":"add_liquidity","outputs":[],"inputs":[{"type":"uint256[3]","name":"uamounts"},{"type":"uint256","name":"min_mint_amount"}],"constant":false,"payable":false,"type":"function","gas":141657},{"name":"remove_liquidity","outputs":[],"inputs":[{"type":"uint256","name":"_amount"},{"type":"uint256[3]","name":"min_uamounts"}],"constant":false,"payable":false,"type":"function","gas":92544},{"name":"remove_liquidity_imbalance","outputs":[],"inputs":[{"type":"uint256[3]","name":"uamounts"},{"type":"uint256","name":"max_burn_amount"}],"constant":false,"payable":false,"type":"function","gas":110959},{"name":"calc_withdraw_one_coin","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"uint256","name":"_token_amount"},{"type":"int128","name":"i"}],"constant":true,"payable":false,"type":"function","gas":3413700},{"name":"remove_liquidity_one_coin","outputs":[],"inputs":[{"type":"uint256","name":"_token_amount"},{"type":"int128","name":"i"},{"type":"uint256","name":"min_uamount"}],"constant":false,"payable":false,"type":"function"},{"name":"remove_liquidity_one_coin","outputs":[],"inputs":[{"type":"uint256","name":"_token_amount"},{"type":"int128","name":"i"},{"type":"uint256","name":"min_uamount"},{"type":"bool","name":"donate_dust"}],"constant":false,"payable":false,"type":"function"},{"name":"withdraw_donated_dust","outputs":[],"inputs":[],"constant":false,"payable":false,"type":"function","gas":63973},{"name":"coins","outputs":[{"type":"address","name":""}],"inputs":[{"type":"int128","name":"arg0"}],"constant":true,"payable":false,"type":"function","gas":1680},{"name":"underlying_coins","outputs":[{"type":"address","name":""}],"inputs":[{"type":"int128","name":"arg0"}],"constant":true,"payable":false,"type":"function","gas":1710},{"name":"curve","outputs":[{"type":"address","name":""}],"inputs":[],"constant":true,"payable":false,"type":"function","gas":1541},{"name":"token","outputs":[{"type":"address","name":""}],"inputs":[],"constant":true,"payable":false,"type":"function","gas":1571}] diff --git a/mev_inspect/abis/curve/DepositY.json b/mev_inspect/abis/curve/DepositY.json new file mode 100644 index 0000000..9dc606d --- /dev/null +++ b/mev_inspect/abis/curve/DepositY.json @@ -0,0 +1 @@ +[{"outputs":[],"inputs":[{"type":"address[4]","name":"_coins"},{"type":"address[4]","name":"_underlying_coins"},{"type":"address","name":"_curve"},{"type":"address","name":"_token"}],"constant":false,"payable":false,"type":"constructor"},{"name":"add_liquidity","outputs":[],"inputs":[{"type":"uint256[4]","name":"uamounts"},{"type":"uint256","name":"min_mint_amount"}],"constant":false,"payable":false,"type":"function","gas":164560},{"name":"remove_liquidity","outputs":[],"inputs":[{"type":"uint256","name":"_amount"},{"type":"uint256[4]","name":"min_uamounts"}],"constant":false,"payable":false,"type":"function","gas":99521},{"name":"remove_liquidity_imbalance","outputs":[],"inputs":[{"type":"uint256[4]","name":"uamounts"},{"type":"uint256","name":"max_burn_amount"}],"constant":false,"payable":false,"type":"function","gas":120148},{"name":"calc_withdraw_one_coin","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"uint256","name":"_token_amount"},{"type":"int128","name":"i"}],"constant":true,"payable":false,"type":"function","gas":3881601},{"name":"remove_liquidity_one_coin","outputs":[],"inputs":[{"type":"uint256","name":"_token_amount"},{"type":"int128","name":"i"},{"type":"uint256","name":"min_uamount"}],"constant":false,"payable":false,"type":"function"},{"name":"remove_liquidity_one_coin","outputs":[],"inputs":[{"type":"uint256","name":"_token_amount"},{"type":"int128","name":"i"},{"type":"uint256","name":"min_uamount"},{"type":"bool","name":"donate_dust"}],"constant":false,"payable":false,"type":"function"},{"name":"withdraw_donated_dust","outputs":[],"inputs":[],"constant":false,"payable":false,"type":"function","gas":63973},{"name":"coins","outputs":[{"type":"address","name":""}],"inputs":[{"type":"int128","name":"arg0"}],"constant":true,"payable":false,"type":"function","gas":1680},{"name":"underlying_coins","outputs":[{"type":"address","name":""}],"inputs":[{"type":"int128","name":"arg0"}],"constant":true,"payable":false,"type":"function","gas":1710},{"name":"curve","outputs":[{"type":"address","name":""}],"inputs":[],"constant":true,"payable":false,"type":"function","gas":1541},{"name":"token","outputs":[{"type":"address","name":""}],"inputs":[],"constant":true,"payable":false,"type":"function","gas":1571}] diff --git a/mev_inspect/abis/curve/DepositsUSD.json b/mev_inspect/abis/curve/DepositsUSD.json new file mode 100644 index 0000000..612fe91 --- /dev/null +++ b/mev_inspect/abis/curve/DepositsUSD.json @@ -0,0 +1 @@ +[{"outputs":[],"inputs":[{"type":"address[4]","name":"_coins"},{"type":"address[4]","name":"_underlying_coins"},{"type":"address","name":"_curve"},{"type":"address","name":"_token"}],"constant":false,"payable":false,"type":"constructor"},{"name":"add_liquidity","outputs":[],"inputs":[{"type":"uint256[4]","name":"uamounts"},{"type":"uint256","name":"min_mint_amount"}],"constant":false,"payable":false,"type":"function","gas":166032},{"name":"remove_liquidity","outputs":[],"inputs":[{"type":"uint256","name":"_amount"},{"type":"uint256[4]","name":"min_uamounts"}],"constant":false,"payable":false,"type":"function","gas":101481},{"name":"remove_liquidity_imbalance","outputs":[],"inputs":[{"type":"uint256[4]","name":"uamounts"},{"type":"uint256","name":"max_burn_amount"}],"constant":false,"payable":false,"type":"function","gas":125088},{"name":"calc_withdraw_one_coin","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"uint256","name":"_token_amount"},{"type":"int128","name":"i"}],"constant":true,"payable":false,"type":"function","gas":3881771},{"name":"remove_liquidity_one_coin","outputs":[],"inputs":[{"type":"uint256","name":"_token_amount"},{"type":"int128","name":"i"},{"type":"uint256","name":"min_uamount"}],"constant":false,"payable":false,"type":"function"},{"name":"remove_liquidity_one_coin","outputs":[],"inputs":[{"type":"uint256","name":"_token_amount"},{"type":"int128","name":"i"},{"type":"uint256","name":"min_uamount"},{"type":"bool","name":"donate_dust"}],"constant":false,"payable":false,"type":"function"},{"name":"withdraw_donated_dust","outputs":[],"inputs":[],"constant":false,"payable":false,"type":"function","gas":63973},{"name":"coins","outputs":[{"type":"address","name":""}],"inputs":[{"type":"int128","name":"arg0"}],"constant":true,"payable":false,"type":"function","gas":1680},{"name":"underlying_coins","outputs":[{"type":"address","name":""}],"inputs":[{"type":"int128","name":"arg0"}],"constant":true,"payable":false,"type":"function","gas":1710},{"name":"curve","outputs":[{"type":"address","name":""}],"inputs":[],"constant":true,"payable":false,"type":"function","gas":1541},{"name":"token","outputs":[{"type":"address","name":""}],"inputs":[],"constant":true,"payable":false,"type":"function","gas":1571}] diff --git a/mev_inspect/classifiers/specs/curve.py b/mev_inspect/classifiers/specs/curve.py index 68961f6..0d7e386 100644 --- a/mev_inspect/classifiers/specs/curve.py +++ b/mev_inspect/classifiers/specs/curve.py @@ -169,17 +169,39 @@ CURVE_BASE_POOLS = [ valid_contract_addresses=["0x8925D9d9B4569D737a48499DeF3f67BaA5a144b9"], ), ClassifierSpec( - abi_name="Deposit", + abi_name="DepositBUSD", protocol=Protocol.curve, - valid_contract_addresses=[ - "0xb6c057591E073249F2D9D88Ba59a46CFC9B59EdB", # BUSD - "0xeB21209ae4C2c9FF2a86ACA31E123764A3B6Bc06", # Compound - "0xA50cCc70b6a011CffDdf45057E39679379187287", # PAX - "0xFCBa3E75865d2d561BE8D220616520c171F12851", # sUSD - "0x331aF2E331bd619DefAa5DAc6c038f53FCF9F785", # TriCrypto - "0xac795D2c97e60DF6a99ff1c814727302fD747a80", # USDT - "0xbBC81d23Ea2c3ec7e56D39296F0cbB648873a5d3", # Y - ], + valid_contract_addresses=["0xb6c057591E073249F2D9D88Ba59a46CFC9B59EdB"], + ), + ClassifierSpec( + abi_name="DepositCompound", + protocol=Protocol.curve, + valid_contract_addresses=["0xeB21209ae4C2c9FF2a86ACA31E123764A3B6Bc06"], + ), + ClassifierSpec( + abi_name="DepositPAX", + protocol=Protocol.curve, + valid_contract_addresses=["0xA50cCc70b6a011CffDdf45057E39679379187287"], + ), + ClassifierSpec( + abi_name="DepositsUSD", + protocol=Protocol.curve, + valid_contract_addresses=["0xFCBa3E75865d2d561BE8D220616520c171F12851"], + ), + ClassifierSpec( + abi_name="DepositTriCrypto", + protocol=Protocol.curve, + valid_contract_addresses=["0x331aF2E331bd619DefAa5DAc6c038f53FCF9F785"], + ), + ClassifierSpec( + abi_name="DepositUSDT", + protocol=Protocol.curve, + valid_contract_addresses=["0xac795D2c97e60DF6a99ff1c814727302fD747a80"], + ), + ClassifierSpec( + abi_name="DepositY", + protocol=Protocol.curve, + valid_contract_addresses=["0xbBC81d23Ea2c3ec7e56D39296F0cbB648873a5d3"], ), ]