Skip to content

Commit

Permalink
ft/zkswap stable and v3 (#642)
Browse files Browse the repository at this point in the history
* ft: add zkswap-stable

* ft: add zkswap-v3
  • Loading branch information
NgoKimPhu authored Dec 10, 2024
1 parent 4d0f167 commit 642dd7e
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/source/curve/embed.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ var arbitrumPancakeStablePoolsBytes []byte
//go:embed pools/pancake-stable/bsc.json
var bscPancakeStablePoolsBytes []byte

// ZkSwap-stable pool bytes

//go:embed pools/zkswap-stable/zksync.json
var zksyncPoolsBytes []byte

var bytesByPath = map[string][]byte{
"pools/arbitrum.json": arbitrumPoolsBytes,
"pools/avalanche.json": avalanchePoolsBytes,
Expand All @@ -90,4 +95,5 @@ var bytesByPath = map[string][]byte{
"pools/ellipsis/bsc.json": ellipsisBscPoolsBytes,
"pools/pancake-stable/arbitrum.json": arbitrumPancakeStablePoolsBytes,
"pools/pancake-stable/bsc.json": bscPancakeStablePoolsBytes,
"pools/zkswap-stable/zksync.json": zksyncPoolsBytes,
}
26 changes: 26 additions & 0 deletions pkg/source/curve/pools/zkswap-stable/zksync.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[
{
"id": "0x15309aaf4fedf346e5204331027b4ef7b75b1dd7",
"name": "USDC/USDC/USDT",
"type": "curve-base",
"lpToken": "0x31c330f2febda65693ec8801b77a93c6d1f479e4",
"aPrecision": "2000",
"tokens": [
{
"address": "0x1d17cbcf0d6d143135ae902365d2e5e2a16538d4",
"precision": "1",
"rate": "1000000000000000000"
},
{
"address": "0x3355df6d4c9c3035724fd0e3914de96a5a83aaf4",
"precision": "1",
"rate": "1000000000000000000"
},
{
"address": "0x493257fd37edb34451f62edf8d2a0c418852ba4c",
"precision": "1",
"rate": "1000000000000000000"
}
]
}
]
4 changes: 4 additions & 0 deletions pkg/valueobject/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ var (
ExchangeCurve Exchange = "curve"
ExchangeEllipsis Exchange = "ellipsis"
ExchangePancakeStable Exchange = "pancake-stable"
ExchangeZkSwapStable Exchange = "zkswap-stable"

ExchangeCurveStablePlain Exchange = "curve-stable-plain"
ExchangeCurveStableNg Exchange = "curve-stable-ng"
Expand Down Expand Up @@ -157,6 +158,7 @@ var (
ExchangeRamsesV2 Exchange = "ramses-v2"
ExchangePharaohV2 Exchange = "pharaoh-v2"
ExchangeDackieV3 Exchange = "dackie-v3"
ExchangeZkSwapV3 Exchange = "zkswap-v3"
ExchangeHoriza Exchange = "horiza"
ExchangeBaseSwapV3 Exchange = "baseswap-v3"
ExchangeArbiDexV3 Exchange = "arbidex-v3"
Expand Down Expand Up @@ -446,6 +448,7 @@ var AMMSourceSet = map[Exchange]struct{}{
ExchangeCurveTwoCryptoNg: {},
ExchangeEllipsis: {},
ExchangePancakeStable: {},
ExchangeZkSwapStable: {},
ExchangeUniSwapV3: {},
ExchangeKyberswapElastic: {},
ExchangeBalancer: {},
Expand Down Expand Up @@ -509,6 +512,7 @@ var AMMSourceSet = map[Exchange]struct{}{
ExchangeSushiSwapV3: {},
ExchangeRamsesV2: {},
ExchangeDackieV3: {},
ExchangeZkSwapV3: {},
ExchangeHoriza: {},
ExchangeBaseSwapV3: {},
ExchangeArbiDexV3: {},
Expand Down

0 comments on commit 642dd7e

Please sign in to comment.