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 src/constants/skip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ export const SKIP_GO_FAST_TRANSFER_LIMIT = 100_000; // hardcoded on Skip's end

export const SKIP_GO_BPS_FEE = 0.1; // hardcoded to 10bps on Skip's end

// neutron-astroport excluded due to degraded performance causing slow route simulations
export const SKIP_SWAP_VENUES = [{ chainId: 'osmosis-1', name: 'osmosis-poolmanager' }];

export const SKIP_GO_DESTINATION_FEE = 0.01; // $0.01 since the only destination is Osmosis chain to fulfill the go fast route.

/**
Expand Down
5 changes: 0 additions & 5 deletions src/constants/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ export const WITHDRAWABLE_ASSETS: TokenForTransfer[] = [
decimals: USDC_DECIMALS,
},
{ chainId: SOLANA_MAINNET_ID, denom: USDC_ADDRESSES[SOLANA_MAINNET_ID], decimals: USDC_DECIMALS },
{
chainId: CosmosChainId.Neutron,
denom: USDC_ADDRESSES[CosmosChainId.Neutron],
decimals: USDC_DECIMALS,
},
{
chainId: CosmosChainId.Osmosis,
denom: USDC_ADDRESSES[CosmosChainId.Osmosis],
Expand Down
9 changes: 2 additions & 7 deletions src/hooks/swap/useSwapQuote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { RouteRequest } from '@skip-go/client';
import { useQuery } from '@tanstack/react-query';
import { parseUnits } from 'viem';

import { SKIP_SWAP_VENUES } from '@/constants/skip';
import { timeUnits } from '@/constants/time';

import { getSelectedDydxChainId } from '@/state/appSelectors';
Expand All @@ -10,12 +11,6 @@ import { useAppSelector } from '@/state/appTypes';
import { SkipClient, useSkipClient } from '../transfers/skipClient';
import { TokenConfigsResult, useTokenConfigs } from '../useTokenConfigs';

const SWAP_VENUES = [
{ chainId: 'osmosis-1', name: 'osmosis-poolmanager' },
{ chainId: 'neutron-1', name: 'neutron-duality' },
{ chainId: 'neutron-1', name: 'neutron-astroport' },
];

// Swaps are from dydxchain DYDX <-> dydxchain USDC
async function getSkipSwapRoute(
skipClient: SkipClient,
Expand All @@ -38,7 +33,7 @@ async function getSkipSwapRoute(
sourceAssetChainId: chainId,
destAssetDenom: outputTokenDenom,
destAssetChainId: chainId,
swapVenues: SWAP_VENUES,
swapVenues: SKIP_SWAP_VENUES,
smartSwapOptions: {
splitRoutes: true,
},
Expand Down
2 changes: 2 additions & 0 deletions src/views/dialogs/TransferDialogs/DepositDialog2/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { arbitrum, optimism } from 'viem/chains';

import { DYDX_DEPOSIT_CHAIN, EVM_DEPOSIT_CHAINS } from '@/constants/chains';
import { CosmosChainId } from '@/constants/graz';
import { SKIP_SWAP_VENUES } from '@/constants/skip';
import { SOLANA_MAINNET_ID } from '@/constants/solana';
import { timeUnits } from '@/constants/time';
import {
Expand Down Expand Up @@ -215,6 +216,7 @@ async function getSkipDepositRoutes(
// TODO(deposit2.0): Manually calculate price impact by comparing USD values and warn user if difference > a certain %
allowUnsafe: true,
smartSwapOptions: { evmSwaps: true },
swapVenues: SKIP_SWAP_VENUES,
};

const [slow, fast] = await Promise.all([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useQuery } from '@tanstack/react-query';
import { parseUnits } from 'viem';

import { DYDX_DEPOSIT_CHAIN } from '@/constants/chains';
import { SKIP_SWAP_VENUES } from '@/constants/skip';
import { timeUnits } from '@/constants/time';
import { DYDX_CHAIN_USDC_DENOM, TokenForTransfer } from '@/constants/tokens';

Expand Down Expand Up @@ -36,6 +37,7 @@ async function getSkipWithdrawalRoutes(
amountIn: parseUnits(amount, token.decimals).toString(),
smartRelay: true,
smartSwapOptions: { evmSwaps: true, splitRoutes: true },
swapVenues: SKIP_SWAP_VENUES,
allowUnsafe,
};

Expand Down
Loading