Skip to content

Conversation

@sirpy
Copy link
Contributor

@sirpy sirpy commented Feb 2, 2026

Description

add multiple reverification frequencies

@sirpy sirpy requested review from L03TJ3 and blueogin February 2, 2026 10:05
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 1 security issue, and left some high level feedback:

Security issues:

  • Detected a Generic API Key, potentially exposing access to various services and sensitive operations. (link)

General comments:

  • In GenericDistributionHelper::onDistribution, the logic that selects gasFee/gdFee based on pool liquidity is incorrect: gasBalance/stableBalance are never updated inside the loops, so you always compare to the original pool’s balances and only update the fee without updating the reference balance; you likely want to track and update both the best balance and its corresponding fee as you iterate.
  • In scripts/multichain-deploy/createUniswapTestPools.ts, the price calculations use JavaScript Number with large intermediate values (e.g. (10 ** 12) * (Number(sqrtPriceX96.toString()) / 2 ** 96) ** 2), which can overflow or lose precision; consider doing this math with BigNumber / JSBI or keeping it on-chain if you need reliable values rather than approximate logging.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In GenericDistributionHelper::onDistribution, the logic that selects gasFee/gdFee based on pool liquidity is incorrect: gasBalance/stableBalance are never updated inside the loops, so you always compare to the original pool’s balances and only update the fee without updating the reference balance; you likely want to track and update both the best balance and its corresponding fee as you iterate.
- In scripts/multichain-deploy/createUniswapTestPools.ts, the price calculations use JavaScript Number with large intermediate values (e.g. (10 ** 12) * (Number(sqrtPriceX96.toString()) / 2 ** 96) ** 2), which can overflow or lose precision; consider doing this math with BigNumber / JSBI or keeping it on-chain if you need reliable values rather than approximate logging.

## Individual Comments

### Comment 1
<location> `releases/deploy-settings.json:315` </location>
<code_context>
0x951857744785e80e2de051c32ee7b25f9c458c42
</code_context>

<issue_to_address>
**security (generic-api-key):** Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

*Source: gitleaks*
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@openzeppelin-code
Copy link

Identity v4

Generated at commit: 9a65ddd8738e573d7d83a957ca3f947d737e02ae

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
3
5
0
16
44
68
Dependencies Critical
High
Medium
Low
Note
Total
0
0
1
0
135
136

For more details view the full report in OpenZeppelin Code Inspector

@sirpy sirpy closed this Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants