diff --git a/cmd/exchange-scrapers/collector/go.mod b/cmd/exchange-scrapers/collector/go.mod index 3d04af305..b6bbf60a3 100644 --- a/cmd/exchange-scrapers/collector/go.mod +++ b/cmd/exchange-scrapers/collector/go.mod @@ -3,7 +3,7 @@ module github.com/diadata-org/diadata/exchange-scrapers/collector go 1.17 require ( - github.com/diadata-org/diadata v1.4.317 + github.com/diadata-org/diadata v1.4.322 github.com/segmentio/kafka-go v0.4.35 github.com/sirupsen/logrus v1.9.0 ) diff --git a/config/curve/blacklist_pools/Curvefi-Arbitrum.json b/config/curve/blacklist_pools/Curvefi-Arbitrum.json new file mode 100644 index 000000000..b2f36fac6 --- /dev/null +++ b/config/curve/blacklist_pools/Curvefi-Arbitrum.json @@ -0,0 +1,28 @@ +{ + "Pools": [ + { + "Address": "0x316d06Dd6644AD630C73cD3A6a2c7AE0D22f939e" + }, + { + "Address": "0x7DA64233Fefb352f8F501B357c018158ED8aA455" + }, + { + "Address": "0x89287c32c2cac1c76227f6d300b2dbbab6b75c08" + }, + { + "Address": "0x960ea3e3C7FB317332d990873d354E18d7645590" + }, + { + "Address": "0x9cA6c4Bcfdf5580eA5e1e57aF4F921ad838b8316" + }, + { + "Address": "0xAAe75FAebCae43b9d541Fd875622BE48D9B4f5D0" + }, + { + "Address": "0xd4F94D0aaa640BBb72b5EEc2D85F6D114D81a88E" + }, + { + "Address": "0xf9b1f177e883b90ffa64e50db29b7f74a17c9161" + } + ] +} \ No newline at end of file diff --git a/config/curve/blacklist_pools/Curvefi-Fantom.json b/config/curve/blacklist_pools/Curvefi-Fantom.json new file mode 100644 index 000000000..9690c97d5 --- /dev/null +++ b/config/curve/blacklist_pools/Curvefi-Fantom.json @@ -0,0 +1,25 @@ +{ + "Pools": [ + { + "Address": "0x2B039565B2b7a1A9192D4847fbd33B25b836B950" + }, + { + "Address": "0x3a1659Ddcf2339Be3aeA159cA010979FB49155FF" + }, + { + "Address": "0x5d58Eb45e97B43e471AF05cD2b11CeB4106E1b1a" + }, + { + "Address": "0x74E25054e98fd3FCd4bbB13A962B43E49098586f" + }, + { + "Address": "0xb11dc44a9f981faf1669dca6dd40c3cc2554a2ce" + }, + { + "Address": "0xe6358f6a45b502477e83cc1cda759f540e4459ee" + }, + { + "Address": "0xffbACcE0CC7C19d46132f1258FC16CF6871D153c" + } + ] +} \ No newline at end of file diff --git a/config/curve/blacklist_pools/Curvefi-Moonbeam.json b/config/curve/blacklist_pools/Curvefi-Moonbeam.json new file mode 100644 index 000000000..cb7139350 --- /dev/null +++ b/config/curve/blacklist_pools/Curvefi-Moonbeam.json @@ -0,0 +1,7 @@ +{ + "Pools": [ + { + "Address": "0x3eF6A01A0f81D6046290f3e2A8c5b843e738E604" + } + ] +} \ No newline at end of file diff --git a/config/curve/blacklist_pools/Curvefi-Polygon.json b/config/curve/blacklist_pools/Curvefi-Polygon.json new file mode 100644 index 000000000..3207c1233 --- /dev/null +++ b/config/curve/blacklist_pools/Curvefi-Polygon.json @@ -0,0 +1,34 @@ +{ + "Pools": [ + { + "Address": "0x008e1abb5d58dbdfd00b22180ecd0ee490420b9b" + }, + { + "Address": "0x04aAB3e45Aa6De7783D67FCfB21Bccf2401Ca31D" + }, + { + "Address": "0x2Fccb6a7e353c15156b951885CFbC1558f2c5272" + }, + { + "Address": "0x774D1Dba98cfBD1F2Bc3A1F59c494125e07C48F9" + }, + { + "Address": "0x7c5c946380b75a4c55e13881181b15d752ff3da5" + }, + { + "Address": "0xF52e46bEE287aAef56Fb2F8af961d9f1406cF476" + }, + { + "Address": "0xa9134fae98f92217f457918505375ae91fdc5e3c" + }, + { + "Address": "0xae00f57663f4c85fc948b13963cd4627daf01061" + }, + { + "Address": "0xd6930b7f661257da36f93160149b031735237594" + }, + { + "Address": "0xf31bcdf0b9a5ecd7ab463eb905551fbc32e51856" + } + ] +} \ No newline at end of file diff --git a/config/curve/blacklist_pools/Curvefi.json b/config/curve/blacklist_pools/Curvefi.json new file mode 100644 index 000000000..51d47872e --- /dev/null +++ b/config/curve/blacklist_pools/Curvefi.json @@ -0,0 +1,43 @@ +{ + "Pools": [ + { + "Address": "0x01b36Ff7d81b84487d5659c7857cBa8B4BB62cA1" + }, + { + "Address": "0x0f7cd0e51ec3a904cee55098f68ea0c1cb2596dc" + }, + { + "Address": "0x466c8fa3a6cd4625517594786013262a6abd3f96" + }, + { + "Address": "0x6326DEbBAa15bCFE603d831e7D75f4fc10d9B43E" + }, + { + "Address": "0x8301AE4fc9c624d1D396cbDAa1ed877821D7C511" + }, + { + "Address": "0x88855cdF2b0A8413D470B86952E726684de915be" + }, + { + "Address": "0x8c1aB78601c259E1B43F19816923609dC7d7de9B" + }, + { + "Address": "0xFe625167BD77C6A520e093C4d2d065355a1e2E93" + }, + { + "Address": "0xaAD072E917D97011EB3D7e7bce953BDE9227c21E" + }, + { + "Address": "0xc64F268BD8075B3222A508d7869E9C600bE7c47F" + }, + { + "Address": "0xde14B4a4A83dB5e506A62f06079ED3E85862A06B" + }, + { + "Address": "0xefD2fCa091e4bA762A7dd7f0F3FBEF8075A7ca12" + }, + { + "Address": "0xf8b8db73db0c3f4ff0d633836e939db23847ca1e" + } + ] +} \ No newline at end of file diff --git a/pkg/dia/scraper/exchange-scrapers/CurvefiScraper.go b/pkg/dia/scraper/exchange-scrapers/CurvefiScraper.go index b6d6f0270..5a162ed19 100644 --- a/pkg/dia/scraper/exchange-scrapers/CurvefiScraper.go +++ b/pkg/dia/scraper/exchange-scrapers/CurvefiScraper.go @@ -527,8 +527,22 @@ func (scraper *CurveFIScraper) loadPools(liquidityThreshold float64, liquidityTh log.Fatal("fetch pools: ", err) } log.Infof("found %v pools to subscribe: ", len(pools)) + + blacklistedPools, err := getAddressesFromConfig("curve/blacklist_pools/" + scraper.exchangeName) + if err != nil { + log.Fatal("blacklisted pools: ", err) + } + var blacklistedPoolsString []string + for _, bp := range blacklistedPools { + blacklistedPoolsString = append(blacklistedPoolsString, bp.Hex()) + } + log.Infof("remove %v blacklisted pools: %s", len(blacklistedPools), blacklistedPoolsString) + lowerBoundCount := 0 for _, pool := range pools { + if utils.Contains(&blacklistedPoolsString, pool.Address) { + continue + } liquidity, lowerBound := pool.GetPoolLiquidityUSD() // Discard pool if complete USD liquidity is below threshold.