Skip to content

Commit 1bb16a0

Browse files
committed
add arbitrum config
1 parent a0537a7 commit 1bb16a0

File tree

3 files changed

+61
-1
lines changed

3 files changed

+61
-1
lines changed

src/swapService/config/arbitrum.ts

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import { type ChainRoutingConfig, SwapperMode } from "../interface"
2+
import {
3+
StrategyBalmySDK,
4+
StrategyERC4626Wrapper,
5+
StrategyRepayWrapper,
6+
} from "../strategies"
7+
8+
const SUSDC_ARBITRUM = "0x940098b108fB7D0a7E374f6eDED7760787464609"
9+
10+
const arbitrumRoutingConfig: ChainRoutingConfig = [
11+
// WRAPPERS
12+
{
13+
strategy: StrategyRepayWrapper.name(),
14+
match: {
15+
isRepay: true,
16+
swapperModes: [SwapperMode.EXACT_IN],
17+
},
18+
},
19+
{
20+
strategy: StrategyERC4626Wrapper.name(),
21+
match: {
22+
tokensInOrOut: [SUSDC_ARBITRUM],
23+
},
24+
},
25+
// DEFAULTS
26+
{
27+
strategy: StrategyBalmySDK.name(),
28+
config: {
29+
sourcesFilter: {
30+
includeSources: [
31+
"kyberswap",
32+
"paraswap",
33+
"odos",
34+
"1inch",
35+
"li-fi",
36+
"open-ocean",
37+
"uniswap",
38+
"oku",
39+
"magpie",
40+
"enso",
41+
"okx-dex",
42+
"pendle",
43+
"0x",
44+
],
45+
},
46+
},
47+
match: {},
48+
},
49+
]
50+
51+
export default arbitrumRoutingConfig

src/swapService/config/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { avalanche, base, bsc, mainnet } from "viem/chains"
1+
import { arbitrum, avalanche, base, bsc, mainnet } from "viem/chains"
22
import type { RoutingConfig } from "../interface"
3+
import arbitrumRoutingConfig from "./arbitrum"
34
import avalancheRoutingConfig from "./avalanche"
45
import baseRoutingConfig from "./base"
56
import berachainRoutingConfig from "./berachain"
@@ -16,6 +17,7 @@ const routingConfig: RoutingConfig = {
1617
[base.id]: baseRoutingConfig,
1718
[avalanche.id]: avalancheRoutingConfig,
1819
[bsc.id]: bscRoutingConfig,
20+
[arbitrum.id]: arbitrumRoutingConfig,
1921
[1923]: swellRoutingConfig,
2022
[80094]: berachainRoutingConfig,
2123
[60808]: bobRoutingConfig,

src/swapService/strategies/strategyERC4626Wrapper.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,13 @@ const defaultConfig: {
224224
asset: "0xb4444468e444f89e1c2CAc2F1D3ee7e336cBD1f5",
225225
assetDustEVault: "0x8B3779350Ac93eab1bEa44F96167580C1Ae6e846",
226226
},
227+
{
228+
chainId: 42161,
229+
protocol: "sUSDC",
230+
vault: "0x940098b108fB7D0a7E374f6eDED7760787464609",
231+
asset: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
232+
assetDustEVault: "0xC078756d5722166Ba6B51121bFB7bd6388C29F4E",
233+
},
227234
],
228235
}
229236

0 commit comments

Comments
 (0)