Skip to content

Conversation

@rouzwelt
Copy link
Collaborator

@rouzwelt rouzwelt commented Nov 27, 2025

Motivation

Add support for Aerodrome Slipstream V2

Solution

Checks

By submitting this for review, I'm confirming I've done the following:

  • made this PR as small as possible
  • unit-tested any new functionality
  • linked any relevant issues or PRs
  • included screenshots (if this involves a front-end change)

Summary by CodeRabbit

  • New Features
    • Added Aerodrome Slipstream V2 liquidity provider with support for BASE chain liquidity pools
    • Integrated new provider into routing configuration to expand available liquidity sources

✏️ Tip: You can customize this high-level summary in your review settings.

@rouzwelt rouzwelt self-assigned this Nov 27, 2025
@rouzwelt rouzwelt requested a review from hardyjosh November 27, 2025 22:12
@coderabbitai
Copy link

coderabbitai bot commented Nov 27, 2025

Walkthrough

This PR introduces a new AerodromeSlipstreamV2 liquidity provider to the SushiSwap router infrastructure. The provider class extends the base Velodrome provider with Aerodrome-specific configurations, and is registered in both the main DataFetcher and RainDataFetcher initialization sequences.

Changes

Cohort / File(s) Summary
New Aerodrome Slipstream V2 Provider
packages/sushi/src/router/liquidity-providers/AerodromeSlipstreamV2.ts
New provider class extending VelodromeSlipstreamBaseProvider with hardcoded tick spacings [1, 50, 100, 200, 2000, 10, 500], factory address, and tick lens for BASE chain; exposes getType() and getPoolProviderName() methods.
Provider Registry Updates
packages/sushi/src/router/liquidity-providers/LiquidityProvider.ts, packages/sushi/src/router/data-fetcher.ts, packages/sushi/src/router/rain/RainDataFetcher.ts
Added AerodromeSlipstreamV2 enum member to LiquidityProviders; imported and instantiated AerodromeSlipstreamV2Provider in DataFetcher._setProviders and RainDataFetcher's allProviders array.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • New provider class follows established VelodromeSlipstreamBaseProvider pattern; verify tick spacings and contract addresses are correct for BASE chain
  • Consistent registration across three separate locations; confirm all imports and array placements are accurate

Possibly related PRs

Suggested labels

new feature

Suggested reviewers

  • hardyjosh

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'add support for aerodrome slipstream v2' clearly and directly summarizes the main change across all modified files, which introduce AerodromeSlipstreamV2Provider and integrate it into the routing system.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 2025-11-27-aerodrome-slipstream-v2

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eef977d and b654412.

📒 Files selected for processing (3)
  • packages/sushi/src/router/data-fetcher.ts (2 hunks)
  • packages/sushi/src/router/liquidity-providers/LiquidityProvider.ts (2 hunks)
  • packages/sushi/src/router/rain/RainDataFetcher.ts (2 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: rouzwelt
Repo: rainlanguage/sushiswap PR: 40
File: packages/sushi/src/router/liquidity-providers/AerodromeSlipstreamV2.ts:6-23
Timestamp: 2025-11-27T23:22:25.791Z
Learning: In AerodromeSlipstreamV2Provider (packages/sushi/src/router/liquidity-providers/AerodromeSlipstreamV2.ts), the DEFAULT_TICK_SPACINGS array order [1, 50, 100, 200, 2000, 10, 500] is intentionally taken from the on-chain contract and should not be reordered for readability, as it needs to match the contract's configuration.
📚 Learning: 2025-11-27T23:22:25.791Z
Learnt from: rouzwelt
Repo: rainlanguage/sushiswap PR: 40
File: packages/sushi/src/router/liquidity-providers/AerodromeSlipstreamV2.ts:6-23
Timestamp: 2025-11-27T23:22:25.791Z
Learning: In AerodromeSlipstreamV2Provider (packages/sushi/src/router/liquidity-providers/AerodromeSlipstreamV2.ts), the DEFAULT_TICK_SPACINGS array order [1, 50, 100, 200, 2000, 10, 500] is intentionally taken from the on-chain contract and should not be reordered for readability, as it needs to match the contract's configuration.

Applied to files:

  • packages/sushi/src/router/rain/RainDataFetcher.ts
  • packages/sushi/src/router/data-fetcher.ts
  • packages/sushi/src/router/liquidity-providers/LiquidityProvider.ts
📚 Learning: 2025-04-09T16:38:40.404Z
Learnt from: rouzwelt
Repo: rainlanguage/sushiswap PR: 32
File: packages/sushi/src/router/rain/UniswapV3Base.ts:71-92
Timestamp: 2025-04-09T16:38:40.404Z
Learning: In packages/sushi/src/router/rain/UniswapV3Base.ts, the fetchPoolData method uses multicall where each pool returns its own response independently, and failures are handled at the individual pool level rather than affecting all pools at once.

Applied to files:

  • packages/sushi/src/router/rain/RainDataFetcher.ts
📚 Learning: 2025-04-08T19:08:36.306Z
Learnt from: rouzwelt
Repo: rainlanguage/sushiswap PR: 32
File: packages/sushi/src/router/rain/UniswapV3Base.ts:169-210
Timestamp: 2025-04-08T19:08:36.306Z
Learning: In packages/sushi/src/router/rain/UniswapV3Base.ts, the methods getIndexes and fetchPoolsForToken are separate methods with distinct responsibilities and not closely interlinked as might be assumed.

Applied to files:

  • packages/sushi/src/router/rain/RainDataFetcher.ts
  • packages/sushi/src/router/liquidity-providers/LiquidityProvider.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (17)
  • GitHub Check: datafetcher-test (BASE)
  • GitHub Check: datafetcher-test (BTTC)
  • GitHub Check: datafetcher-test (FLARE)
  • GitHub Check: datafetcher-test (ZETACHAIN)
  • GitHub Check: datafetcher-test (SCROLL)
  • GitHub Check: datafetcher-test (METIS)
  • GitHub Check: datafetcher-test (MOONRIVER)
  • GitHub Check: datafetcher-test (MOONBEAM)
  • GitHub Check: datafetcher-test (ETHEREUM)
  • GitHub Check: datafetcher-test (AVALANCHE)
  • GitHub Check: datafetcher-test (BSC)
  • GitHub Check: datafetcher-test (GNOSIS)
  • GitHub Check: datafetcher-test (FANTOM)
  • GitHub Check: datafetcher-test (ARBITRUM)
  • GitHub Check: datafetcher-test (POLYGON)
  • GitHub Check: router-test
  • GitHub Check: git-clean
🔇 Additional comments (3)
packages/sushi/src/router/rain/RainDataFetcher.ts (1)

7-7: AerodromeSlipstreamV2Provider is correctly integrated into RainDataFetcher.

Importing AerodromeSlipstreamV2Provider and wiring it into allProviders immediately after AerodromeSlipstreamProvider keeps ordering consistent and ensures the new V2 slipstream participates in the existing init/log-processing/update flows without additional changes.

Also applies to: 150-151

packages/sushi/src/router/liquidity-providers/LiquidityProvider.ts (1)

87-87: Enum and UniV3 provider list wiring for AerodromeSlipstreamV2 looks consistent.

Adding AerodromeSlipstreamV2 to LiquidityProviders and to UniV3LiquidityProviders directly after AerodromeSlipstream aligns with the new provider’s intended behavior and ensures it’s included wherever UniV3-style LPs are filtered or iterated.

Also applies to: 273-274

packages/sushi/src/router/data-fetcher.ts (1)

6-6: AerodromeSlipstreamV2Provider is correctly added to the core DataFetcher provider set.

The new import and placement of AerodromeSlipstreamV2Provider immediately after AerodromeSlipstreamProvider in _setProviders mirror the RainDataFetcher wiring and ensure the new LP participates in standard fetching flows and filtering via LiquidityProviders without additional changes.

Also applies to: 191-192


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 842b17a and eef977d.

📒 Files selected for processing (5)
  • packages/sushi/src/router/data-fetcher.ts (2 hunks)
  • packages/sushi/src/router/liquidity-providers/AerodromeSlipstreamV2.ts (1 hunks)
  • packages/sushi/src/router/liquidity-providers/LiquidityProvider.ts (2 hunks)
  • packages/sushi/src/router/rain/RainDataFetcher.ts (2 hunks)
  • protocols/route-processor/test/DataFetcher.test.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-04-08T19:08:36.306Z
Learnt from: rouzwelt
Repo: rainlanguage/sushiswap PR: 32
File: packages/sushi/src/router/rain/UniswapV3Base.ts:169-210
Timestamp: 2025-04-08T19:08:36.306Z
Learning: In packages/sushi/src/router/rain/UniswapV3Base.ts, the methods getIndexes and fetchPoolsForToken are separate methods with distinct responsibilities and not closely interlinked as might be assumed.

Applied to files:

  • packages/sushi/src/router/liquidity-providers/LiquidityProvider.ts
  • protocols/route-processor/test/DataFetcher.test.ts
  • packages/sushi/src/router/rain/RainDataFetcher.ts
📚 Learning: 2025-04-09T16:38:40.404Z
Learnt from: rouzwelt
Repo: rainlanguage/sushiswap PR: 32
File: packages/sushi/src/router/rain/UniswapV3Base.ts:71-92
Timestamp: 2025-04-09T16:38:40.404Z
Learning: In packages/sushi/src/router/rain/UniswapV3Base.ts, the fetchPoolData method uses multicall where each pool returns its own response independently, and failures are handled at the individual pool level rather than affecting all pools at once.

Applied to files:

  • protocols/route-processor/test/DataFetcher.test.ts
  • packages/sushi/src/router/rain/RainDataFetcher.ts
🧬 Code graph analysis (3)
protocols/route-processor/test/DataFetcher.test.ts (2)
apis/tokens/drizzle/schema.ts (1)
  • token (17-40)
packages/sushi/src/currency/tokens.ts (1)
  • USDC (788-814)
packages/sushi/src/router/data-fetcher.ts (1)
packages/sushi/src/router/liquidity-providers/AerodromeSlipstreamV2.ts (1)
  • AerodromeSlipstreamV2Provider (6-24)
packages/sushi/src/router/rain/RainDataFetcher.ts (1)
packages/sushi/src/router/liquidity-providers/AerodromeSlipstreamV2.ts (1)
  • AerodromeSlipstreamV2Provider (6-24)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
  • GitHub Check: datafetcher-test (BOBA_BNB)
  • GitHub Check: datafetcher-test (KAVA)
  • GitHub Check: datafetcher-test (ZETACHAIN)
  • GitHub Check: datafetcher-test (FILECOIN)
  • GitHub Check: datafetcher-test (BTTC)
  • GitHub Check: datafetcher-test (BASE)
  • GitHub Check: datafetcher-test (METIS)
  • GitHub Check: datafetcher-test (OPTIMISM)
  • GitHub Check: datafetcher-test (MOONBEAM)
  • GitHub Check: datafetcher-test (MOONRIVER)
  • GitHub Check: datafetcher-test (FUSE)
  • GitHub Check: datafetcher-test (CELO)
  • GitHub Check: datafetcher-test (TELOS)
  • GitHub Check: datafetcher-test (OKEX)
  • GitHub Check: datafetcher-test (ARBITRUM_NOVA)
  • GitHub Check: datafetcher-test (GNOSIS)
  • GitHub Check: datafetcher-test (FANTOM)
  • GitHub Check: datafetcher-test (POLYGON)
  • GitHub Check: datafetcher-test (ETHEREUM)
  • GitHub Check: router-test
🔇 Additional comments (3)
packages/sushi/src/router/rain/RainDataFetcher.ts (1)

7-7: RainDataFetcher now includes AerodromeSlipstreamV2 consistently

Importing AerodromeSlipstreamV2Provider and adding it alongside AerodromeSlipstreamProvider in allProviders keeps the Rain-specific routing stack in sync with the main DataFetcher and ensures slipstream v2 pools participate in log processing and routing. Looks good.

Also applies to: 149-151

packages/sushi/src/router/liquidity-providers/LiquidityProvider.ts (1)

87-87: Enum and UniV3LiquidityProviders updated correctly for AerodromeSlipstreamV2

LiquidityProviders.AerodromeSlipstreamV2 matches the new provider’s getType() and adding it to UniV3LiquidityProviders (alongside AerodromeSlipstream and VelodromeSlipstream) keeps all slipstream variants covered by the shared UniV3-like fee/tick checks and any logic keyed off that list. This extension looks consistent.

Also applies to: 270-272

packages/sushi/src/router/data-fetcher.ts (1)

6-6: DataFetcher provider set cleanly extended with AerodromeSlipstreamV2

Adding AerodromeSlipstreamV2Provider to the imports and to the _setProviders list right after AerodromeSlipstreamProvider keeps the default on-chain DataFetcher configuration in sync with the new LP. Instantiation is already wrapped in the existing try/catch, so unsupported chains will be handled the same way as for other providers.

Also applies to: 191-193

@rouzwelt rouzwelt added the new dex Added a new dex support label Nov 27, 2025
@rouzwelt rouzwelt merged commit f75aaf7 into rain-fork Dec 3, 2025
92 of 104 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new dex Added a new dex support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants