Skip to content

Commit

Permalink
Merge pull request #330 from curvefi/fix/disable-saave-in-router
Browse files Browse the repository at this point in the history
Fix: disable underlying saave swaps in router
  • Loading branch information
Macket authored May 7, 2024
2 parents 07a182a + 2df9a12 commit ff21286
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@curvefi/api",
"version": "2.58.2",
"version": "2.58.3",
"description": "JavaScript library for curve.fi",
"main": "lib/index.js",
"author": "Macket",
Expand Down
2 changes: 2 additions & 0 deletions src/pools/PoolTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,8 @@ export class PoolTemplate {
}

private statsTotalLiquidity = async (useApi = true): Promise<string> => {
if (curve.chainId === 1 && this.id === "crveth") return "0"

if (this.isLlamma) {
const stablecoinContract = curve.contracts[this.underlyingCoinAddresses[0]].multicallContract;
const collateralContract = curve.contracts[this.underlyingCoinAddresses[1]].multicallContract;
Expand Down
4 changes: 3 additions & 1 deletion src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,9 @@ const _buildRouteGraph = memoize(async (): Promise<IDict<IDict<IRouteStep[]>>> =
if (curve.chainId === 1 && tvl < 1000) continue;
if (curve.chainId !== 1 && tvl < 100) continue;

const excludedUnderlyingSwaps = (poolId === 'ib' && curve.chainId === 1) || (poolId === 'geist' && curve.chainId === 250);
const excludedUnderlyingSwaps = (poolId === 'ib' && curve.chainId === 1) ||
(poolId === 'geist' && curve.chainId === 250) ||
(poolId === 'saave' && curve.chainId === 1);

// Wrapped coin <-> LP "swaps" (actually add_liquidity/remove_liquidity_one_coin)
if (!poolData.is_fake && !poolData.is_llamma && wrappedCoinAddresses.length < 6) {
Expand Down

0 comments on commit ff21286

Please sign in to comment.