- Put your funds to work
- by providing liquidity.
-
-
- When you add liquidity to a pool, you can receive a share of its
- trading volume and potentially snag extra rewards when there are
- incentives involved!
-
-
-
+
+ Manage Liquidity Positions
+
+
+ You can adjust and claim rewards for your liquidity positions on the
+ connected network. For V2 pools, you can migrate to increase capital
+ efficiency.
+
+
+ }>
+ <_SmartPoolsTable chainId={chainId} />
+
+
+ )
+}
diff --git a/apps/web/src/app/(evm)/pool/header.tsx b/apps/web/src/app/(evm)/[chainId]/header.tsx
similarity index 89%
rename from apps/web/src/app/(evm)/pool/header.tsx
rename to apps/web/src/app/(evm)/[chainId]/header.tsx
index 2b93fa8062..94558372a6 100644
--- a/apps/web/src/app/(evm)/pool/header.tsx
+++ b/apps/web/src/app/(evm)/[chainId]/header.tsx
@@ -11,9 +11,8 @@ export const Header: FC = () => {
const chainId = useChainId()
return (
}
- chainId={chainId}
/>
)
}
diff --git a/apps/web/src/app/(evm)/pool/layout.tsx b/apps/web/src/app/(evm)/[chainId]/layout.tsx
similarity index 58%
rename from apps/web/src/app/(evm)/pool/layout.tsx
rename to apps/web/src/app/(evm)/[chainId]/layout.tsx
index bd46e1474f..293a1baf59 100644
--- a/apps/web/src/app/(evm)/pool/layout.tsx
+++ b/apps/web/src/app/(evm)/[chainId]/layout.tsx
@@ -1,15 +1,18 @@
import { HotJar } from '@sushiswap/ui'
+import { isSupportedChainId } from 'src/config'
import { Header } from './header'
+import notFound from './not-found'
import { Providers } from './providers'
-export const metadata = {
- title: 'Pool 💦',
-}
-
export default function PoolLayout({
children,
-}: { children: React.ReactNode }) {
+ params: { chainId },
+}: { children: React.ReactNode; params: { chainId: string } }) {
+ if (!isSupportedChainId(+chainId)) {
+ return notFound()
+ }
+
return (
<>
diff --git a/apps/web/src/app/(evm)/pool/not-found.tsx b/apps/web/src/app/(evm)/[chainId]/not-found.tsx
similarity index 77%
rename from apps/web/src/app/(evm)/pool/not-found.tsx
rename to apps/web/src/app/(evm)/[chainId]/not-found.tsx
index f0b52bf960..8d82d88676 100644
--- a/apps/web/src/app/(evm)/pool/not-found.tsx
+++ b/apps/web/src/app/(evm)/[chainId]/not-found.tsx
@@ -1,7 +1,9 @@
import { ChevronRightIcon } from '@heroicons/react/20/solid'
import { Button, LinkInternal, typographyVariants } from '@sushiswap/ui'
+import { ChainKey } from 'sushi'
+import { ChainId } from 'sushi/chain'
-export default function NotFound() {
+export default function NotFound(chainId: ChainId = ChainId.ETHEREUM) {
return (
@@ -30,7 +32,9 @@ export default function NotFound() {
icon={ChevronRightIcon}
iconPosition="end"
>
- See a list of our pools
+
+ See a list of our pools
+
{pool.hasEnabledSteerVault && (
-
+
{`This pool has been activated to leverage our smart pool feature. Smart pools are designed to optimize the
allocation of liquidity within customized price ranges, thereby improving trading efficiency. They achieve
this by enhancing liquidity depth around the current price, which results in higher fee earnings for liquidity
@@ -79,25 +63,15 @@ const Pool: FC<{ pool: Awaited> }> = ({ pool }) => {
To create a smart pool position, click{' '}
here
)}
-
-
-
-
- {!isAngleEnabledChainId(row.original.pool.chainId)
+ {!isAngleEnabledChainId(row.original.chainId)
? 'Not available on this network'
: 'Add rewards to a pool to incentivize liquidity providers joining in.'}
- {!row.original.pool.isIncentivized
+ {!row.original.isIncentivized
? 'No rewards available on this pool'
: 'After adding liquidity, stake your liquidity tokens to benefit from extra rewards'}
diff --git a/apps/web/src/ui/pool/Steer/SteerStrategies/index.ts b/apps/web/src/ui/pool/Steer/SteerStrategies/index.ts
index 1901bfa13f..88e7ed024f 100644
--- a/apps/web/src/ui/pool/Steer/SteerStrategies/index.ts
+++ b/apps/web/src/ui/pool/Steer/SteerStrategies/index.ts
@@ -1,14 +1,6 @@
-import { SteerStrategy } from '@sushiswap/database'
import { FC } from 'react'
-import { SteerVault, SteerVaultWithPool } from '@sushiswap/steer-sdk'
-import type {
- PoolIfIncentivized,
- PoolSwapFee,
- PoolWithFeeAprs,
- PoolWithIncentiveApr,
-} from 'sushi/types'
-import { SteerBaseStrategy } from './SteerBaseStrategy'
+import { V3Pool, VaultV1 } from '@sushiswap/graph-client/data-api'
export interface SteerStrategyGeneric {
tokenRatios: {
@@ -31,29 +23,7 @@ export interface SteerStrategyGeneric {
}
export type SteerStrategyComponent = FC<{
- vault: SteerVaultWithPool<
- SteerVault,
- PoolIfIncentivized>>
- >
+ pool: V3Pool
+ vault: VaultV1
generic: SteerStrategyGeneric
}>
-
-export const SteerStrategyComponents: Record<
- SteerStrategy,
- SteerStrategyComponent
-> = {
- [SteerStrategy.SuperWide]: SteerBaseStrategy,
- [SteerStrategy.ClassicRebalance]: SteerBaseStrategy,
- [SteerStrategy.DeltaNeutralStables]: SteerBaseStrategy,
- [SteerStrategy.StableExpansion]: SteerBaseStrategy,
- [SteerStrategy.ElasticExpansion]: SteerBaseStrategy,
- [SteerStrategy.HighLowChannel]: SteerBaseStrategy,
- [SteerStrategy.StaticStable]: SteerBaseStrategy,
- [SteerStrategy.BollingerAlgo]: SteerBaseStrategy,
- [SteerStrategy.ChannelMultiplier]: SteerBaseStrategy,
- [SteerStrategy.FixedPercentage]: SteerBaseStrategy,
- [SteerStrategy.PriceMultiplier]: SteerBaseStrategy,
- [SteerStrategy.KeltnerAlgo]: SteerBaseStrategy,
- [SteerStrategy.MovingVolatilityChannel]: SteerBaseStrategy,
- [SteerStrategy.MovingVolatilityChannelMedium]: SteerBaseStrategy,
-}
diff --git a/apps/web/src/ui/pool/Steer/constants.tsx b/apps/web/src/ui/pool/Steer/constants.tsx
deleted file mode 100644
index df4ddc1e4d..0000000000
--- a/apps/web/src/ui/pool/Steer/constants.tsx
+++ /dev/null
@@ -1,78 +0,0 @@
-import { SteerStrategy } from '@sushiswap/client'
-
-interface SteerStrategyConfig {
- name: string
- description: string
-}
-
-export const SteerStrategyConfig: Record = {
- [SteerStrategy.SuperWide]: {
- name: 'Super Wide Pool',
- description:
- 'This strategy is designed to give an extremely low risk profile similar to that of constant product style AMMs while enabling deeper liquidity. It uses incredibly wide positions that are highly unlikely to go out of range or even have a major shift in token holding ratio.',
- },
- [SteerStrategy.ClassicRebalance]: {
- name: 'Classic Rebalance Pool',
- description:
- 'This strategy makes a position of a fixed size centered around the current price. This position is maintained until the current price leaves the position range. The position then rebalances and makes a new position centered around the new current price.',
- },
- [SteerStrategy.DeltaNeutralStables]: {
- name: 'Delta Neutral Pool',
- description:
- 'Uses Simple Moving Average and a predefined multiplier to construct a price range.',
- },
- [SteerStrategy.StableExpansion]: {
- name: 'Stable Expansion Pool',
- description: '',
- },
- [SteerStrategy.ElasticExpansion]: {
- name: 'Elastic Expansion Pool',
- description:
- 'This strategy uses a technique called Bollinger bands to create a flexible pool of funds for liquidity provision. It automatically adjusts to changes in market conditions, such as price swings and fluctuations, to optimize the placement of funds, fees earned, and capital efficiency.',
- },
- [SteerStrategy.HighLowChannel]: {
- name: 'High Low Channel Pool',
- description:
- 'The Donchian Channel is a technical indicator used to measure the highest high and lowest low over a specified period, and it creates an upper and lower band accordingly. The range multiplier is also used to adjust the bands based on market volatility.',
- },
- [SteerStrategy.MovingVolatilityChannelMedium]: {
- name: 'Moving Volatility Pool',
- description:
- 'This strategy uses recent trading data to form a Keltner Channel that sets the range to place optimal liquidity for a given period of time. The Keltner Channel is a technical indicator that measures volatility using upper and lower bands, and an exponential moving average. These bands adjust based on market volatility.',
- },
- [SteerStrategy.StaticStable]: {
- name: 'Stable Pool',
- description:
- "This strategy is set based on the token's decimal precision and the typical offset and variance from the ideal peg. These positions are static, meaning low gas fees and reduced price volatility.",
- },
- [SteerStrategy.BollingerAlgo]: {
- name: 'Bollinger Bands Pool',
- description:
- 'This strategy uses a technique called Bollinger bands to create a flexible pool of funds for liquidity provision. It automatically adjusts to changes in market conditions, such as price swings and fluctuations, to optimize the placement of funds, fees earned, and capital efficiency.',
- },
- [SteerStrategy.ChannelMultiplier]: {
- name: 'Channel Multiplier Pool',
- description:
- 'This strategy uses a multiplier to make channel around the price. The wider the multiplier the wider area of coverage on channel on both side of current price.',
- },
- [SteerStrategy.FixedPercentage]: {
- name: 'Fixed Percentage Pool',
- description:
- 'This strategy routinely sets a position of a provided percentage spreading above and below the current price.',
- },
- [SteerStrategy.PriceMultiplier]: {
- name: 'Price Multiplier Pool',
- description:
- 'This strategy makes a position based on a multiplier of the current price of the pool. The multiplier makes a position from the price / multiplier to the price * multiplier.',
- },
- [SteerStrategy.KeltnerAlgo]: {
- name: 'Keltner Channel Pool',
- description:
- 'This strategy uses recent trading data to form a Keltner Channel that sets the range to place optimal liquidity for a given period of time. The Keltner Channel is a technical indicator that measures volatility using upper and lower bands, and an exponential moving average. These bands adjust based on market volatility.',
- },
- [SteerStrategy.MovingVolatilityChannel]: {
- name: 'Moving Volatility Pool',
- description:
- 'This strategy uses recent trading data to form a Keltner Channel that sets the range to place optimal liquidity for a given period of time. The Keltner Channel is a technical indicator that measures volatility using upper and lower bands, and an exponential moving average. These bands adjust based on market volatility.',
- },
-}
diff --git a/apps/web/src/ui/pool/TableFiltersNetwork.tsx b/apps/web/src/ui/pool/TableFiltersNetwork.tsx
index b7a15f386d..f9dfb1ed50 100644
--- a/apps/web/src/ui/pool/TableFiltersNetwork.tsx
+++ b/apps/web/src/ui/pool/TableFiltersNetwork.tsx
@@ -1,13 +1,7 @@
'use client'
import { PlusCircleIcon } from '@heroicons/react/24/outline'
-import {
- Chip,
- Popover,
- PopoverContent,
- PopoverTrigger,
- Separator,
-} from '@sushiswap/ui'
+import { Chip, Popover, PopoverContent, PopoverTrigger } from '@sushiswap/ui'
import { Button } from '@sushiswap/ui'
import {
Command,
@@ -18,46 +12,27 @@ import {
} from '@sushiswap/ui'
import { CheckIcon } from '@sushiswap/ui/icons/CheckIcon'
import { NetworkIcon } from '@sushiswap/ui/icons/NetworkIcon'
-import React, { FC, useCallback, useState, useTransition } from 'react'
+import { usePathname, useRouter } from 'next/navigation'
+import React, { FC, useCallback, useState } from 'react'
import { AMM_SUPPORTED_CHAIN_IDS } from 'src/config'
-import { Chain } from 'sushi/chain'
-
-import { usePoolFilters, useSetPoolFilters } from './PoolsFiltersProvider'
+import { Chain, ChainId, ChainKey } from 'sushi/chain'
-const isAllThenNone = (chainIds: number[]) =>
- AMM_SUPPORTED_CHAIN_IDS.length === chainIds.length ? [] : chainIds
-
-export const TableFiltersNetwork: FC = () => {
- const [pending, startTransition] = useTransition()
+export const TableFiltersNetwork: FC<{
+ chainId: ChainId
+ chainIds?: ChainId[]
+}> = ({ chainId, chainIds = AMM_SUPPORTED_CHAIN_IDS }) => {
const [open, setOpen] = useState(false)
- const { chainIds } = usePoolFilters()
- const setFilters = useSetPoolFilters()
- const [localValue, setValues] = useState(isAllThenNone(chainIds))
- const values = pending ? localValue : isAllThenNone(chainIds)
+ const router = useRouter()
+ const pathname = usePathname()
const onClick = useCallback(
- (chainId: (typeof chainIds)[number]) => {
- let _newValues: number[]
- if (localValue.includes(chainId)) {
- _newValues = localValue.filter((el) => el !== chainId)
- } else {
- _newValues = [...(localValue ?? []), chainId]
- }
- setValues(_newValues)
-
- startTransition(() => {
- setFilters((prev) => {
- if (prev.chainIds?.includes(chainId)) {
- const chains = prev.chainIds!.filter((el) => el !== chainId)
- return { ...prev, chainIds: chains }
- } else {
- return { ...prev, chainIds: [...(prev.chainIds ?? []), chainId] }
- }
- })
- })
+ (chainId: string) => {
+ const pathSegments = pathname.split('/')
+ pathSegments[1] = ChainKey[+chainId as ChainId]
+ router.push(pathSegments.join('/'))
},
- [setFilters, localValue],
+ [pathname, router],
)
return (
@@ -71,28 +46,8 @@ export const TableFiltersNetwork: FC = () => {
aria-expanded={open}
className="!border-dashed"
>
- Networks
- {values?.length > 0 && (
- <>
-
-
- {values.length}
-
-