Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ SLACK_REBALANCE_BOT_NAME=
# ===============

BALMY_SLIPPAGE_PERCENTAGE=

# Custom api url. Leave blank/undefined to use the default
LIFI_API_URL=
LIFI_API_KEY=

# =============
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/constants/values.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const MAX_TAKE_AMOUNT_SCALING = BigInt(String(process.env.MAX_TAKE_AMOUNT

export const ETHERFI_L2_MODE_SYNC_POOL_ETH_ADDRESS = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" as Address;

export const LIFI_API_URL = process.env.LIFI_API_URL || "https://li.quest";
export const LIFI_API_KEY = process.env.LIFI_API_KEY || null;
export const BALMY_SLIPPAGE_PERCENTAGE = Number(process.env.BALMY_SLIPPAGE_PERCENTAGE) || 1; // 1% by default
export const DEX_SLIPPAGE_BPS = BigInt(String(process.env.DEX_SLIPPAGE_BPS || "10")); // 0.1% by default
Expand Down
3 changes: 2 additions & 1 deletion src/services/routing/balmy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { buildSDK, QuoteRequest, QuoteResponse } from "@balmy/sdk";
import { Call } from "../../types";
import { publicClient } from "../../utils/transactionHelpers";
import { ALCHEMY_API_KEY } from "../../constants/chain";
import { LIFI_API_KEY } from "../../constants/values";
import { LIFI_API_KEY, LIFI_API_URL } from "../../constants/values";

const sdk = buildSDK({
quotes: {
Expand All @@ -18,6 +18,7 @@ const sdk = buildSDK({
custom: {
"li-fi": {
apiKey: LIFI_API_KEY || undefined,
url: LIFI_API_URL,
}
}
},
Expand Down