-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix(aerodrome-slipstream): use onchain calls for newer pools #2824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🌐 Web query:
"stakedLiquidity" "Aerodrome" slipstream pool💡 Result:
Slipstream is Aerodrome Finance's concentrated liquidity implementation on the Base network, designed to function similarly to Uniswap V3 [1][2][3]. In Slipstream pools, liquidity providers (LPs) choose specific price ranges for their deposits, which concentrates capital and improves fee efficiency within those ranges [2][4][5]. Staking liquidity in Slipstream pools is a mandatory step to maximize rewards [5]. Because Slipstream positions are represented as non-fungible tokens (NFTs) rather than fungible LP tokens, LPs must stake their NFT position into the corresponding pool gauge [2][4]. Key aspects of staking for Slipstream pools include: Mandatory Staking: Unstaked positions do not receive AERO emissions and result in the protocol withholding a portion (approximately 10%) of earned swap fees, which are then distributed to veAERO voters [4][5]. Mechanism: After depositing liquidity and receiving an NFT representing that position, users must stake the NFT via the Aerodrome interface [2][4][5]. Rewards: Staked positions are eligible for a "triple income stream": Trading fees accrued while the position remains within the active price range [2][4][5]. AERO emissions distributed through the gauge [4][5]. Additional rewards (bribes) from veAERO voters [5]. Management: Because Slipstream pools concentrate liquidity, positions require active monitoring [2]. If the market price exits the selected range, the position stops earning swap fees until the price returns to that range or the LP adjusts it [2][4][5]. For more technical details, including integration interfaces and contract addresses, the official Aerodrome Finance GitHub repository maintains the specification and core contracts for Slipstream [1][6][7].
Citations:
🏁 Script executed:
Repository: DefiLlama/yield-server
Length of output: 50379
🏁 Script executed:
Repository: DefiLlama/yield-server
Length of output: 12564
🌐 Web query:
"Aerodrome Slipstream" stakedLiquidity function pool ABI💡 Result:
In Aerodrome Slipstream, there is no single function named stakedLiquidity defined in the core pool contract ABI [1][2]. Aerodrome Slipstream is a concentrated liquidity AMM (based on the Uniswap V3 architecture) where liquidity is managed via non-fungible position tokens (ERC-721 NFTs) [1][2][3]. The concept of "staked liquidity" refers to these NFT positions being deposited into a Gauge contract to earn AERO emissions [2]. To retrieve information related to staked liquidity, you must interact with the relevant Gauge contract and the NonfungiblePositionManager, rather than a single pool function [2]: 1. To check if a position is staked: You typically interact with the Gauge contract, which handles the staking of position NFTs [2]. 2. To calculate or view liquidity amounts: You query the NonfungiblePositionManager's positions(uint256 tokenId) function to get the position details, including the liquidity amount [4][5]. 3. For APR/Reward calculations: These are often derived by aggregating total staked liquidity within the gauge, which is documented at the pool/gauge level [6][7]. Because Slipstream follows the Concentrated Liquidity standard, the ABI for the pool itself exposes standard functions such as mint, burn, collect, and position management [1], while staking logic is externalized to the Gauge system [2]. If you are looking for specific data (like total staked liquidity), you should query the Gauge contract's view functions or use a protocol-specific subgraph/indexer that tracks gauge deposits [2][7].
Citations:
🏁 Script executed:
Repository: DefiLlama/yield-server
Length of output: 8217
Use the gauge for
stakedLiquiditystakedLiquidity()isn’t part of the Slipstream pool ABI; query the gauge-side contract/helper here instead, or the fallback path will skip these pools.🤖 Prompt for AI Agents