Closed
Conversation
…tion parameter Applied via @cursor push command
- Use Math.floor instead of Math.trunc in isFullRange to match on-chain floor division semantics - Change MIN_NON_ZERO_PRICE from Number.MIN_VALUE to 1e-300 to prevent Infinity in reciprocal calculations Applied via @cursor push command
- Update test to use Math.floor matching the implementation fix
|
Cursor Agent can help with this pull request. Just |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Deploying interwovenkit with
|
| Latest commit: |
8f773ad
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e6c183e2.interwovenkit.pages.dev |
| Branch Preview URL: | https://cursor-failing-tests-bugbot.interwovenkit.pages.dev |
Deploying interwovenkit-staging with
|
| Latest commit: |
8f773ad
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://cf72f372.interwovenkit-staging.pages.dev |
| Branch Preview URL: | https://cursor-failing-tests-bugbot.interwovenkit-staging.pages.dev |
Deploying interwovenkit-testnet with
|
| Latest commit: |
8f773ad
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a12f2c62.interwovenkit-testnet.pages.dev |
| Branch Preview URL: | https://cursor-failing-tests-bugbot.interwovenkit-testnet.pages.dev |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Update CLAMM liquidity section labels from "Reward" to "Rewards" and "Total reward" to "Total rewards" for improved UI clarity.
Note
Medium Risk
Adds new financial math and valuation logic for CLAMM positions plus multiple new on-chain/indexer queries; incorrect calculations or mapping could misstate portfolio values or ranges.
Overview
Adds CLAMM liquidity support to the portfolio: the Initia liquidity aggregator now fetches CLAMM positions, pool info, claimable fees, and pending incentives, then computes per-position value/in-range status and surfaces them as dedicated
CLAMMrows.Introduces a new
data/clammmath module (fixed-point, tick/sqrt-price math, liquidity/amount conversions) with Vitest coverage, and extendsminitytypes to carry CLAMM row/position metadata.Refactors liquidity data fetching by splitting pool/CLAMM concerns into
initia-liquidity.pools.ts,initia-liquidity.clamm.ts, andinitia-liquidity.query-keys.ts; updatesuseL1PositionsTotalto derive liquidity totals fromuseInitiaLiquidityPositionsfor consistency; and makesuseDenomsoptionally fail-soft (return empty denom on lookup errors) to avoid breaking CLAMM reward valuation.Updates the Liquidity UI to render a CLAMM-specific collapsible breakdown (status dot, bounds, total rewards) and adjusts labels to “Rewards”/“Total rewards”, with accompanying CSS tweaks.
Written by Cursor Bugbot for commit 8f773ad. This will update automatically on new commits. Configure here.